Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

** Beginner Question ** How to extend logging to 90 days in /var/adm/messages

33 views
Skip to first unread message

underh20

unread,
Dec 18, 2009, 2:21:49 PM12/18/09
to
Hello,

Our server is running Solaris 10 (03/08). By default, our /var/adm/
messages
file gets to keep 7 days of logs data and new file "messages.*" is
created to keep the previous week of logs data All together there are
a month of logs data kept, i.e., messages.0,1,2,3 in the server. See
below.

We'd need to have /var/adm/messages to keep 90 days of logs data and
new file "messages.*" is created to keep 90 days of logs data each.
There will be messages.0, 1, 2, 3 in the /var/adm directory and each
will contain 90 days of logs data.

Could anyone show me how to do this ? Thanks, Bill

$ date
Fri Dec 18 14:07:46 EST 2009
$
$ ls -lt /var/adm/messages*
-rw-r--r-- 1 root root 10615 Dec 18 14:07 /var/adm/
messages
-rw-r--r-- 1 root root 156320 Dec 18 02:27 /var/adm/
messages.0
-rw-r--r-- 1 root root 156946 Dec 11 02:27 /var/adm/
messages.1
-rw-r--r-- 1 root root 158008 Dec 4 02:29 /var/adm/
messages.2
-rw-r--r-- 1 root root 156470 Nov 27 02:24 /var/adm/
messages.3

Oscar del Rio

unread,
Dec 18, 2009, 2:42:38 PM12/18/09
to
underh20 wrote:

> We'd need to have /var/adm/messages to keep 90 days of logs data and
> new file "messages.*" is created to keep 90 days of logs data each.
> There will be messages.0, 1, 2, 3 in the /var/adm directory and each
> will contain 90 days of logs data.
>
> Could anyone show me how to do this ? Thanks, Bill

man logadm
logadm -h

grep messages /etc/logadm.conf # to check current settings

Example but you better understand the syntax before you try it!!!

logadm -C 4 -p 90d -a 'pkill -HUP syslogd' -w /var/adm/messages

Nomen Publicus

unread,
Dec 18, 2009, 3:08:35 PM12/18/09
to
underh20 <underh20.s...@gmail.com> wrote:
> Hello,
>
> Our server is running Solaris 10 (03/08). By default, our /var/adm/
> messages
> file gets to keep 7 days of logs data and new file "messages.*" is
> created to keep the previous week of logs data All together there are
> a month of logs data kept, i.e., messages.0,1,2,3 in the server. See
> below.
>
> We'd need to have /var/adm/messages to keep 90 days of logs data and
> new file "messages.*" is created to keep 90 days of logs data each.
> There will be messages.0, 1, 2, 3 in the /var/adm directory and each
> will contain 90 days of logs data.
>
> Could anyone show me how to do this ? Thanks, Bill
>

The log files are managed by logadm. The man page explains.

>
>
> $ date
> Fri Dec 18 14:07:46 EST 2009
> $
> $ ls -lt /var/adm/messages*
> -rw-r--r-- 1 root root 10615 Dec 18 14:07 /var/adm/
> messages
> -rw-r--r-- 1 root root 156320 Dec 18 02:27 /var/adm/
> messages.0
> -rw-r--r-- 1 root root 156946 Dec 11 02:27 /var/adm/
> messages.1
> -rw-r--r-- 1 root root 158008 Dec 4 02:29 /var/adm/
> messages.2
> -rw-r--r-- 1 root root 156470 Nov 27 02:24 /var/adm/
> messages.3

--
Gods dont kill people. People with Gods kill people. -- David Viaene

0 new messages