System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Null out /var/adm/messages file

SOLVED
Go to solution
David Land
Frequent Advisor

Null out /var/adm/messages file

Is it OK to /dev/null out the /var/adm/messages file or will this cause issues?
5 REPLIES
RickT_1
Valued Contributor
Solution

Re: Null out /var/adm/messages file

David,

Why don't you copy it to a new name like messages.old and gzip it up. It wont cause any issues to delete it, but you will lose any messages that may be useful in trouble shooting your system.

Rick
Bill Hassell
Honored Contributor

Re: Null out /var/adm/messages file

/var/adm contains mostly logfiles and they normally grow unbounded. That means that you must make regular checks for files that are growing fast and make a copy of the information for business audits and truncate the files. The copies can then be compressed using compress or gzip, typically to less than 1/4 of their original size. Depending on your audit requirements, you may need to keep the old logs for 6 months, maybe longer. Be sure to look in /var/adm/syslog.

You should be checking daily or perhaps weekly to monitor log files. OR: you write a script to do this for you, or download a copy of logrotate:

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/logrotate-3.7.9/



Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: Null out /var/adm/messages file

/var/adm/messages is a Linux file, did you mean the corresponding HP-UX files?
Bill Hassell
Honored Contributor

Re: Null out /var/adm/messages file

Actually, the man page for dmesg has suggested /var/adm/messages since the early 1990's. I always thought it was an odd choice and use /var/adm/dmesg.log which seems more natural.


Bill Hassell, sysadmin
David Land
Frequent Advisor

Re: Null out /var/adm/messages file

Thanks to you guys. I will back it up and then null it out.