<?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: How to trim the logfiles with active process writing to? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708540#M613349</link>
    <description>I have always been a fan of he truncate function in perl.</description>
    <pubDate>Wed, 03 Nov 2010 19:51:39 GMT</pubDate>
    <dc:creator>Court Campbell</dc:creator>
    <dc:date>2010-11-03T19:51:39Z</dc:date>
    <item>
      <title>How to trim the logfiles with active process writing to?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708527#M613336</link>
      <description>Hi all, I am trying to zero the size of long running session logs from rootsh, but it seems to be impossible untill the process is active. I tried to run cat /dev/null &amp;gt; &lt;LOGFILE&gt; but the logsize remains unchanged. Any ideas on how to deal with this? &lt;BR /&gt;&lt;BR /&gt;Thanks, Aldis&lt;/LOGFILE&gt;</description>
      <pubDate>Wed, 03 Nov 2010 08:37:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708527#M613336</guid>
      <dc:creator>Aldis Black</dc:creator>
      <dc:date>2010-11-03T08:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to trim the logfiles with active process writing to?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708528#M613337</link>
      <description>Hi..&lt;BR /&gt;&lt;BR /&gt;How about using only the "&amp;gt;" symbol.&lt;BR /&gt;Eg.&lt;BR /&gt;# &amp;gt; /var/adm/syslog/syslog.log</description>
      <pubDate>Wed, 03 Nov 2010 09:00:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708528#M613337</guid>
      <dc:creator>R.K. #</dc:creator>
      <dc:date>2010-11-03T09:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to trim the logfiles with active process writing to?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708529#M613338</link>
      <description>Nope. Still the same.</description>
      <pubDate>Wed, 03 Nov 2010 09:12:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708529#M613338</guid>
      <dc:creator>Aldis Black</dc:creator>
      <dc:date>2010-11-03T09:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to trim the logfiles with active process writing to?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708530#M613339</link>
      <description>Hi Aldis, &lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;export today=`date -u +%b%d`&lt;BR /&gt;cd /var/adm/syslog&lt;BR /&gt;#&lt;BR /&gt;cat syslog.log |grep Logging |mailx -s "trim syslog"  root&lt;BR /&gt;# Copy active file to old directory&lt;BR /&gt;cat syslog.log &amp;gt;./old.syslog/$today.syslog&lt;BR /&gt;cat mail.log &amp;gt;./old.maillog/$today.maillog&lt;BR /&gt;# Initialize active file&lt;BR /&gt;&amp;gt;syslog.log&lt;BR /&gt;&amp;gt;mail.log&lt;BR /&gt;# Delete file(s) older than 120 days from old directory&lt;BR /&gt;find /var/adm/syslog/old.syslog/ -mtime +120 -exec rm {} \;&lt;BR /&gt;find /var/adm/syslog/old.maillog/ -mtime +120 -exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;Hope this will help you.&lt;BR /&gt;&lt;BR /&gt;Prashant&lt;BR /&gt;</description>
      <pubDate>Wed, 03 Nov 2010 09:19:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708530#M613339</guid>
      <dc:creator>Prashantj</dc:creator>
      <dc:date>2010-11-03T09:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to trim the logfiles with active process writing to?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708531#M613340</link>
      <description>Hi Prashant, Unfortunately it doesn't help as the commands used in the script (&amp;gt;logfile) seem to be not working on my logs as discussed above.</description>
      <pubDate>Wed, 03 Nov 2010 09:24:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708531#M613340</guid>
      <dc:creator>Aldis Black</dc:creator>
      <dc:date>2010-11-03T09:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to trim the logfiles with active process writing to?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708532#M613341</link>
      <description>&lt;!--!*#--&gt;Hi Again,&lt;BR /&gt;&lt;BR /&gt;Try copying /dev/null over the log file. Also see if you can find any option in sam.&lt;BR /&gt;&lt;BR /&gt;Refer:&lt;BR /&gt;&lt;A href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1033864" target="_blank"&gt;http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1033864&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 03 Nov 2010 09:28:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708532#M613341</guid>
      <dc:creator>R.K. #</dc:creator>
      <dc:date>2010-11-03T09:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to trim the logfiles with active process writing to?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708533#M613342</link>
      <description>Hi Aldis, &lt;BR /&gt;&lt;BR /&gt;Can u share the output of below commands&lt;BR /&gt;&lt;BR /&gt;1)pwd ( where '&amp;gt;'not working )&lt;BR /&gt;2)echo $SHELL&lt;BR /&gt;3)ll /var/adm/syslog/syslog.log&lt;BR /&gt;4)id&lt;BR /&gt;5)check bdf output, if any filsystem reach 99%&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;Prashant</description>
      <pubDate>Wed, 03 Nov 2010 09:34:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708533#M613342</guid>
      <dc:creator>Prashantj</dc:creator>
      <dc:date>2010-11-03T09:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to trim the logfiles with active process writing to?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708534#M613343</link>
      <description>Hi R.K. # ,&lt;BR /&gt;&lt;BR /&gt;the cp /dev/null &lt;LOGFILE&gt; does not work here as well. Strange thing is that right after running any of the previously mentioned commands the filesize changes to zero bytes for a few seconds and then goes back to the previous value... any clue?&lt;/LOGFILE&gt;</description>
      <pubDate>Wed, 03 Nov 2010 09:45:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708534#M613343</guid>
      <dc:creator>Aldis Black</dc:creator>
      <dc:date>2010-11-03T09:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to trim the logfiles with active process writing to?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708535#M613344</link>
      <description>What is this log file actually related to?&lt;BR /&gt;Any application or OS?</description>
      <pubDate>Wed, 03 Nov 2010 09:46:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708535#M613344</guid>
      <dc:creator>R.K. #</dc:creator>
      <dc:date>2010-11-03T09:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to trim the logfiles with active process writing to?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708536#M613345</link>
      <description>&amp;gt;then goes back to the previous value... any clue?&lt;BR /&gt;&lt;BR /&gt;If the writer is tracking where he thinks the file position is and writes to that position, you can't change that.</description>
      <pubDate>Wed, 03 Nov 2010 09:47:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708536#M613345</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-11-03T09:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to trim the logfiles with active process writing to?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708537#M613346</link>
      <description>This are the logfiles of rootsh (keystroke logging tool). Looks like it is tracking the file indeed - just tried to move the logfile and it keeps writing to it anyway! &lt;BR /&gt;Still i need to find a way to trim those files as the users keep the sessions open for several days and the logfiles grow fast. Please advise!</description>
      <pubDate>Wed, 03 Nov 2010 10:08:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708537#M613346</guid>
      <dc:creator>Aldis Black</dc:creator>
      <dc:date>2010-11-03T10:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to trim the logfiles with active process writing to?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708538#M613347</link>
      <description>Hi Aldis:&lt;BR /&gt;&lt;BR /&gt;# &amp;gt; filename&lt;BR /&gt;&lt;BR /&gt;or:&lt;BR /&gt;&lt;BR /&gt;# cat /dev/null &amp;gt; filename&lt;BR /&gt;&lt;BR /&gt;If no process is using the file, it will be reduced to a size of zero.&lt;BR /&gt;&lt;BR /&gt;If a process is using the file, then this will return disk blocks to the system but will not change the length of the file that the process with the file open "sees". Rather the file will be sparse with nulls at its beginning. This is generally not an issue for log files.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 03 Nov 2010 11:19:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708538#M613347</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-11-03T11:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to trim the logfiles with active process writing to?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708539#M613348</link>
      <description>&amp;gt; just tried to move the logfile and it keeps writing to it anyway! &lt;BR /&gt;&lt;BR /&gt;Does rootsh accept a HUP signal?&lt;BR /&gt;&lt;BR /&gt;# mv logfile logfile-old &lt;BR /&gt;(the logfile-old is still open and written to)&lt;BR /&gt;&lt;BR /&gt;# kill -HUP rootsh-PID &lt;BR /&gt;(The -HUP signal *might* make the rootsh start a new logfile under the original name)&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 03 Nov 2010 12:14:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708539#M613348</guid>
      <dc:creator>TTr</dc:creator>
      <dc:date>2010-11-03T12:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to trim the logfiles with active process writing to?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708540#M613349</link>
      <description>I have always been a fan of he truncate function in perl.</description>
      <pubDate>Wed, 03 Nov 2010 19:51:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-trim-the-logfiles-with-active-process-writing-to/m-p/4708540#M613349</guid>
      <dc:creator>Court Campbell</dc:creator>
      <dc:date>2010-11-03T19:51:39Z</dc:date>
    </item>
  </channel>
</rss>

