1829403 Members
2275 Online
109991 Solutions
New Discussion

Cleanup /var File System

 
walztoni
Occasional Contributor

Cleanup /var File System

Our /var FS seems to be slowly filling up. I am wondering if there's some routine cleanup maintenance that I should be doing. The directory "/var/opt/sanmgr/commandview/server/logs/performance/" looks like it contains lots of daily log files. How can these files be removed? Manually, with command view or some other way? Thanks.
4 REPLIES 4
Robert-Jan Goossens
Honored Contributor

Re: Cleanup /var File System

Hi,

Have a look at this doc.

Title: CommandView SDM update from version 1.06 - CPU utilization 100%

Europe
http://www4.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000079977288

US
http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000079977288

Regards,
Robert-Jan
Bill Thorsteinson
Honored Contributor

Re: Cleanup /var File System

I generally install logrotate and
configure it to cleanup old log files.

I am also starting to deploy cfengine
and use its tidy option to remove old
files.

Eeither option could be applied in this case.
Ivan Ferreira
Honored Contributor

Re: Cleanup /var File System

Have you verified the directory that uses more space with the du command?

cd /var
du -xsk *

Check for mailboxes that never was readed also. Patch files can also use a lot of space.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
MarkSyder
Honored Contributor

Re: Cleanup /var File System

Check the following daily:

/var/adm/btmp (bad user logins)
/var/adm/sulog
/var/adm/wtmp
/var/adm/cron (log and OLDlog)
/var/adm/lp (log and OLDlog)
/var/adm/syslog (syslog.log, mail.log, and OLD versions of both).

If btmp gets large trim it using SAM (after making sure you've checked who made the bad login attempts). Trim wtmp periodically. Trim syslog.log after you've scanned it for errors/warnings.

Run cleanup -c1 to remove old patches.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing