rick_me27
asked on
Quick Solaris 9 question
I am following these instructions for syslog and log rotation but I am stuck what to put next after the > prompt. See at the bottom.
The following command example will configure the rotation of the /var/log/pix.log file:
# logadm pixlog –z 1 /var/log/pix.log \
-a 'kill -HUP `cat /var/run/syslog-ng.pid`' \
-t '/var/log/OLDLOGS/$basenam e.$
The log file is configured to rotate based upon the default size and time restrictions (>1 byte and older than 1 week), all but the last rotated log will be compressed using gzip, the old log files will rotate to the directory /var/log/OLDLOGS and the command “kill –HUP `cat /var/run/syslog-ng.pid`” will be run after log file has been rotated and the new log file created.
MY SOLARIS TERM
# logadm ciscolog -z 1 /var/log/cisco.log \
> -a 'kill -HUP `cat /var/run/syslog-ng.pid`' \
> -t '/var/log/OLDLOGS/$basenam e.$
>
The following command example will configure the rotation of the /var/log/pix.log file:
# logadm pixlog –z 1 /var/log/pix.log \
-a 'kill -HUP `cat /var/run/syslog-ng.pid`' \
-t '/var/log/OLDLOGS/$basenam
The log file is configured to rotate based upon the default size and time restrictions (>1 byte and older than 1 week), all but the last rotated log will be compressed using gzip, the old log files will rotate to the directory /var/log/OLDLOGS and the command “kill –HUP `cat /var/run/syslog-ng.pid`” will be run after log file has been rotated and the new log file created.
MY SOLARIS TERM
# logadm ciscolog -z 1 /var/log/cisco.log \
> -a 'kill -HUP `cat /var/run/syslog-ng.pid`' \
> -t '/var/log/OLDLOGS/$basenam
>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Your syntax is incorrect. You are specifying to rotate the files:
pixlog and .z
which obviously don't exist.
You should look at the sample entries in /etc/logadm.conf to see the correct syntax. In particular the entry for /var/log/messages.
pixlog and .z
which obviously don't exist.
You should look at the sample entries in /etc/logadm.conf to see the correct syntax. In particular the entry for /var/log/messages.
ASKER
I got it. ha My syntax was incorrect alright,.
ASKER
and I'm trying to get Logsentry running on this box.
# logadm pixlog .z 1 /var/log/pix.log \
> -a 'kill -HUP `cat /var/run/syslog-ng.pid`' \
> -t '/var/log/OLDLOGS/$basenam
logadm: Warning: pixlog: No such file or directory
logadm: Warning: .z: No such file or directory
logadm: Warning: 1: No such file or directory
#