Quick Solaris 9 question

Posted on 2005-03-09
Medium Priority
Last Modified: 2013-12-21
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.

# logadm ciscolog -z 1 /var/log/cisco.log \
> -a 'kill -HUP `cat /var/run/syslog-ng.pid`' \
> -t '/var/log/OLDLOGS/$basename.$
Question by:rick_me27
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Accepted Solution

Gugro earned 400 total points
ID: 13500327

you are missing the last '

# 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

Author Comment

ID: 13500453
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
LVL 48

Expert Comment

ID: 13500803
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.

Author Comment

ID: 13500809
I got it.  ha  My syntax was incorrect alright,.  

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month9 days, 9 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question