<?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: Syslog log rotation in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/syslog-log-rotation/m-p/5108029#M445452</link>
    <description>Thank you all for your assistance &lt;BR /&gt;and suggestions.&lt;BR /&gt;&lt;BR /&gt;I was not 'quite' able to solve the &lt;BR /&gt;mail.log rotation issue, but the&lt;BR /&gt;syslog rotation operates perfectly.</description>
    <pubDate>Mon, 02 Jun 2008 12:50:26 GMT</pubDate>
    <dc:creator>Ronald W. Widlewski</dc:creator>
    <dc:date>2008-06-02T12:50:26Z</dc:date>
    <item>
      <title>Syslog log rotation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/syslog-log-rotation/m-p/5108019#M445442</link>
      <description>&lt;!--!*#--&gt;I apologize if this question is basic and&lt;BR /&gt;redundant. Solaris has a command utility&lt;BR /&gt;"logadm" and corresponding "logadm.conf"&lt;BR /&gt;which effectively allows log rotation and&lt;BR /&gt;switching based on time, effectively &lt;BR /&gt;allowing log rotation for syslog and message&lt;BR /&gt;logs (very useful as a syslog server).&lt;BR /&gt;&lt;BR /&gt;Is there an equivalent native function&lt;BR /&gt;within HPUX ?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance for your help and/or&lt;BR /&gt;suggestions.&lt;BR /&gt;</description>
      <pubDate>Fri, 09 May 2008 11:35:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/syslog-log-rotation/m-p/5108019#M445442</guid>
      <dc:creator>Ronald W. Widlewski</dc:creator>
      <dc:date>2008-05-09T11:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Syslog log rotation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/syslog-log-rotation/m-p/5108020#M445443</link>
      <description>logrotate is an open source product that was adopted in Solaris and Linux. It is not native to HP-UX but there is an old HP-UX build in &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/logrotate-2.5" target="_blank"&gt;http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/logrotate-2.5&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Most system logs in HP-UX are rolled once at bootup. If you want additional rotations you have to come up with your own method. It is not difficult once you know the specifics of each log and how to handle open files.&lt;BR /&gt;&lt;BR /&gt;You may want to check&lt;BR /&gt;&lt;A href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=799136" target="_blank"&gt;http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=799136&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Bill has posted a script there.&lt;BR /&gt;</description>
      <pubDate>Fri, 09 May 2008 12:06:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/syslog-log-rotation/m-p/5108020#M445443</guid>
      <dc:creator>TTr</dc:creator>
      <dc:date>2008-05-09T12:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: Syslog log rotation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/syslog-log-rotation/m-p/5108021#M445444</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;See also:&lt;BR /&gt;&lt;A href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=382206" target="_blank"&gt;http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=382206&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;You can schedule the logrotate to run at specific time of the day to perform the required maintenance - using cron.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;good luck!&lt;BR /&gt;kind regards&lt;BR /&gt;yogeeraj</description>
      <pubDate>Fri, 09 May 2008 12:23:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/syslog-log-rotation/m-p/5108021#M445444</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2008-05-09T12:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Syslog log rotation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/syslog-log-rotation/m-p/5108022#M445445</link>
      <description>This is what I use on HPUX11i:&lt;BR /&gt;&lt;BR /&gt;DATE=`date +%m%d%y`&lt;BR /&gt;ARCH=&lt;PATH to="" archive="" directory=""&gt;&lt;BR /&gt;&lt;BR /&gt;# Roll over syslog.log&lt;BR /&gt;#&lt;BR /&gt;cd /var/adm/syslog&lt;BR /&gt;umask 022&lt;BR /&gt;cp syslog.log log.last&lt;BR /&gt;cp /dev/null syslog.log&lt;BR /&gt;/bin/kill -HUP `/bin/cat /var/run/syslog.pid`&lt;BR /&gt;uniq log.last $ARCH/syslog.${DATE}&lt;BR /&gt;rm log.last&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;NOTE: This way I can search all log files for a given month using one grep command. Since the month is the first two digits all I have to do is grep on syslog.04???? for all of Aprils syslog files.&lt;BR /&gt;&lt;BR /&gt;Schedule this to run at 2359 and it will close out the day and start a new syslog.log file.&lt;BR /&gt;&lt;BR /&gt;John&lt;/PATH&gt;</description>
      <pubDate>Fri, 09 May 2008 17:52:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/syslog-log-rotation/m-p/5108022#M445445</guid>
      <dc:creator>John Tartt</dc:creator>
      <dc:date>2008-05-09T17:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: Syslog log rotation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/syslog-log-rotation/m-p/5108023#M445446</link>
      <description>Thanks for your suggestions. I am attempting&lt;BR /&gt;to implement the logrotate utility but have&lt;BR /&gt;run into one issue that may be related to the config file (as shown):&lt;BR /&gt;&lt;BR /&gt;/var/adm/syslog/syslog.log {&lt;BR /&gt;    rotate 10&lt;BR /&gt;    daily&lt;BR /&gt;    create&lt;BR /&gt;    ifempty&lt;BR /&gt;    noolddir&lt;BR /&gt;    copytruncate&lt;BR /&gt;    postrotate&lt;BR /&gt;        /sbin/killall -HUP syslogd&lt;BR /&gt;    endscript&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;My problem (is) the syslog.log.1 file is&lt;BR /&gt;created and the syslog.log file continues&lt;BR /&gt;to exist, however the syslog.log file is&lt;BR /&gt;zero (0) length and the syslog.log.1 file&lt;BR /&gt;continues to be the active capturing log&lt;BR /&gt;file. Note I am using the 'daily' option&lt;BR /&gt;for testing and the copytruncate parameter&lt;BR /&gt;is (apparently) not supported in HPUX.&lt;BR /&gt;Thanks again...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 14 May 2008 13:06:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/syslog-log-rotation/m-p/5108023#M445446</guid>
      <dc:creator>Ronald W. Widlewski</dc:creator>
      <dc:date>2008-05-14T13:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: Syslog log rotation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/syslog-log-rotation/m-p/5108024#M445447</link>
      <description>Try to change the kill command&lt;BR /&gt;&lt;BR /&gt;/var/adm/syslog/syslog.log {&lt;BR /&gt;rotate 10&lt;BR /&gt;daily&lt;BR /&gt;create&lt;BR /&gt;ifempty&lt;BR /&gt;noolddir&lt;BR /&gt;copytruncate&lt;BR /&gt;postrotate&lt;BR /&gt;/bin/kill -HUP `/bin/cat /var/run/syslog.pid` &lt;BR /&gt;endscript&lt;BR /&gt;}</description>
      <pubDate>Wed, 14 May 2008 13:12:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/syslog-log-rotation/m-p/5108024#M445447</guid>
      <dc:creator>Robert-Jan Goossens_1</dc:creator>
      <dc:date>2008-05-14T13:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: Syslog log rotation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/syslog-log-rotation/m-p/5108025#M445448</link>
      <description>"/sbin/killall -HUP syslogd" is not correct on HP-UX (or on most other SysV-style platforms). Don't ever run killall directly. I think what you want is "kill -HUP `cat /var/run/syslog.pid`".&lt;BR /&gt;</description>
      <pubDate>Wed, 14 May 2008 13:13:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/syslog-log-rotation/m-p/5108025#M445448</guid>
      <dc:creator>Heironimus</dc:creator>
      <dc:date>2008-05-14T13:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: Syslog log rotation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/syslog-log-rotation/m-p/5108026#M445449</link>
      <description>Thank you all, your assistance has been&lt;BR /&gt;extremely helpful. I am almost 'there'!&lt;BR /&gt;I have one remaining (hopefully small)&lt;BR /&gt;issue that I did not mention earlier. I &lt;BR /&gt;am also looking to trim the mail log. &lt;BR /&gt;&lt;BR /&gt;My problem (is) the mail.log.1 file is&lt;BR /&gt;created, the mail.log file continues&lt;BR /&gt;to exist, however the mail.log file is&lt;BR /&gt;zero (0) length and the mail.log.1 file&lt;BR /&gt;continues to be the active capturing log&lt;BR /&gt;file. The .conf file file follows:&lt;BR /&gt;&lt;BR /&gt;/var/adm/syslog/mail.log {&lt;BR /&gt;    rotate 30&lt;BR /&gt;    daily&lt;BR /&gt;    create&lt;BR /&gt;    ifempty&lt;BR /&gt;    noolddir&lt;BR /&gt;    #copytruncate&lt;BR /&gt;    postrotate&lt;BR /&gt;        /bin/kill -HUP `/usr/bin/head -1  /etc/mail/sendmail.pid`&lt;BR /&gt;    endscript&lt;BR /&gt;}&lt;BR /&gt;The file listing follows:&lt;BR /&gt;-r--r--r--   1 root       root             0 May 19 00:01 mail.log&lt;BR /&gt;-r--r--r--   1 root       root           791 May 19 05:05 mail.log.1&lt;BR /&gt;-r--r--r--   1 root       root          1097 May 18 05:20 mail.log.2&lt;BR /&gt;-r--r--r--   1 root       root           791 May 17 05:05 mail.log.3&lt;BR /&gt;-r--r--r--   1 root       root           791 May 16 05:05 mail.log.4&lt;BR /&gt;-r--r--r--   1 root       root          1848 May 15 09:56 mail.log.5&lt;BR /&gt;-r--r--r--   1 root       root       7436032 May 14 05:05 mail.log.6&lt;BR /&gt;&lt;BR /&gt;Thanks (again) in advance for your &lt;BR /&gt;help and suggestions.&lt;BR /&gt;</description>
      <pubDate>Mon, 19 May 2008 13:43:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/syslog-log-rotation/m-p/5108026#M445449</guid>
      <dc:creator>Ronald W. Widlewski</dc:creator>
      <dc:date>2008-05-19T13:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Syslog log rotation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/syslog-log-rotation/m-p/5108027#M445450</link>
      <description>I don't have an HP handy right now to check, but on most systems that I've seen sendmail does its logging through syslog. You probably need to send syslogd a HUP instead of sendmail. You can use fuser or lsof to check who's got the file open.</description>
      <pubDate>Mon, 19 May 2008 14:33:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/syslog-log-rotation/m-p/5108027#M445450</guid>
      <dc:creator>Heironimus</dc:creator>
      <dc:date>2008-05-19T14:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: Syslog log rotation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/syslog-log-rotation/m-p/5108028#M445451</link>
      <description>I personally use:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://freshmeat.net/projects/perl-logrotate/" target="_blank"&gt;http://freshmeat.net/projects/perl-logrotate/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;works for me.</description>
      <pubDate>Mon, 19 May 2008 15:00:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/syslog-log-rotation/m-p/5108028#M445451</guid>
      <dc:creator>Court Campbell</dc:creator>
      <dc:date>2008-05-19T15:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: Syslog log rotation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/syslog-log-rotation/m-p/5108029#M445452</link>
      <description>Thank you all for your assistance &lt;BR /&gt;and suggestions.&lt;BR /&gt;&lt;BR /&gt;I was not 'quite' able to solve the &lt;BR /&gt;mail.log rotation issue, but the&lt;BR /&gt;syslog rotation operates perfectly.</description>
      <pubDate>Mon, 02 Jun 2008 12:50:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/syslog-log-rotation/m-p/5108029#M445452</guid>
      <dc:creator>Ronald W. Widlewski</dc:creator>
      <dc:date>2008-06-02T12:50:26Z</dc:date>
    </item>
  </channel>
</rss>

