Summary: gzip and logadm not playing nicely together

From: Christopher L. Barnard <>
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/`' -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 <>
> To:
> 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

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: (Who gave me the sunsolve link)

Christopher L. Barnard
  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
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