<?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: Tracking log files in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/tracking-log-files/m-p/2553782#M28477</link>
    <description>Hi Chris:&lt;BR /&gt;&lt;BR /&gt;My approach for concatenating the individual files together would be the same.  HOWEVER, the 'tail' function has a limited buffer.  You will find a 500-line specification is sometimes excessive and you will end up with quite a bit less.  You could do the following:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;L=`wc -l &amp;lt; /var/adm/syslog/syslog.log`&lt;BR /&gt;let L=$L-500&lt;BR /&gt;sed "1,${L}d" /var/adm/syslog/syslog.log &amp;gt; /tmp/syslog&lt;BR /&gt;&lt;BR /&gt;In this case, /tmp/syslog will truly contain the last 500 lines of the original.&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Tue, 17 Jul 2001 14:16:05 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2001-07-17T14:16:05Z</dc:date>
    <item>
      <title>Tracking log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tracking-log-files/m-p/2553776#M28471</link>
      <description>Hello all,&lt;BR /&gt;&lt;BR /&gt;How can i take all the system log files that my hp system creates daily and view them all thru one local file?  The files that I want to view in one central file are the following;&lt;BR /&gt;&lt;BR /&gt;/var/adm/sulog&lt;BR /&gt;/var/adm/messages&lt;BR /&gt;/var/adm/syslog/syslog.log (view last 500 lines)&lt;BR /&gt;/var/adm/syslog/mail.log (view last 500 lines)&lt;BR /&gt;/var/adm/cron/log  (view last 24 hours)&lt;BR /&gt;/var/adm/log/backupfs.log (view last 500 lines)&lt;BR /&gt;&lt;BR /&gt;Has anyone done this before?  Is there an easy way to do this?&lt;BR /&gt;&lt;BR /&gt;Please advise?  thanks,&lt;BR /&gt;&lt;BR /&gt;Chris&lt;BR /&gt;chrisam@rocketmail.com</description>
      <pubDate>Tue, 17 Jul 2001 13:39:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tracking-log-files/m-p/2553776#M28471</guid>
      <dc:creator>Vito Sarducci</dc:creator>
      <dc:date>2001-07-17T13:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: Tracking log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tracking-log-files/m-p/2553777#M28472</link>
      <description>I forgot to ask, is there any HP utility or program that does this that i can download and install?&lt;BR /&gt;&lt;BR /&gt;Any help is appreciated?&lt;BR /&gt;&lt;BR /&gt;Chris&lt;BR /&gt;chrisam@rocketmail.com</description>
      <pubDate>Tue, 17 Jul 2001 13:41:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tracking-log-files/m-p/2553777#M28472</guid>
      <dc:creator>Vito Sarducci</dc:creator>
      <dc:date>2001-07-17T13:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: Tracking log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tracking-log-files/m-p/2553778#M28473</link>
      <description>You could write a script to do something like this????&lt;BR /&gt;&lt;BR /&gt;###begin script&lt;BR /&gt;log=/var/adm/logs.tmp&lt;BR /&gt;cat /var/adm/sulog &amp;gt; $log &lt;BR /&gt;cat /var/adm/messages &amp;gt;&amp;gt; $log&lt;BR /&gt;tail -500 /var/adm/syslog/syslog.log &amp;gt;&amp;gt; $log &lt;BR /&gt;tail -500 /var/adm/syslog/mail.log &amp;gt;&amp;gt; $log&lt;BR /&gt;cat /var/adm/cron/log &amp;gt;&amp;gt; $log &lt;BR /&gt;tail -500 /var/adm/log/backupfs.log &amp;gt;&amp;gt; $log&lt;BR /&gt;more $log&lt;BR /&gt;rm $log&lt;BR /&gt;##end script&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;...jcd...</description>
      <pubDate>Tue, 17 Jul 2001 13:46:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tracking-log-files/m-p/2553778#M28473</guid>
      <dc:creator>Joseph C. Denman</dc:creator>
      <dc:date>2001-07-17T13:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: Tracking log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tracking-log-files/m-p/2553779#M28474</link>
      <description>There is no HP software / utility to do what you want to do.  I would write a simple script that will take the parts of each logfile that you want to view and write it to another file.  By the way, there is no /var/adm/messages on HP-UX, that is a solaris file.  The equivalent is /var/adm/syslog/syslog.log on HP-UX.&lt;BR /&gt;&lt;BR /&gt;An example:&lt;BR /&gt;mylogfile=mylogfile.`date +%m%d%Y`&lt;BR /&gt;echo "****************/var/adm/sulog****************" &amp;gt; $mylogfile&lt;BR /&gt;cat /var/adm/sulog &amp;gt;&amp;gt; $mylogfile&lt;BR /&gt;echo "" &amp;gt;&amp;gt; $mylogfile&lt;BR /&gt;echo "*******************/var/adm/syslog/syslog.log*********" &amp;gt;&amp;gt; $mylogfile&lt;BR /&gt;tail -500 /var/adm/syslog/syslog.log &amp;gt;&amp;gt; $mylogfile&lt;BR /&gt;echo "" &amp;gt;&amp;gt; $mylogfile&lt;BR /&gt;echo "*******************/var/adm/syslog/mail.log***********" &amp;gt;&amp;gt; $mylogfile&lt;BR /&gt;tail -500 /var/adm/syslog/mail.log &amp;gt;&amp;gt; $mylogfile&lt;BR /&gt;echo "" &amp;gt;&amp;gt; $mylogfile&lt;BR /&gt;echo "*******************/var/adm/cron/log*************" &amp;gt;&amp;gt; $mylogfile&lt;BR /&gt;tail -500 /var/adm/cron/log &amp;gt;&amp;gt; $mylogfile&lt;BR /&gt;echo "" &amp;gt;&amp;gt; $mylogfile&lt;BR /&gt;echo "**************/var/adm/log/backupfs.log**************" &amp;gt;&amp;gt; $mylogfile&lt;BR /&gt;tail -500 /var/adm/log/backupfs.log &amp;gt;&amp;gt; $mylogfile&lt;BR /&gt;&lt;BR /&gt;Now you have everything in one file.  If you want to e-mail the file to yourself add in the script:&lt;BR /&gt;&lt;BR /&gt;mailx -s "Daily log file report"  Your_email@whatever.com &amp;lt; $mylogfile&lt;BR /&gt;&lt;BR /&gt;Hope this helps.</description>
      <pubDate>Tue, 17 Jul 2001 13:51:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tracking-log-files/m-p/2553779#M28474</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2001-07-17T13:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: Tracking log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tracking-log-files/m-p/2553780#M28475</link>
      <description>Hi Chris:&lt;BR /&gt;&lt;BR /&gt;Everything except the cron log is quite easy:&lt;BR /&gt;&lt;BR /&gt;T1=/tmp/myfile&lt;BR /&gt;cat var/adm/sulog &amp;gt; $T1 &lt;BR /&gt;cat /var/adm/messages &amp;gt;&amp;gt; $T1&lt;BR /&gt;tail -n 500 /var/adm/syslog/syslog.log &amp;gt;&amp;gt; $T1&lt;BR /&gt;tail -n 500 /var/adm/syslog/mail.log &amp;gt;&amp;gt; $T1&lt;BR /&gt;tail -n 500 /var/adm/cron/log &amp;gt;&amp;gt; $T1 &lt;BR /&gt;tail -n /var/adm/log/backupfs.log &amp;gt;&amp;gt; $T1&lt;BR /&gt;&lt;BR /&gt;you can then vi/pg/more /tmp/myfile. &lt;BR /&gt;&lt;BR /&gt;This is not quite the perfect solution since it looks at the last 500 lines of the cron log rather than pattern matching for the first desired date and copying from that point on using awk, sed, perl, ... . I leave that as a student exercise.&lt;BR /&gt;&lt;BR /&gt;Regards, Clay</description>
      <pubDate>Tue, 17 Jul 2001 13:52:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tracking-log-files/m-p/2553780#M28475</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-07-17T13:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: Tracking log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tracking-log-files/m-p/2553781#M28476</link>
      <description>Hi Chris&lt;BR /&gt;&lt;BR /&gt;I would go with Patricks solution since you also get the headers at the start of each file contents to differentiate between what is what , sincee it will be a lot of Data. My script is also similar to the one.&lt;BR /&gt;&lt;BR /&gt;Manoj Srivastava</description>
      <pubDate>Tue, 17 Jul 2001 14:02:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tracking-log-files/m-p/2553781#M28476</guid>
      <dc:creator>MANOJ SRIVASTAVA</dc:creator>
      <dc:date>2001-07-17T14:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: Tracking log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tracking-log-files/m-p/2553782#M28477</link>
      <description>Hi Chris:&lt;BR /&gt;&lt;BR /&gt;My approach for concatenating the individual files together would be the same.  HOWEVER, the 'tail' function has a limited buffer.  You will find a 500-line specification is sometimes excessive and you will end up with quite a bit less.  You could do the following:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;L=`wc -l &amp;lt; /var/adm/syslog/syslog.log`&lt;BR /&gt;let L=$L-500&lt;BR /&gt;sed "1,${L}d" /var/adm/syslog/syslog.log &amp;gt; /tmp/syslog&lt;BR /&gt;&lt;BR /&gt;In this case, /tmp/syslog will truly contain the last 500 lines of the original.&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 17 Jul 2001 14:16:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tracking-log-files/m-p/2553782#M28477</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-07-17T14:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: Tracking log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tracking-log-files/m-p/2553783#M28478</link>
      <description>A bizarre approach to logfiles. Why not extract what you're really not interested in and display the res?&lt;BR /&gt;Try using xlogmaster.&lt;BR /&gt;&lt;A href="http://www.gnu.org/software/xlogmaster/" target="_blank"&gt;http://www.gnu.org/software/xlogmaster/&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 17 Jul 2001 15:43:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tracking-log-files/m-p/2553783#M28478</guid>
      <dc:creator>Ralf Hildebrandt</dc:creator>
      <dc:date>2001-07-17T15:43:42Z</dc:date>
    </item>
  </channel>
</rss>

