Step - 1
Using an appropriate editor, modify the /etc/syslog.conf file to contain the following line:
Here are different examples:
*.info /var/log/syslog.log rotate size 1m files 10
or
*.info /root/syslog/syslog.out rotate compress time 1d files 15
Or
auth.info /var/log/syslog.log rotate size 1m files 10
or
auth.info @syslog01servername
or
auth.info @tripwireservername
Where syslog01servername is windows syslog server.
Note: where /var/log/syslog.log is the location and name of the Syslog file. The Syslog file is rotated when it becomes larger than 1 megabyte (MB) and the number of rotated files is limited to 10.
Note: Use the TAB key to separate priority, destination, and rotation parameters. Spaces do not work.
Step – 2
Using touch command create an empty # touch /var/log/syslog.log ⤶
At a command prompt, refresh the syslog daemons, enter
# lssrc –a |grep syslogd ⤶
# refresh -s syslogd ⤶
root@nimserver(root/syslog)#ls -ltr
total 656
-rw-r--r-- 1 root system 79213 Mar 20 17:40 syslog.out.5.Z
-rw-r--r-- 1 root system 76309 Mar 21 17:40 syslog.out.4.Z
-rw-r--r-- 1 root system 74531 Mar 22 17:40 syslog.out.3.Z
-rw-r--r-- 1 root system 74549 Mar 23 17:40 syslog.out.2.Z
-rw-r--r-- 1 root system 72031 Mar 24 17:41 syslog.out.1.Z
-rw-r--r-- 1 root system 74717 Mar 25 17:41 syslog.out.0.Z
-rw-r--r-- 1 root system 3008 Mar 26 10:43 syslog.out
root@nimserver(root/syslog)#
No comments:
Post a Comment