<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: rolling syslog file over in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/rolling-syslog-file-over/m-p/2615593#M37480</link>
    <description>Fred,&lt;BR /&gt;&lt;BR /&gt;Please see the attached shell script for examples of how this can be accomplished.  I downloaded this script from HP awhile back and I don't remember the site off the top of my head, but the attached script hasn't been edited.  I think it will meet your needs.&lt;BR /&gt;&lt;BR /&gt;-Mike</description>
    <pubDate>Fri, 16 Nov 2001 15:05:08 GMT</pubDate>
    <dc:creator>Mike Hassell</dc:creator>
    <dc:date>2001-11-16T15:05:08Z</dc:date>
    <item>
      <title>rolling syslog file over</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rolling-syslog-file-over/m-p/2615591#M37478</link>
      <description>I'd like to have the crontab, daily or maybe weekly, roll over the syslog into storage files, something like:&lt;BR /&gt;&lt;BR /&gt;/var/adm/syslog/syslog.log&lt;BR /&gt;&lt;BR /&gt;/dump/syslog/syslog.10162001&lt;BR /&gt;/dump/syslog/syslog.10172001&lt;BR /&gt;/dump/syslog/syslog.10182001&lt;BR /&gt;&lt;BR /&gt;I can handle the scripting OK, I figured I'd just copy out the current syslog, then do something like:&lt;BR /&gt;&lt;BR /&gt;&amp;gt;/var/adm/syslog/syslog.log&lt;BR /&gt;&lt;BR /&gt;To clear the current log.  It occurs to me though that this is not the proper way - do I need to start/stop daemons, or anything like that?  Is my approach too simple?&lt;BR /&gt;&lt;BR /&gt;And - would the same hold true for mail logs, su logs, wtmp and btmp?&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Nov 2001 14:57:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rolling-syslog-file-over/m-p/2615591#M37478</guid>
      <dc:creator>Fred Martin_1</dc:creator>
      <dc:date>2001-11-16T14:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: rolling syslog file over</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rolling-syslog-file-over/m-p/2615592#M37479</link>
      <description>Hi Fred,&lt;BR /&gt;&lt;BR /&gt;No i don't think you have to start / stop the daemon. Just roll over the file and do a "cat /dev/null &amp;gt; /var/adm/syslog/syslog.log" . The system can start updating the file again.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Regds&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Nov 2001 15:00:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rolling-syslog-file-over/m-p/2615592#M37479</guid>
      <dc:creator>Sanjay_6</dc:creator>
      <dc:date>2001-11-16T15:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: rolling syslog file over</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rolling-syslog-file-over/m-p/2615593#M37480</link>
      <description>Fred,&lt;BR /&gt;&lt;BR /&gt;Please see the attached shell script for examples of how this can be accomplished.  I downloaded this script from HP awhile back and I don't remember the site off the top of my head, but the attached script hasn't been edited.  I think it will meet your needs.&lt;BR /&gt;&lt;BR /&gt;-Mike</description>
      <pubDate>Fri, 16 Nov 2001 15:05:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rolling-syslog-file-over/m-p/2615593#M37480</guid>
      <dc:creator>Mike Hassell</dc:creator>
      <dc:date>2001-11-16T15:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: rolling syslog file over</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rolling-syslog-file-over/m-p/2615594#M37481</link>
      <description>&amp;lt;&amp;lt;&amp;gt;/var/adm/syslog/syslog.log &lt;BR /&gt;To clear the current log. It occurs to me though that this is not the proper way &amp;gt;&amp;gt;&lt;BR /&gt;&lt;BR /&gt;It is the correct way.  The inode number remains the same , so the syslogd file should not have any problem in writing to the file.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;&lt;DO i="" need="" to="" start=""&gt;&amp;gt;&lt;BR /&gt;&lt;BR /&gt;No need to restart the daemons. The simple way works ;-) &lt;BR /&gt;&lt;BR /&gt;&amp;lt;&lt;AND -="" would="" the="" same="" hold="" true="" for="" mail="" logs=""&gt;&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Yes, the same holds true.  But, i would not suggest you to Zero out the wtmp and btmp files. If you do that, the last and lastb commands will not show the old login information.&lt;BR /&gt;&lt;BR /&gt;Just curious, why do you want to  copy the syslog file daily??  Is it because of lack of space in /var filesystem??  If you are doing system backup daily, the syslog file would be copied as a part of the backup.&lt;BR /&gt;&lt;BR /&gt;HTH &lt;BR /&gt;raj&lt;BR /&gt;&lt;/AND&gt;&lt;/DO&gt;</description>
      <pubDate>Fri, 16 Nov 2001 15:08:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rolling-syslog-file-over/m-p/2615594#M37481</guid>
      <dc:creator>Roger Baptiste</dc:creator>
      <dc:date>2001-11-16T15:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: rolling syslog file over</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rolling-syslog-file-over/m-p/2615595#M37482</link>
      <description>Hey Fred,&lt;BR /&gt;&lt;BR /&gt;That will work, just realize there is a slight possibility that something could get written to the syslog between the copy and "zapping".&lt;BR /&gt;&lt;BR /&gt;Redirecting "nothing" as you show is fine.  Removing and recreating syslog without stopping daemons is not.&lt;BR /&gt;&lt;BR /&gt;You can also use SAM to trim the log but then you won't have the historical copies.&lt;BR /&gt;&lt;BR /&gt;You may also want to set an rc file to make a copy of OLDsyslog.log at every boot.  I've had a number of times this file was lost because of back to back boots.  Bummer.&lt;BR /&gt;&lt;BR /&gt;Darrell</description>
      <pubDate>Fri, 16 Nov 2001 15:14:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rolling-syslog-file-over/m-p/2615595#M37482</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2001-11-16T15:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: rolling syslog file over</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rolling-syslog-file-over/m-p/2615596#M37483</link>
      <description>The best way is to simply move the file aside with the mv command, then send syslogd a SIGHUP.  It will then create a new syslog.log file and start writing to that.  This way you won't lose any messages.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Steve</description>
      <pubDate>Fri, 16 Nov 2001 15:15:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rolling-syslog-file-over/m-p/2615596#M37483</guid>
      <dc:creator>Steven Gillard_2</dc:creator>
      <dc:date>2001-11-16T15:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: rolling syslog file over</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rolling-syslog-file-over/m-p/2615597#M37484</link>
      <description>Thank you all, I'm on my way.&lt;BR /&gt;&lt;BR /&gt;Darrell, I had considered the idea that the file may be written to; I'm liking the SIGHUP idea as a way to prevent that.&lt;BR /&gt;&lt;BR /&gt;Agreed, I don't think I'll move wtmp or btmp until they hit some size limit or have been reviewed for security.  That data is good to have online.&lt;BR /&gt;&lt;BR /&gt;To answer why am I doing this - yes primarily disk space.&lt;BR /&gt;&lt;BR /&gt;Perhaps monthly copying the file out would be sufficient, I hadn't figured out that part yet.&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Nov 2001 15:31:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rolling-syslog-file-over/m-p/2615597#M37484</guid>
      <dc:creator>Fred Martin_1</dc:creator>
      <dc:date>2001-11-16T15:31:52Z</dc:date>
    </item>
  </channel>
</rss>

