<?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: log files in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/log-files/m-p/4135091#M316769</link>
    <description>Hi Ali,&lt;BR /&gt;&lt;BR /&gt;Are you sure you are on a HPUX box?&lt;BR /&gt;&lt;BR /&gt;usunx08 &lt;BR /&gt;&lt;BR /&gt;If this a sun try&lt;BR /&gt;&lt;BR /&gt;# /etc/init.d/cron stop&lt;BR /&gt;# /etc/init.d/cron start&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Robert-Jan&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 24 Jan 2008 17:05:09 GMT</pubDate>
    <dc:creator>Robert-Jan Goossens</dc:creator>
    <dc:date>2008-01-24T17:05:09Z</dc:date>
    <item>
      <title>log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/log-files/m-p/4135083#M316761</link>
      <description>I need some information about the log files. If they grow big, how can you truncate them. I had a cron log file in /var/adm/cron/log. I coppied it to oldlog and removed the original one. Then created another log file with the same name and sets of permissions, but cron is not writing to it. Can any one help me in this regard.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Ali</description>
      <pubDate>Thu, 24 Jan 2008 16:23:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/log-files/m-p/4135083#M316761</guid>
      <dc:creator>Ali Imran Abbas</dc:creator>
      <dc:date>2008-01-24T16:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/log-files/m-p/4135084#M316762</link>
      <description>You need to stop and restart your cron process:&lt;BR /&gt;&lt;BR /&gt;/sbin/init.d/cron stop&lt;BR /&gt;/sbin/init.d/cron start&lt;BR /&gt;&lt;BR /&gt;In the future, I would suggest using SAM to trim your log files.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 24 Jan 2008 16:26:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/log-files/m-p/4135084#M316762</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2008-01-24T16:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/log-files/m-p/4135085#M316763</link>
      <description>Use&lt;BR /&gt;&lt;BR /&gt;sam &lt;BR /&gt;-&amp;gt; routine tasks&lt;BR /&gt;-&amp;gt; system log files&lt;BR /&gt;(select the log)&lt;BR /&gt;-&amp;gt; Actions -&amp;gt; trim&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;but there are so many other ways too ...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;BUT never delete the file!</description>
      <pubDate>Thu, 24 Jan 2008 16:34:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/log-files/m-p/4135085#M316763</guid>
      <dc:creator>Torsten.</dc:creator>
      <dc:date>2008-01-24T16:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/log-files/m-p/4135086#M316764</link>
      <description>HEy ,&lt;BR /&gt;I tried doing this, but it gives me an error.&lt;BR /&gt;&lt;BR /&gt;usunx08:# cron stop&lt;BR /&gt;usunx08:# ! cron is already running Thu Jan 24 11:35:31 EST 2008&lt;BR /&gt;! ******* CRON ABORTED ******** Thu Jan 24 11:35:31 EST 2008&lt;BR /&gt;&lt;BR /&gt;usunx08:#&lt;BR /&gt;&lt;BR /&gt;Any suggestion in this regard?</description>
      <pubDate>Thu, 24 Jan 2008 16:36:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/log-files/m-p/4135086#M316764</guid>
      <dc:creator>Ali Imran Abbas</dc:creator>
      <dc:date>2008-01-24T16:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/log-files/m-p/4135087#M316765</link>
      <description>The log file that you removed was in "open" state by the cron daemon. You must NEVER remove an open file. Almost each and every time, removing an open file will hung the process that has that file open.&lt;BR /&gt;&lt;BR /&gt;In your case you must restart cron.&lt;BR /&gt;&lt;BR /&gt;In general before removing a file you check it using the "fuser" command. The fuser command will show you if the file is open and which process has it open.&lt;BR /&gt;&lt;BR /&gt;Some daemons will listen to a HUP signal to reread their config environment. These are syslogd, crond etc.&lt;BR /&gt;&lt;BR /&gt;The standard method for rolling a syslog log file is&lt;BR /&gt;&lt;BR /&gt;1) mv syslog.log syslog.log-old (the move command does not impact an open file. The new name is still open by the same process and still being logged on)&lt;BR /&gt;2) kill -HUP &lt;SYSLOG-PID&gt;&lt;BR /&gt;A new syslog.log will be created.&lt;BR /&gt;&lt;BR /&gt;Using this method, there is no interuption in the daemon coverage. If you restart a daemon you will have a 3-5 seconds of no-daemon service. It depends how critical you server environment is.&lt;/SYSLOG-PID&gt;</description>
      <pubDate>Thu, 24 Jan 2008 16:40:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/log-files/m-p/4135087#M316765</guid>
      <dc:creator>TTr</dc:creator>
      <dc:date>2008-01-24T16:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/log-files/m-p/4135088#M316766</link>
      <description>/sbin/init.d/cron stop&lt;BR /&gt;&lt;BR /&gt;/sbin/init.d/cron start</description>
      <pubDate>Thu, 24 Jan 2008 16:40:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/log-files/m-p/4135088#M316766</guid>
      <dc:creator>Torsten.</dc:creator>
      <dc:date>2008-01-24T16:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/log-files/m-p/4135089#M316767</link>
      <description>Ali,&lt;BR /&gt;&lt;BR /&gt;Not sure why you had problems.  This works for me:&lt;BR /&gt;&lt;BR /&gt;# /sbin/init.d/cron stop&lt;BR /&gt;cron stopped&lt;BR /&gt;# /sbin/init.d/cron start&lt;BR /&gt;cron started&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 24 Jan 2008 16:55:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/log-files/m-p/4135089#M316767</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2008-01-24T16:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/log-files/m-p/4135090#M316768</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Using the '/sbin/init.d/cron' script to stop and (re)start your cron daemon has the advantage that the current '/var/adm/cron/log' is moved to '/var/adm/cron/OLDlog' and the 'cron' daemon restarted when the script's argument is "start".  You can then compress or remove the 'OLDlog' as you see fit.&lt;BR /&gt;&lt;BR /&gt;There is NO PROBLEM with removing an open file!  In fact, it is a common technique to open a temporary file and immediately 'unlink()' it.  A file's disk space remains inuse until the last process referencing it terminates and the in-use count decrements to zero.  Moving a file with 'mv' retains the inode number of a file but allows its name to be changed.  Thus the association between a process and the inode remains and in the case of log files, the logging continues.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 24 Jan 2008 16:59:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/log-files/m-p/4135090#M316768</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-01-24T16:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/log-files/m-p/4135091#M316769</link>
      <description>Hi Ali,&lt;BR /&gt;&lt;BR /&gt;Are you sure you are on a HPUX box?&lt;BR /&gt;&lt;BR /&gt;usunx08 &lt;BR /&gt;&lt;BR /&gt;If this a sun try&lt;BR /&gt;&lt;BR /&gt;# /etc/init.d/cron stop&lt;BR /&gt;# /etc/init.d/cron start&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Robert-Jan&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 24 Jan 2008 17:05:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/log-files/m-p/4135091#M316769</guid>
      <dc:creator>Robert-Jan Goossens</dc:creator>
      <dc:date>2008-01-24T17:05:09Z</dc:date>
    </item>
  </channel>
</rss>

