<?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 trimm /var/adm/wtmps in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/trimm-var-adm-wtmps/m-p/4779824#M390876</link>
    <description>Hi guys,&lt;BR /&gt;&lt;BR /&gt;we have an HP-UX box, where space consumed by wtmps file is almost 500MB. I'll trimm this file, but first need to make an acsii backup of that.&lt;BR /&gt;&lt;BR /&gt;I have followed the procedure and converted binary database into an ascii file. Problem here is, that even ascii file is not readable.&lt;BR /&gt;&lt;BR /&gt;Have you an experience with something like that?</description>
    <pubDate>Wed, 20 Apr 2011 16:03:52 GMT</pubDate>
    <dc:creator>Ignite_2</dc:creator>
    <dc:date>2011-04-20T16:03:52Z</dc:date>
    <item>
      <title>trimm /var/adm/wtmps</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trimm-var-adm-wtmps/m-p/4779824#M390876</link>
      <description>Hi guys,&lt;BR /&gt;&lt;BR /&gt;we have an HP-UX box, where space consumed by wtmps file is almost 500MB. I'll trimm this file, but first need to make an acsii backup of that.&lt;BR /&gt;&lt;BR /&gt;I have followed the procedure and converted binary database into an ascii file. Problem here is, that even ascii file is not readable.&lt;BR /&gt;&lt;BR /&gt;Have you an experience with something like that?</description>
      <pubDate>Wed, 20 Apr 2011 16:03:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trimm-var-adm-wtmps/m-p/4779824#M390876</guid>
      <dc:creator>Ignite_2</dc:creator>
      <dc:date>2011-04-20T16:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: trimm /var/adm/wtmps</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trimm-var-adm-wtmps/m-p/4779825#M390877</link>
      <description>You can copy wtmp as wtmp.old (if you really wants to keep that file)&lt;BR /&gt;you can use last command to read it..&lt;BR /&gt;last -f wtmp.old&lt;BR /&gt;&lt;BR /&gt;use cat /dev/null &amp;gt;/var/adm/wtmp to create new wtmp&lt;BR /&gt;-USA..</description>
      <pubDate>Wed, 20 Apr 2011 16:19:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trimm-var-adm-wtmps/m-p/4779825#M390877</guid>
      <dc:creator>Uday_S_Ankolekar</dc:creator>
      <dc:date>2011-04-20T16:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: trimm /var/adm/wtmps</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trimm-var-adm-wtmps/m-p/4779826#M390878</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Problem here is, that even ascii file is not readable.&lt;BR /&gt;&lt;BR /&gt;How is it not readable?  If you mean that the file is too large for 'vi' then say that.  Is it?&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 20 Apr 2011 16:19:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trimm-var-adm-wtmps/m-p/4779826#M390878</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-04-20T16:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: trimm /var/adm/wtmps</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trimm-var-adm-wtmps/m-p/4779827#M390879</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;maybe it's too large. But, shouldn't it be readable using "cat" or "more"? &lt;BR /&gt;&lt;BR /&gt;vi has opened the file for me, but the content was in same unreadable format as using "more".</description>
      <pubDate>Wed, 20 Apr 2011 16:24:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trimm-var-adm-wtmps/m-p/4779827#M390879</guid>
      <dc:creator>Ignite_2</dc:creator>
      <dc:date>2011-04-20T16:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: trimm /var/adm/wtmps</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trimm-var-adm-wtmps/m-p/4779828#M390880</link>
      <description>I'm stunned that you want to make an ascii backup.  What's wrong with a binary backup when the 'last -f old_filename' command is all you need?&lt;BR /&gt;&lt;BR /&gt;'last' is really the only command that relies upon /var/adm/wtempx.  Note the 'x', and not the 's'.&lt;BR /&gt;&lt;BR /&gt;Use can try 'strings' command on binary files, and,&lt;BR /&gt;&lt;BR /&gt;You've mispelled /var/adm/wtmps, it should be either /var/adm/wtmp, which is obsolete /var/adm/wtmpx which has replaced wtmp and is what you should be looking at. (* I believe *)&lt;BR /&gt;&lt;BR /&gt;See man page for 'last' or wtmp or wtmpx.</description>
      <pubDate>Wed, 20 Apr 2011 17:06:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trimm-var-adm-wtmps/m-p/4779828#M390880</guid>
      <dc:creator>Michael Steele_2</dc:creator>
      <dc:date>2011-04-20T17:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: trimm /var/adm/wtmps</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trimm-var-adm-wtmps/m-p/4779829#M390881</link>
      <description>I'm sorry, and stunned at my self for giving you information about wtmp and wtpmx that applies to solaris and not hp-ux.&lt;BR /&gt;&lt;BR /&gt;Please disregard those comments.&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
      <pubDate>Wed, 20 Apr 2011 17:26:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trimm-var-adm-wtmps/m-p/4779829#M390881</guid>
      <dc:creator>Michael Steele_2</dc:creator>
      <dc:date>2011-04-20T17:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: trimm /var/adm/wtmps</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trimm-var-adm-wtmps/m-p/4779830#M390882</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I just made a fresh copy of wtmps to test functionality of last -f ...&lt;BR /&gt;&lt;BR /&gt;# cp wtmps /tmp/wtmps.backup&lt;BR /&gt;# last -f /tmp/wtmps.backup&lt;BR /&gt;pid exceeds MAXPID: wtmp file corrupted&lt;BR /&gt;&lt;BR /&gt;- how could it be corrupted, when running "last" without specifying file works. ..but:&lt;BR /&gt;&lt;BR /&gt;# last -f /var/adm/wtmps | more&lt;BR /&gt;pid exceeds MAXPID: wtmp file corrupted</description>
      <pubDate>Wed, 20 Apr 2011 17:39:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trimm-var-adm-wtmps/m-p/4779830#M390882</guid>
      <dc:creator>Ignite_2</dc:creator>
      <dc:date>2011-04-20T17:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: trimm /var/adm/wtmps</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trimm-var-adm-wtmps/m-p/4779831#M390883</link>
      <description>&lt;BR /&gt;&amp;gt; Problem here is, that even ascii file is not readable&lt;BR /&gt;you can use 'strings' command to view binary files, but it will only show readable texts...use last command instead...&lt;BR /&gt;&lt;BR /&gt;&amp;gt; but first need to make an acsii backup &lt;BR /&gt;no need to take ascii backup, just move the file with date postfix for future reference and echo /dev/null the original file..&lt;BR /&gt;&lt;BR /&gt;&amp;gt; pid exceeds MAXPID: wtmp file corrupted&lt;BR /&gt;may be the file is corrupted... try on fresh file.. it should work just fine...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt; we have an HP-UX box, where space consumed by wtmps file is almost 500MB&lt;BR /&gt;use below script to trim the file regularly using cron jobs&lt;BR /&gt;&lt;BR /&gt;TMP=/var/adm/wtmp/wtmp_`date +%d`_`date +%m`_`date +%Y`_`date +%H`_`date +%M`.log&lt;BR /&gt;cp -f -p /var/adm/wtmp.log $TMP&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 21 Apr 2011 07:47:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trimm-var-adm-wtmps/m-p/4779831#M390883</guid>
      <dc:creator>Hiren N Dave</dc:creator>
      <dc:date>2011-04-21T07:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: trimm /var/adm/wtmps</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trimm-var-adm-wtmps/m-p/4779832#M390884</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;Apart from various Shell scripts,&lt;BR /&gt;why not use logrotate:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Sysadmin/logrotate-3.7.9/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Sysadmin/logrotate-3.7.9/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Here is what I use for logrotate.conf&lt;BR /&gt;on my HP-UX servers:&lt;BR /&gt;&lt;BR /&gt;# sample logrotate configuration file&lt;BR /&gt;compress&lt;BR /&gt;&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 `cat /var/run/syslog.pid`&lt;BR /&gt;    endscript&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;/var/adm/syslog/mail.log {&lt;BR /&gt;    rotate 5&lt;BR /&gt;    weekly&lt;BR /&gt;    postrotate&lt;BR /&gt;        /usr/bin/kill -HUP `cat /var/run/syslog.pid`&lt;BR /&gt;    endscript&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;/var/adm/syslog/vseassist.log {&lt;BR /&gt;    rotate 12&lt;BR /&gt;    monthly&lt;BR /&gt;    missingok&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;/var/adm/sw/swverify.log {&lt;BR /&gt;    rotate 5&lt;BR /&gt;    weekly&lt;BR /&gt;    postrotate&lt;BR /&gt;        /sbin/init.d/swagentd stop&lt;BR /&gt;        /sbin/init.d/swagentd start&lt;BR /&gt;    endscript&lt;BR /&gt;}&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 12&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;/var/adm/wtmps {&lt;BR /&gt;    monthly&lt;BR /&gt;    create 0664 adm adm&lt;BR /&gt;    rotate 12&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;/var/opt/wbem/*.log {&lt;BR /&gt;    monthly&lt;BR /&gt;    rotate 2&lt;BR /&gt;    olddir /var/opt/wbem/prevmonth&lt;BR /&gt;    missingok&lt;BR /&gt;    postrotate&lt;BR /&gt;        /sbin/init.d/cim_server stop&lt;BR /&gt;        /sbin/init.d/cim_server start&lt;BR /&gt;    endscript&lt;BR /&gt;    nocompress&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;VK2COT&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Apr 2011 08:01:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trimm-var-adm-wtmps/m-p/4779832#M390884</guid>
      <dc:creator>VK2COT</dc:creator>
      <dc:date>2011-04-22T08:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: trimm /var/adm/wtmps</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trimm-var-adm-wtmps/m-p/4779833#M390885</link>
      <description>&amp;gt;I have followed the procedure and converted binary database into an ascii file.&lt;BR /&gt;&lt;BR /&gt;What procedure?  fwtmp(1M)?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;that even ascii file is not readable.&lt;BR /&gt;&lt;BR /&gt;Then your procedure is wrong.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;last -f /tmp/wtmps.backup&lt;BR /&gt;pid exceeds MAXPID: wtmp file corrupted&lt;BR /&gt;&lt;BR /&gt;You need to read last(1) carefully.  You also need -X.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;how could it be corrupted, when running "last" without specifying file works.&lt;BR /&gt;&lt;BR /&gt;Because last(1) is "broken" and didn't change its default work on wtmps files with -f.</description>
      <pubDate>Sat, 23 Apr 2011 14:49:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trimm-var-adm-wtmps/m-p/4779833#M390885</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-04-23T14:49:35Z</dc:date>
    </item>
  </channel>
</rss>

