Operating System - HP-UX
1834149 Members
2244 Online
110064 Solutions
New Discussion

Re: /var file system almost full

 
SOLVED
Go to solution
Roberto Volsa
Frequent Advisor

/var file system almost full

Hello,
i want to obtain more space in /var file system.
I see that there are those directorie (whit used space):
/var/stm/logs/os 257 Mb
/var/adm/wtmp 122 Mb
/var/adm/sw/save 210 Mb
Is it possible to empty stm, wtmp and sw/save directories without problems for the system?

Thanks in advance

Roberto
9 REPLIES 9
Alex Glennie
Honored Contributor
Solution

Re: /var file system almost full

the following covers most safe options the clleanup facility is a definite must try !

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x18b2e7613948d5118fef0090279cd0f9,00.html
Robert-Jan Goossens
Honored Contributor

Re: /var file system almost full

Hi Roberto,

You could check if you can remove superseded patches.

# man cleanup

# cleanup -p -c 1

Robert-Jan.
Marco Santerre
Honored Contributor

Re: /var file system almost full

If you've done everything that you needed to with /var/adm/wtmp, I would certainly put a /dev/null to it, especially at this size.

I would also, like everyone else has said, look into the cleanup to cleanup up all superseded patches and your save directory.

As for the os logs, well I do clean mine from time to time, but I try to keep the recent ones.
Cooperation is doing with a smile what you have to do anyhow.
Jose Mosquera
Honored Contributor

Re: /var file system almost full

Hi,

This will be you useful to determine which files are occupying more space inside the /var directory:

du -akx /var|sort -nr|more

Rgds.
Michael Steele_2
Honored Contributor

Re: /var file system almost full

In addition to what Jose has suggested also determine if someone else is using /var than the O/S. Use:

quot /var

...to determine this. Anything other than root, admin, lp, etc. should be verified.

A lot of time people use /var as storage for the strangest stuff, like daily reports from cron scripts about applications stats.
Support Fatherhood - Stop Family Law
Michael Steele_2
Honored Contributor

Re: /var file system almost full

Ooops. I meant to mention trimming /var logs via SAM.

sam / routine tasks / system logs

...select wtmp for instance and let SAM do it for you.
Support Fatherhood - Stop Family Law
Rita C Workman
Honored Contributor

Re: /var file system almost full

Hmmm...Alex has probably pointed you to the recommended thing to check.

Here's a couple other things.
wtmp & btmp in /var/adm report the last login/last badlogin info. So if you don't need everything here you can trim it.
Using SAM and doing a trim on your system log files would be a good idea. SAM/Routine Tasks/Trim Files. As well as the mentioned 'cleanup' utility for cleaning up old patch info that will not change.

Now I might ask...do you have any software that logs to /var? Something like maybe OmniBack (/var/opt/ommni/*log) or others you might check for -
..or what about printing - are you taking up alot of space on /var/spool? Maybe you could move /var/spool to it's own mountpoint and free up /var.

Another place to clean up is /var/preserve. This directory often gets things left hanging and can be readily cleaned up..since it's just a temp directory the system dumps things while it's running...go ahead and get rid of the old stuff.

Just a couple thoughts,
Rita



Ray Carlson
Frequent Advisor

Re: /var file system almost full

What OS are you running? I have a couple of machines running 10.20 that periodically fill up /var because the diagnostics logs continuously. The activity log in /var/stm/logs/sys gets extremely large. What logs are you seeing in /var/stm/logs/os? Mine has the memlog. If this is you case also, then you may have a problem with your memory. After you investigate that, then you could reduce its size and save at least 250Mb of space.
Ray
Ken Hubnik_2
Honored Contributor

Re: /var file system almost full

There also seems to be alot of stuff end up in /var/tmp that can be cleaned up.

cleanup -c 1 will cleanup the old patch sets.