Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 768
  • Last Modified:

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/$basename.$

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/$basename.$
>
0
rick_me27
Asked:
rick_me27
  • 2
1 Solution
 
GugroCommented:
Hi,

you are missing the last '

MY SOLARIS TERM
# logadm ciscolog -z 1 /var/log/cisco.log \
> -a 'kill -HUP `cat /var/run/syslog-ng.pid`' \
> -t '/var/log/OLDLOGS/$basename.$'                                   <<<<<<<<<<<<< Add ' at end of line
>
0
 
rick_me27Author Commented:
you were right.  It did run but I got this output.  You definitley get the points.  Do you have any idea what this means.  I'm so new to Unix I'm not sure.
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/$basename.$'
logadm: Warning: pixlog: No such file or directory
logadm: Warning: .z: No such file or directory
logadm: Warning: 1: No such file or directory
#
0
 
TintinCommented:
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.
0
 
rick_me27Author Commented:
I got it.  ha  My syntax was incorrect alright,.  
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now