logadm on Solaris


If we want to administering log files on solaris, we can use logadm. Another option we also can use logrotate.
For example :
we have log files at /var/log/tinyproxy.log
1. we want to rotate log after reach 1MB.
# logadm -w /var/log/tinyproxy.log -s 1m

2. we want to rotate log every day.
# logadm -w /var/log/tinyproxy.log -p 1d

3. we want to keep until previous 10 day only.
# logadm -w /var/log/tinyproxy.log -C10

etc...

for more details, you should see logadm manual.
File configuration of logadm at /etc/logadm.conf

For default logadm run every morning 3:10 AM by crontab process.
You can see crontab list with this :
# crontab -e

If you just see number after running command above,
# crontab -e
713

you should define your editor profile.
# export EDITOR=vi
# crontab -e

Popular posts from this blog

Howto configure boot device order on ILOM

SAN Switch Config Command

Howto cstm on HP-UX