1752780 Members
6166 Online
108789 Solutions
New Discussion юеВ

Re: /var getting full

 
SOLVED
Go to solution
Md. Minhaz Khan
Super Advisor

/var getting full

Dear Experts,

Suddenly i have got sendmail[820]: NOQUEUE: low on space (have 91, SMTP-DAEMON needs 101 in ....) messages in my console. bdf output shows that /var is 100%. then i have followed below steps:

Step 1: Trim below logs
=======

> /var/adm/btmp (note use of >, not rm)
> /var/adm/cron/OLDlog
> /var/adm/cron/log
> /var/adm/lp/log
> /var/adm/sulog
> /var/adm/syslog/mail.log
> /var/adm/syslog/OLDsyslog.log
> /var/adm/syslog/syslog.log (check for error messages before nulling syslog)
> /var/adm/wtmp




Step 2:
=======

Run below command:

Check if you have superseded patches installed.

# cleanup -p -c1

# cleanup -c1 --->This command will clean up superced patch files from
"/var/adm/sw/save" locatio

Step 3:
=====
# rm /var/spool/mqueue/*


But i have also found some other files under "/var/tmp/" directory like "/var/tmp/hp/newpatch" & there are many files. My query is can i delete all files & folders under "/var/tmp/hp/", "/var/tmp/hp/newpatch", "/var/tmp/hp/depot" directory using "rm" commands ??

BR
Minhaz

3 REPLIES 3
James R. Ferguson
Acclaimed Contributor

Re: /var getting full

Hi:

By definition, '/var/tmp' is intended for use by non-root users for creating temporary files. As such, you are free to 'rm' files from this directory.

Regards!

...JRF...
Bill Hassell
Honored Contributor
Solution

Re: /var getting full

Find out where your space is actually used by running this command:

du -kx /var | sort -rn | head -30

These arfe the biggest directories. It's always better to search for big directories first. You may find a massive amount of space used by the diagnostic logs due to a problems with the hardware, or you might find a disabled printer that has dozens or jobs queued.

Post the results and we can provide better choices for cleaning up /var. NOTE: /var and /tmp require regular maintenance (cleaning out junki files, etc).

The /var/tmp/hp directory was created by a sysadmin and is probably not needed anymore. Check with the sysadmin to see if these depots have already been installed and are not used by other HP-UX systems.


Bill Hassell, sysadmin
Md. Minhaz Khan
Super Advisor

Re: /var getting full

Thanks a lot

BR
Minhaz