Tech Support > Operating Systems > UNIX / Variants > How to set /var/adm/messages.* file recycle period to 90 days -BEGINNER QUESTION
How to set /var/adm/messages.* file recycle period to 90 days -BEGINNER QUESTION
Posted by underh20.scubadiving@gmail.com on April 29th, 2008


How does one change the logging recycle period for the /var/adm/
messages.* file at a Solaris 8 server ? We need to keep messages.* for
over 90 days before creating a new messages.* file . Currently, they
are being overwritten in about 7 to 14 days.


$ ls -lt mess*
-rw--- 1 root other 114062 Apr 29 13:46 messages
-rw--- 1 root other 385135 Apr 27 02:46 messages.0
-rw--- 1 root other 374198 Apr 20 03:05 messages.1
-rw--- 1 root other 372558 Apr 13 02:52 messages.2
-rw--- 1 root other 373193 Apr 6 02:51 messages.3

We need to keep each message for 90 days before another messages.* is
created :

-rw--- 1 root other ********* Apr 29 13:46 messages
-rw--- 1 root other *********Jan 27 02:46 messages.0
-rw--- 1 root other ********* Oct 20 03:05 messages.1
-rw--- 1 root other ********* Jul 13 02:52 messages.2
-rw--- 1 root other ********* Apr 6 02:51 messages.3


Thanks,

Bill

Posted by Oscar del Rio on April 29th, 2008


underh20.scubadiving@gmail.com wrote:
Solaris 8 uses a shell script /usr/lib/newsyslog running from root's cron.
The script takes care of /var/adm/messages and /var/log/syslog files.
Edit the script and/or change the cron job schedule.

crontab -l


Similar Posts