<?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: strange shell script problem... in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-shell-script-problem/m-p/3994843#M748998</link>
    <description>Hi again,&lt;BR /&gt;&lt;BR /&gt;how long does it last to create one log?&lt;BR /&gt;I thought about some weeks or months, so you've enough time to copy it!&lt;BR /&gt;Your log flies are about 40 MB, this is already a big log file, more would be much more unclear to check.&lt;BR /&gt;With the link I gave you, you can define when a file will be copied, so you can make copies to keep those data.&lt;BR /&gt;&lt;BR /&gt;V.&lt;BR /&gt;</description>
    <pubDate>Mon, 07 May 2007 05:26:14 GMT</pubDate>
    <dc:creator>V. Nyga</dc:creator>
    <dc:date>2007-05-07T05:26:14Z</dc:date>
    <item>
      <title>strange shell script problem...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-shell-script-problem/m-p/3994838#M748993</link>
      <description>I have 3 files on my system /UNIX/ and those are files for writing logs into them..&lt;BR /&gt;first it writes in one log info1.log and then writes to secong info2.log and then into 3rd.&lt;BR /&gt;&lt;BR /&gt;I wanto to save that logs..becouse once it reaches something like: ~40485796 bytes it starts writeing into second log..then once ir reaches ~40485796 bytes file size it goes to third..&lt;BR /&gt;&lt;BR /&gt;problem is that once it is finished with 3rd log it goes to 1st log and erase old data..I want to keep all those data..&lt;BR /&gt;&lt;BR /&gt;any help?</description>
      <pubDate>Mon, 07 May 2007 03:20:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-shell-script-problem/m-p/3994838#M748993</guid>
      <dc:creator>amonamon</dc:creator>
      <dc:date>2007-05-07T03:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: strange shell script problem...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-shell-script-problem/m-p/3994839#M748994</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;it seems to be a simple, good working 'logrotation'.&lt;BR /&gt;You could make a manuell copy of the files that already have reached ~40485796 bytes.&lt;BR /&gt;&lt;BR /&gt;If you want to make this automatically maybe this will help you:&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;HTH&lt;BR /&gt;Volkmar&lt;BR /&gt;</description>
      <pubDate>Mon, 07 May 2007 03:28:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-shell-script-problem/m-p/3994839#M748994</guid>
      <dc:creator>V. Nyga</dc:creator>
      <dc:date>2007-05-07T03:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: strange shell script problem...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-shell-script-problem/m-p/3994840#M748995</link>
      <description>it does rotate logs by itself..but I just want to have all those logs in one big daily log..</description>
      <pubDate>Mon, 07 May 2007 03:37:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-shell-script-problem/m-p/3994840#M748995</guid>
      <dc:creator>amonamon</dc:creator>
      <dc:date>2007-05-07T03:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: strange shell script problem...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-shell-script-problem/m-p/3994841#M748996</link>
      <description>hi amonamon ,&lt;BR /&gt;&lt;BR /&gt;maybe you can do this at end of line in the third files.&lt;BR /&gt;&lt;BR /&gt;cat info2.log &amp;gt;&amp;gt; info1.log;cat info3.log &amp;gt;&amp;gt; info1.log&lt;BR /&gt;&lt;BR /&gt;This will make all the log writes to info1.log&lt;BR /&gt;&lt;BR /&gt;And, Since the logs files are pretty big , i suggest you derived input for info2.log and info3.log.&lt;BR /&gt;&lt;BR /&gt;hope this helps</description>
      <pubDate>Mon, 07 May 2007 03:58:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-shell-script-problem/m-p/3994841#M748996</guid>
      <dc:creator>Apai</dc:creator>
      <dc:date>2007-05-07T03:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: strange shell script problem...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-shell-script-problem/m-p/3994842#M748997</link>
      <description>Check your script and if there is a line called find /dirname -size 40485796c change it to four times bigger than 40485796. So you will have bigger log size.&lt;BR /&gt;&lt;BR /&gt;Other way is to make another script on cron the logic of which should be to copy and compress the first two log files once the third one is started.</description>
      <pubDate>Mon, 07 May 2007 04:05:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-shell-script-problem/m-p/3994842#M748997</guid>
      <dc:creator>Rasheed Tamton</dc:creator>
      <dc:date>2007-05-07T04:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: strange shell script problem...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-shell-script-problem/m-p/3994843#M748998</link>
      <description>Hi again,&lt;BR /&gt;&lt;BR /&gt;how long does it last to create one log?&lt;BR /&gt;I thought about some weeks or months, so you've enough time to copy it!&lt;BR /&gt;Your log flies are about 40 MB, this is already a big log file, more would be much more unclear to check.&lt;BR /&gt;With the link I gave you, you can define when a file will be copied, so you can make copies to keep those data.&lt;BR /&gt;&lt;BR /&gt;V.&lt;BR /&gt;</description>
      <pubDate>Mon, 07 May 2007 05:26:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-shell-script-problem/m-p/3994843#M748998</guid>
      <dc:creator>V. Nyga</dc:creator>
      <dc:date>2007-05-07T05:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: strange shell script problem...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-shell-script-problem/m-p/3994844#M748999</link>
      <description>&lt;!--!*#--&gt;Sounds like a working syslog.&lt;BR /&gt;&lt;BR /&gt;When memory was more expensive,&lt;BR /&gt;and archiving required human intervention&lt;BR /&gt;(e.g. mounting a tape),&lt;BR /&gt;this was a convention for archiving mail streams and other queues.&lt;BR /&gt;&lt;BR /&gt;o Maintain 3 logs.&lt;BR /&gt;o Reuse the oldest of 3 logfiles.&lt;BR /&gt;o Archive the middle of the 3 logfiles.&lt;BR /&gt;o Notify the operator to change tapes.&lt;BR /&gt;&lt;BR /&gt;This could theoretically be done with 2 logfiles (active + standby),&lt;BR /&gt;but using 3 allowed backup to a slow archive mechanism before a double-high spike in activity exceeded the latest log size.&lt;BR /&gt;&lt;BR /&gt;ksh&amp;gt; TARD=/var/adm/logarchived&lt;BR /&gt;ksh&amp;gt; GLOB=/var/adm/logrotate*&lt;BR /&gt;ksh&amp;gt; find $GLOB \&lt;BR /&gt;&amp;gt; -newer $(ls -t1 "$TARD"|tail +2|head -1) \&lt;BR /&gt;&amp;gt; -exec tar {} ';' \&lt;BR /&gt;&amp;gt; -exec echo change tape '|' mail wheel ';'&lt;BR /&gt;ksh&amp;gt; # operator changes tape and then&lt;BR /&gt;ksh&amp;gt; touch "$TARD"&lt;BR /&gt;&lt;BR /&gt;Note that there are no quotes around $GLOB&lt;BR /&gt;in the find command.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The find command can be placed in a daily/weekly/... crontab.&lt;BR /&gt;The size limit was usually set by the archive media.&lt;BR /&gt;The number of logs was set by tradeoff between log memory available and tolerance for spikeness in log growth rate.&lt;BR /&gt;&lt;BR /&gt;The find command triggers when the middle file becomes newer than the last archive acknowledgement,&lt;BR /&gt;but must wait until the tar device is available.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hopefully helpful,&lt;BR /&gt;</description>
      <pubDate>Mon, 07 May 2007 14:41:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-shell-script-problem/m-p/3994844#M748999</guid>
      <dc:creator>drb_1</dc:creator>
      <dc:date>2007-05-07T14:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: strange shell script problem...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-shell-script-problem/m-p/3994845#M749000</link>
      <description>There is several ways to concatenate the files or create one "big-file"&lt;BR /&gt;(commands like cat, tail -f etc. see attachment) but this might make it all more messy.&lt;BR /&gt;&lt;BR /&gt;Initially you should check if log rotation and size is configurable in the application/program that generates the logfiles.&lt;BR /&gt;&lt;BR /&gt;Perhaps you easily can select to disable the log rotation and/or put a more reasonable size for your system.&lt;BR /&gt;&lt;BR /&gt;If you disable logrotation you must ensure to have cleanup routines to avoid running out of diskspace.&lt;BR /&gt;&lt;BR /&gt;/Tor-Arne</description>
      <pubDate>Tue, 08 May 2007 12:41:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-shell-script-problem/m-p/3994845#M749000</guid>
      <dc:creator>Tor-Arne Nostdal</dc:creator>
      <dc:date>2007-05-08T12:41:22Z</dc:date>
    </item>
  </channel>
</rss>

