SUMMARY: /var/adm/messages file rotation

From: SURI, SONIA (SONIA) <strehan_at_lucent.com>
Date: Tue May 30 2006 - 05:51:34 EDT
All,

I think i looked more closing in the system behaviour and could make out on
my own how exactly is the messages file getting truncated, if we have
logadm.conf with just
-C, -P, and -a option.
As i was not initially able to find which argument is helping my file to get
truncated.
unless i use -S for size restriction which was not present.

So here is something what i found

The /var/adm/messages file is getting terminated on weekly basis at 3.10 am
every Sunday morning.
this behaviour is because of the cron put fro execution of newsyslog.

other confusion was if this cron executes at 3.10 why files, mesages.0,
messages.1 etc,  are not being made with time stamp of every Sunday 3.10 am

It actually depends on the content of the messages file which is getting
truncated.
every Sunday morning 3.10 newsy slog looks at the messages file if it is non
zero size it rotates it and the time stamp of this file being created is the
last content time stamp inside this file.
e.g. 
raw-r--r--   1 root             136 May 22 19:00 messages.0

this file was created by cron which had run on 28th May, Sunday morning at
3.10 but the content of the file is only one line which was written on 22nd
May at 1900 hrs, SO my file looks the way it is when i do the listing in
/var/adm

NOTE,

This observation i just mine after analysing few systems.
if you have some other comments or observation on this pls let me know.

Regards
Sonia.


-----Original Message-----
From: SURI, SONIA (SONIA) 
Sent: Monday, May 29, 2006 2:27 PM
To: sunmanagers@sunmanagers.org
Subject: /var/adm/messages file rotation


Hello All,

I have a Server on Solaris 9, I would like to understand how exactly is this
rotation of /var/adm/messages file happening,

I am putting my observation here:

1.The logadm.conf file has entry as follows:

/var/adm/messages -C 4 -P 'Sat May 27 22:10:00 2006' -a 'kill -HUP `cat
/var/run/syslog.pid`'

2.root cron as well have two entries as:

10 3 * * 0,4 /etc/cron.d/logchecker
10 3 * * 0   /usr/lib/newsyslog

3.the newsyslog looks like:

/usr/sbin/logadm /var/log/syslog /var/adm/messages

4.the listing in /var/adm/ looks like:

-rw-r--r--   1 root     root           0 May 28 03:10 messages
-rw-r--r--   1 root     root         136 May 22 19:00 messages.0
-rw-r--r--   1 root     root         314 May 17 13:21 messages.1
-rw-r--r--   1 root     root       32070 May 11 04:51 messages.2
-rw-r--r--   1 root     root        3703 Apr 27 12:31 messages.3

After seeing the listing in /var/adm/messages file, i am not able to make
out what is the bases for this rotation based on the logadm.conf file, -P
option , i could not understand this.
So could you give some hints.


regards
sonia.

The information contained in this e-mail message is privileged and
confidential and is for the exclusive use of the addressee. The person
who receives this message and who is not the addressee, one of his
employees or an agent entitled to hand it over to the addressee, is
informed that he may not use, disclose or reproduce the contents thereof.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Tue May 30 05:52:23 2006

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:58 EST