Hi all, i told you i m getting mainly prob with frequently growing 2 files /var/adm/messages OR /var/adm/wtmpx.
I got a solution for overgrowing wtmpx. Below is the line need to put in cronjob. it will empty wtmpx file after every 30 minutes.
30 * * * * su - root -c "cat /dev/null > /var/adm/wtmpx" > /dev/null 2>&1
I get it from sun solaris 8. Although i am using solaris 9 but hope line should work it also . However, can anyone tell me what is the value here "root -c" and "2>&1"??
Quote:
Originally Posted by thepurple
Hi soliberus,
I tried to delete first 100 lines of file messages with command # sed '1,100d' messages. But it is not working. Please see below.
bash-2.05# cat messages |wc -l
36948
bash-2.05# sed '1,100d' messages
bash-2.05# cat messages |wc -l
36949
bash-2.05#
And about 'wtmpx'- the file is not understanble to me  . So, i plan to delete only lines from 'messages'
bash-2.05# tail -f wtmpx
bgwftpftp10010'G4)192.168.210.35bgwftpftp10010G4)192.168.210.35bgwftpftp10012'G4)192.168.210.35bgwft pftp10011'4)192.168.210.42bgwftpftp10012G4)192.168.210.35bgwftpftp100114)192.168.210.42bgwftpftp1001 3'G4*192.168.210.35bgwftpftp10013G4*192.168.210.35bgwftpftp10014'G4+192.168.210.42bgwftpftp10014G4+1 92.168.210.42bgwftpftp10015'G4+192.168.210.37bgwftpftp10015G4+192.168.210.37bgwftpftp10016' G4+192.168.210.40bgwftpftp10016'G4+192.168.210.40bgwftpftp10017'!G4+192.168.210
bash-2.05# cat wtmpx |wc -l
13
Though it shows only 13 lines and lines are growing slowly but File size is growing to much fast.
|