<?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: can i delete the logs in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/can-i-delete-the-logs/m-p/3710112#M251034</link>
    <description>BTW - the logrotate even works on HP-UX Itanium.&lt;BR /&gt;&lt;BR /&gt;I configured like so:&lt;BR /&gt;&lt;BR /&gt;# cat /etc/logrotate.conf&lt;BR /&gt;# see "man logrotate" for details&lt;BR /&gt;# rotate log files weekly&lt;BR /&gt;weekly&lt;BR /&gt;&lt;BR /&gt;# keep 4 weeks worth of backlogs&lt;BR /&gt;rotate 5&lt;BR /&gt;&lt;BR /&gt;# create new (empty) log files after rotating old ones&lt;BR /&gt;create&lt;BR /&gt;&lt;BR /&gt;# uncomment this if you want your log files compressed&lt;BR /&gt;#compress&lt;BR /&gt;&lt;BR /&gt;# packages drop log rotation information into this directory&lt;BR /&gt;include /etc/logrotate.d&lt;BR /&gt;&lt;BR /&gt;# no packages own wtmp -- we'll rotate them here&lt;BR /&gt;/var/adm/wtmp {&lt;BR /&gt;    monthly&lt;BR /&gt;    create 0664 adm adm&lt;BR /&gt;    rotate 1&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;# system-specific logs may be also be configured here.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# ll /etc/logrotate.d&lt;BR /&gt;total 48&lt;BR /&gt;-rw-r--r--   1 root       sys             65 May 19  2004 maillog&lt;BR /&gt;-rw-r--r--   1 root       sys             65 Mar 14  2005 named.log&lt;BR /&gt;-rw-r--r--   1 root       sys            161 Aug 19  2004 syslog&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# cat /etc/logrotate.d/maillog&lt;BR /&gt;/var/adm/syslog/mail.log {&lt;BR /&gt;          rotate 5&lt;BR /&gt;          weekly&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# cat /etc/logrotate.d/named.log&lt;BR /&gt;/var/adm/named/named.log {&lt;BR /&gt;          rotate 5&lt;BR /&gt;          weekly&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;# cat /etc/logrotate.d/syslog&lt;BR /&gt;/var/adm/syslog/syslog.log {&lt;BR /&gt;    rotate 5&lt;BR /&gt;    weekly&lt;BR /&gt;    postrotate&lt;BR /&gt;        /usr/bin/kill -HUP `ps -ef |grep syslogd |awk '{print $2}'` || true&lt;BR /&gt;    endscript&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;And in cron:&lt;BR /&gt;&lt;BR /&gt;# logrotate&lt;BR /&gt;0 0 * * * /opt/logrotate/bin/logrotate /etc/logrotate.conf &amp;gt;/tmp/logrotate.cron 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
    <pubDate>Mon, 16 Jan 2006 16:46:28 GMT</pubDate>
    <dc:creator>Geoff Wild</dc:creator>
    <dc:date>2006-01-16T16:46:28Z</dc:date>
    <item>
      <title>can i delete the logs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-i-delete-the-logs/m-p/3710106#M251028</link>
      <description>hi friends,&lt;BR /&gt;can i delete the some log entries from /var/adm/syslog/syslog.log file.&lt;BR /&gt;&lt;BR /&gt;if yes, then how can i?&lt;BR /&gt;&lt;BR /&gt;thanks&lt;BR /&gt;bunty&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Jan 2006 10:58:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-i-delete-the-logs/m-p/3710106#M251028</guid>
      <dc:creator>bunty.....</dc:creator>
      <dc:date>2006-01-16T10:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: can i delete the logs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-i-delete-the-logs/m-p/3710107#M251029</link>
      <description>bunty,&lt;BR /&gt;syslog.log is used by some reporting tools, but old entries can be deleted.&lt;BR /&gt;You could use sam or tail records manually.&lt;BR /&gt;Example:&lt;BR /&gt;tail -1000 syslog.log &amp;gt; x.x&lt;BR /&gt;cp x.x syslog.log</description>
      <pubDate>Mon, 16 Jan 2006 11:02:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-i-delete-the-logs/m-p/3710107#M251029</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-01-16T11:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: can i delete the logs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-i-delete-the-logs/m-p/3710108#M251030</link>
      <description>I trim the syslog every day by going into SAM, routine tasks. Trim the syslog.log to its recommended size. This nulls the syslog.log having copied it to a file called syslog.SAMTRM, retaining only the most recent entries.&lt;BR /&gt;&lt;BR /&gt;But in your case, I would leave the syslog.log alone until your disc is working - you might need to refer to it. Talking of which, you haven't told us how you're getting on with that disc in a while.&lt;BR /&gt;&lt;BR /&gt;Mark Syder (like the drink but spelt different)</description>
      <pubDate>Mon, 16 Jan 2006 11:03:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-i-delete-the-logs/m-p/3710108#M251030</guid>
      <dc:creator>MarkSyder</dc:creator>
      <dc:date>2006-01-16T11:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: can i delete the logs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-i-delete-the-logs/m-p/3710109#M251031</link>
      <description>Use SAM &amp;gt; Routine Tasks &amp;gt; System Log Files or you can reboot the system.  During the reboot, the syslog file is copied to OLDsyslog and a new one is started.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Mon, 16 Jan 2006 11:05:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-i-delete-the-logs/m-p/3710109#M251031</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2006-01-16T11:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: can i delete the logs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-i-delete-the-logs/m-p/3710110#M251032</link>
      <description>Bunty ,&lt;BR /&gt;&lt;BR /&gt;You should not delete the file , but you can nulligy the log files to recover space.&lt;BR /&gt;&lt;BR /&gt;# &amp;gt; /var/adm/syslog/syslog.log&lt;BR /&gt;# &amp;gt; /var/adm/syslog/mail.log&lt;BR /&gt;&lt;BR /&gt;Enjoy ,&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;Raj.</description>
      <pubDate>Mon, 16 Jan 2006 12:29:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-i-delete-the-logs/m-p/3710110#M251032</guid>
      <dc:creator>Raj D.</dc:creator>
      <dc:date>2006-01-16T12:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: can i delete the logs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-i-delete-the-logs/m-p/3710111#M251033</link>
      <description>Here's what I do to clean up ftp for example (I'm not using default ftp - so no one chirp in about ftp -l in inetd.conf).&lt;BR /&gt;&lt;BR /&gt;# cat get-rid-of-ftp-syslog&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;&lt;BR /&gt;# script to zero out the syslog and make a bacup of it without ftp logs&lt;BR /&gt;# gwild&lt;BR /&gt;DIR=/var/adm/syslog&lt;BR /&gt;&lt;BR /&gt;cp -p $DIR/syslog.log $DIR/syslog.log.bak&lt;BR /&gt;&amp;gt; $DIR/syslog.log&lt;BR /&gt;&lt;BR /&gt;sed -n '/ftp/!p' $DIR/syslog.log.bak &amp;gt; $DIR/syslog.log.noftp.`date +%b%d%H%M`&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Also, logrotate may help you as well:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.ee.ualberta.ca/hppd/hpux/Sysadmin/logrotate-2.5/" target="_blank"&gt;http://hpux.ee.ualberta.ca/hppd/hpux/Sysadmin/logrotate-2.5/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Jan 2006 14:52:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-i-delete-the-logs/m-p/3710111#M251033</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2006-01-16T14:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: can i delete the logs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-i-delete-the-logs/m-p/3710112#M251034</link>
      <description>BTW - the logrotate even works on HP-UX Itanium.&lt;BR /&gt;&lt;BR /&gt;I configured like so:&lt;BR /&gt;&lt;BR /&gt;# cat /etc/logrotate.conf&lt;BR /&gt;# see "man logrotate" for details&lt;BR /&gt;# rotate log files weekly&lt;BR /&gt;weekly&lt;BR /&gt;&lt;BR /&gt;# keep 4 weeks worth of backlogs&lt;BR /&gt;rotate 5&lt;BR /&gt;&lt;BR /&gt;# create new (empty) log files after rotating old ones&lt;BR /&gt;create&lt;BR /&gt;&lt;BR /&gt;# uncomment this if you want your log files compressed&lt;BR /&gt;#compress&lt;BR /&gt;&lt;BR /&gt;# packages drop log rotation information into this directory&lt;BR /&gt;include /etc/logrotate.d&lt;BR /&gt;&lt;BR /&gt;# no packages own wtmp -- we'll rotate them here&lt;BR /&gt;/var/adm/wtmp {&lt;BR /&gt;    monthly&lt;BR /&gt;    create 0664 adm adm&lt;BR /&gt;    rotate 1&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;# system-specific logs may be also be configured here.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# ll /etc/logrotate.d&lt;BR /&gt;total 48&lt;BR /&gt;-rw-r--r--   1 root       sys             65 May 19  2004 maillog&lt;BR /&gt;-rw-r--r--   1 root       sys             65 Mar 14  2005 named.log&lt;BR /&gt;-rw-r--r--   1 root       sys            161 Aug 19  2004 syslog&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# cat /etc/logrotate.d/maillog&lt;BR /&gt;/var/adm/syslog/mail.log {&lt;BR /&gt;          rotate 5&lt;BR /&gt;          weekly&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# cat /etc/logrotate.d/named.log&lt;BR /&gt;/var/adm/named/named.log {&lt;BR /&gt;          rotate 5&lt;BR /&gt;          weekly&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;# cat /etc/logrotate.d/syslog&lt;BR /&gt;/var/adm/syslog/syslog.log {&lt;BR /&gt;    rotate 5&lt;BR /&gt;    weekly&lt;BR /&gt;    postrotate&lt;BR /&gt;        /usr/bin/kill -HUP `ps -ef |grep syslogd |awk '{print $2}'` || true&lt;BR /&gt;    endscript&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;And in cron:&lt;BR /&gt;&lt;BR /&gt;# logrotate&lt;BR /&gt;0 0 * * * /opt/logrotate/bin/logrotate /etc/logrotate.conf &amp;gt;/tmp/logrotate.cron 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Mon, 16 Jan 2006 16:46:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-i-delete-the-logs/m-p/3710112#M251034</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2006-01-16T16:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: can i delete the logs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-i-delete-the-logs/m-p/3710113#M251035</link>
      <description>yes, u can.&lt;BR /&gt;1. touch /var/adm/syslog/syslog.log&lt;BR /&gt;2. chmod 644 /var/adm/syslog/syslog.log&lt;BR /&gt;3. /usr/sbin/syslogd -D</description>
      <pubDate>Mon, 16 Jan 2006 20:42:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-i-delete-the-logs/m-p/3710113#M251035</guid>
      <dc:creator>rodh_z</dc:creator>
      <dc:date>2006-01-16T20:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: can i delete the logs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-i-delete-the-logs/m-p/3710114#M251036</link>
      <description>Hi Bunty.&lt;BR /&gt;==&lt;BR /&gt;You can backup it by tar command&lt;BR /&gt;#tar cvf /path/newfile /var/adm/syslog/syslog.log&lt;BR /&gt;Trim file:&lt;BR /&gt;#&amp;gt;/var/adm/syslog/syslog.log&lt;BR /&gt;But I highly recommend you use logrotate&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Sysadmin/logrotate-2.5/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Sysadmin/logrotate-2.5/&lt;/A&gt;&lt;BR /&gt;to rotate your log.&lt;BR /&gt;========================&lt;BR /&gt;your question is the same as:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=991878" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=991878&lt;/A&gt;&lt;BR /&gt;pls find other and my answer !&lt;BR /&gt;HTH&lt;BR /&gt;tienna</description>
      <pubDate>Tue, 17 Jan 2006 01:46:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-i-delete-the-logs/m-p/3710114#M251036</guid>
      <dc:creator>Nguyen Anh Tien</dc:creator>
      <dc:date>2006-01-17T01:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: can i delete the logs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-i-delete-the-logs/m-p/3710115#M251037</link>
      <description>Hi Bunty, &lt;BR /&gt;Here a good ksh script found on this forum some time ago. It rotate log files based on size, lifespan, It allow compression, manage the "old" files log generated by the system (eg OLDsyslog.log vs syslog.log), the number of copies to maintain, the security parameters to be applied to the files with chmod and chown. You can easily add or remove the log files which you wish to manage.  This script already contains the majority of the basic hpux 11.11 log files. It is simple, easy to adapt and deserves to be examined.&lt;BR /&gt;Regards, Joel</description>
      <pubDate>Tue, 17 Jan 2006 03:08:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-i-delete-the-logs/m-p/3710115#M251037</guid>
      <dc:creator>Joel Girot</dc:creator>
      <dc:date>2006-01-17T03:08:48Z</dc:date>
    </item>
  </channel>
</rss>

