log rotate

hi ,
what is the meaning of log rotate?

how do i rotate /var/adm/wtmps log and gzip it?

on which os do you work?

solaris and hp-ux

on Solaris:
make sure there is a /etc/logadm.conf (comes with SUNWcsr) with the correct syntax mentioned of the file you want to automatically rotate.
The daemon is called logadm (comes with SUNWcsr) and needs to be started (through cron)

cron:
10 3 * * * /usr/sbin/logadm

logadm.conf:
/var/adm/messages -C 4 -P 'Tue Oct 7 01:10:00 2008' -a 'kill -HUP `cat /var/run/syslog.pid`'

Please keep in mind that large log files and log file rotating can be time consuming:

Options which control the expiration of old logfiles:
(default is: -C10 if no -A, -C, or -S)
-A age expire logs older than age
-C count expire old logs until count remain
-E cmd run cmd on file to expire
-S size expire until space used is below size
-T pattern pattern for finding old logs

Hope that helps
/pete

logadm is only on solaris 9 and 10 not on older versions...

i don't know if there is something like logadm on hp-ux.

Try
logrotate-2.5

which is a port of linux code for HPUX. I do not believe there is a native HPUX facility for this.

thanks alot guys!
appreciate alot!..