Problems with logadm / syslog in Sol 9/10


 
Thread Tools Search this Thread
Operating Systems Solaris Problems with logadm / syslog in Sol 9/10
# 8  
Old 11-03-2008
OK, give me the output of `ls -l /var/adm /var/log`
# 9  
Old 11-04-2008
Code:
root@hostname# ls -l /var/adm /var/log
/var/adm:
total 420766
drwxrwxr-x   5 adm      adm          512 May  2  2006 acct
-rw-------   1 uucp     bin            0 Nov 24  2005 aculog
-rw-r--r--   1 root     root         662 Oct 30 02:00 dtmp
drwxr-xr-x   2 adm      adm          512 Nov 24  2005 exacct
-r--r--r--   1 root     other      57372 Nov  4 09:18 lastlog
drwxr-xr-x   2 adm      adm          512 Nov 24  2005 log
-rw-------   1 root     sys            0 Feb 28  2006 loginlog
-rw-r--r--   1 root     other          0 Feb 28  2006 loginlog.JASS.20060228160132
-rw-r--r--   1 root     root     5396617 Nov  4 09:18 messages
-rw-r--r--   1 root     root      864400 Jul 25 10:53 messages.0
-rw-r--r--   1 root     root     1125175 Jul 20 03:10 messages.1
-rw-r--r--   1 root     root     1136534 Jul 13 03:10 messages.2
-rw-r--r--   1 root     root     1123550 Jul  6 03:10 messages.3
-rw-r--r--   1 adm      adm      80212480 Jun 26  2006 pacct
-rw-r--r--   1 adm      adm      27484560 May 18  2006 pacct.0
-rw-r--r--   1 adm      adm      5973640 May  8  2006 pacct.1
-rw-r--r--   1 adm      adm         2480 Feb 28  2006 pacct.10
-rw-r--r--   1 adm      adm         2520 Feb 28  2006 pacct.11
-rw-r--r--   1 adm      adm       153960 Feb 28  2006 pacct.12
-rw-r--r--   1 adm      adm      3326320 May  5  2006 pacct.2
-rw-r--r--   1 adm      adm      1328440 May  4  2006 pacct.3
-rw-r--r--   1 adm      adm       709680 May  3  2006 pacct.4
-rw-r--r--   1 adm      adm         5480 May  2  2006 pacct.5
-rw-r--r--   1 adm      adm         2880 May  2  2006 pacct.6
-rw-r--r--   1 adm      adm        33680 Mar  3  2006 pacct.7
-rw-r--r--   1 adm      adm         4120 Feb 28  2006 pacct.8
-rw-r--r--   1 adm      adm         6760 Feb 28  2006 pacct.9
drwxr-xr-x   2 adm      adm          512 Nov 24  2005 passwd
drwxrwxr-x   2 adm      sys          512 Nov 24  2005 sa
drwxr-xr-x   2 root     sys          512 Nov 24  2005 sm.bin
-rw-rw-rw-   1 root     bin            0 Nov 24  2005 spellhist
drwxr-xr-x   2 root     sys          512 Nov 24  2005 streams
-rw-------   1 root     root       13926 Oct 27 13:01 sulog
-rw-r--r--   1 root     bin         3720 Nov  4 09:18 utmpx
-rw-r--r--   1 root     root           0 Nov 24  2005 vold.log
-rw-r--r--   1 adm      adm      86189796 Nov  4 09:18 wtmpx

/var/log:
total 528
-rw-------   1 root     sys         1553 Oct 22 21:32 authlog
-rw-r--r--   1 root     sys            0 Aug 26 09:03 cronlog
-rw-r--r--   1 root     sys            0 Aug 26 09:03 daemonlog
-rw-r--r--   1 root     root           7 Nov  4 08:32 driftfile
-rw-r--r--   1 root     sys            0 Aug 26 09:03 kernlog
-rw-r--r--   1 root     sys       114783 Nov  4 03:10 maillog
-rw-------   1 root     root       86521 Sep 23 14:10 rkhunter.log
drwxr-xr-x   2 root     root        2048 Nov  4 09:13 samba
-rw-------   1 root     root       40218 Oct 27 13:01 sudo.log
-rw-r--r--   1 root     other        457 Feb 27  2006 sysidconfig.log
-rw-r--r--   1 root     sys            0 Nov 24  2005 syslog
-rw-r--r--   1 root     root        5009 Feb 21  2008 ufsdump.log
-rw-r--r--   1 root     sys            0 Aug 26 09:03 userlog

The rotations that exist were prior to my modifications to /etc/syslog.conf and /etc/logadm.conf

I have done some additional investigation and discovered that the maillog rotation is occurring. Also, I did discover a spelling error in logadm.conf:
Code:
/var/adm/messages -a 'pkill -HUP `cat /var/run/syslog.pid`' -C 8 -s 10m

I've changed this to the following, and now it's rotating just fine:
Code:
/var/adm/messages -C 8 -P 'Mon Nov  3 20:27:38 2008' -a 'kill -HUP `cat /var/run/syslog.pid`;
echo `date` >> /var/adm/messages' -s 1m

(forced the break after the semicolon to improve display here)

Last edited by avronius; 11-04-2008 at 12:39 PM.. Reason: fixed typo
# 10  
Old 11-04-2008
Based on your original post the rest have not rotated because they have not yet hit the size requirement set in logadm.conf.
# 11  
Old 11-04-2008
Thanks for helping see through this seg - another set of eyes always helps!
Cheers,

- Avron
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Can't execute logadm proberly

Hello, I am trying to rotate my logs using logadm, so I did the following logadm -w /traces/mylogs.out -C 5 -p 1d -o user -g group -m 644 -c -t '/traces/mylogs.out.$n' -z 1 and then tried to test it by logadm -v and it gets stuck at truncation step # processing logname: /traces/mylogs.out... (5 Replies)
Discussion started by: eng_asa
5 Replies

2. Solaris

How to logrotate a file after X days with logadm?

Hi Guys - We have the /var/adm/pacct file currently configured to log rotate using logadm - here is the entry in logadm.conf: /var/adm/pacct -C 0 -N -P 'Wed Oct 23 08:00:00 2013' -a '/usr/lib/acct/accton pacct' -g adm -m 664 -o adm -p never Just want to ask if it would like possible to... (1 Reply)
Discussion started by: akaterasu
1 Replies

3. Shell Programming and Scripting

Logadm

I need to delete the logs using logadm command. we have application that generates to logs automatically with different dates every day like error_20121121.log and so on... using lodadm can i delete the logs of last 10 days using crontabentry? i am confuse here becasue if we use logadm what... (1 Reply)
Discussion started by: phani4u
1 Replies

4. Solaris

logadm rotates log every time

I'm running logadm manually to test and it seems to be rotating my /var/log/oracle/oracle_audit.log file every single time it's ran instead of rotating once it gets passed 10 gigs, any ideas? Here's the logadm.conf for reference. (0 Replies)
Discussion started by: thmnetwork
0 Replies

5. Solaris

LOGADM

Dear experts. I was wondering if logadm preserves ACL setuped on for instance, /var/log/authlog. From man : ...by creating an empty file whose owner, group ID, and permissions match the original file.... Is this ACL inclusive or i need to use -a option (run cmd after... (1 Reply)
Discussion started by: Peasant
1 Replies

6. Solaris

JASS - upgrading from Sol 9 to Sol 10

Do I need to reinstall/rerun JASS after upgrading from Sol9 to Sol10? Just wondered if the upgrade procedure overwrote any of the settings etc? (0 Replies)
Discussion started by: psychocandy
0 Replies

7. Solaris

Couple logadm questions

My logadm.conf is below. Is there a way to match a log file that appends the time/date stamp after the log file? Also, a 0 is being appended onto the files I'm compressing and having rotated. Is there a way to fix that? /var/apache/tomcat55/logs/catalina.out -C 30 -P 'Fri Jun 18 16:48:55... (5 Replies)
Discussion started by: LittleLebowski
5 Replies

8. UNIX for Advanced & Expert Users

luupgrade: Sol 8 -> Sol 10 u7 (5/09)

Greetings Forumers! I ran into an issue after running luupgrade on v880 running Solaris 8. I want to upgrade to Solaris 10. When I rebooted the system I noticed the file systems listed as such: # df -h Filesystem size used avail capacity Mounted on /dev/dsk/c1t1d0s0 ... (2 Replies)
Discussion started by: bluescreen
2 Replies

9. Solaris

logadm

I have a log file that I want to rotate each day without keeping old copies. how to achieve that? thx (3 Replies)
Discussion started by: melanie_pfefer
3 Replies

10. Solaris

logadm package

Does anyone know what package logadm is part of? It's not on my Solaris 9 machine, I presume because I only have a core installation. But I'd like to ad it. Any help would be appreciated. (1 Reply)
Discussion started by: syscity
1 Replies
Login or Register to Ask a Question