Summary: gzip and logadm not playing nicely together

From: Christopher L. Barnard <cbarnar1_at_earthlink.net>
Date: Wed Oct 15 2008 - 20:01:18 EDT
I asked:

> Solaris 9 server.
>
> logadm.conf has line
> /var/log/syslog -C 8 -P 'Thu Oct  9 08:10:00 2008' -a 'kill -HUP `cat
> /var/run/syslog.pid`' -c -p 1d -z 2
>
> Note that these files are very large (on the order of 1gig in size  
> after
> 24 hours) so that is why they are rotated daily.
>
> syslog rotates to syslog.0 to syslog.1 just fine.  syslog.2.gz rotates
> to
> syslog.3.gz to syslog4.gz to syslog.5.gz to syslog.6.gz just fine.
>
> The server seems to lose its mind when it comes to rotating syslog.1  
> to
> syslog.2 and then compressing it.  I get every night:
>
> Date: Thu, 9 Oct 2008 03:10:18 -0500 (CDT)
> From: root on rushmail <root@rushmail.cc1.rpslmc.edu>
> To: root@rushmail.cc1.rpslmc.edu
> Subject: Output from "cron" command
>
> Your "cron" job on rushmail
> /usr/sbin/logadm
>
> produced the following output:
>
> logadm: Warning: command failed: /bin/gzip /var/log/syslog.2
> gzip: /var/log/syslog.2.gz already exists;	not overwritten
>
> When I log in I see that a zero-size syslog.2.gz exists, and .1 has  
> been
> rotated to .2.  So I manually delete the zero-size syslog.2.gz and
> compress syslog.2 every morning.  Does anyone know of what trick is
> needed
> to get this to work automatically?

The short answer:
patch 116016-06.

The long answer:
the fact that -c and -z do not initially behave themselves together is  
documented in
http://sunsolve.sun.com/search/document.do?assetkey=1-1-4885799-1

Unfortunately that did not do the trick.  I opened a Sun Case ID and  
they suggested I apply this patch.  This patch actually implements  
this workaround, but also several other bug fixes.

Thanks to:
  	ghicks@cadence.com
  	mh1272@gmail.com
	florkle@yahoo.com (Who gave me the sunsolve link)
	Crist.Clark@globalstar.com
	DRoss-Smith@reviewjournal.com
  	hvjunk@gmail.com

Christopher L. Barnard
cbarnar1@earthlink.net
-----------------------------------------------------------------------
  When I was a boy, I was told that anyone could be president.  Now I am
  beginning to believe it.                            -- Clarence Darrow
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Wed Oct 15 20:04:14 2008

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:44:12 EST