BB Unix Network Monitor - Message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: {bb} Solaris 9 messages test



Modify the /var/adm/messages line of the /etc/logadm.conf file as follows (this is all on one line):


/var/adm/messages -C 4 -P 'Sun May 29 08:10:00 2005' -a 'kill -HUP `cat /var/run/syslog.pid`; /bin/logger -plocal0.notice System log rotated'


Basically just add the logger command after the kill -HUP command.  This puts the message "System log rotated" into the empty messages file. Do a man on logadm if you want to know how logadm works.  (FYI - Your date after the -P will be different.)

Paul

On Thu, 2005-06-02 at 11:08, PAUL WILLIAMSON wrote:
> I see that in solaris 9, Sun has bestowed their wonderful knowledge 
> on us lowly sys admins that the log rotation is now a binary.
> 
> My typical modification is a statement in /usr/lib/newsyslog:
> 
> echo `date "+%b %e %T"` `uname -n` newsyslog: message log rotated >
> $LOG
> 
> And that gives me all I need.  We log to the local messages file as
> well 
> as to a remote syslog server.  With this new binary approach, do I 
> need to modify the default cron entry to call a shell script that 
> calls logadm and then echos the above line out to the log file, 
> or am I missing something?
> 
> Thanks,
> Paul 
> 
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
> To unsubscribe from this list, or to subscribe to the bb-digest list
> send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
> subscribe bb-digest in the BODY of the message.
> 

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.


Home | Main Index | Thread Index