Operating System - HP-UX
1832185 Members
3741 Online
110038 Solutions
New Discussion

Can I Nullify one directory in /var?

 
SOLVED
Go to solution
apple
Super Advisor

Can I Nullify one directory in /var?

Dear HPUX Gurus,
We always hit the /var full.
i run this command to check the file size:
# find /var -xdev -size +2048
/var/opt/ignite/recovery/arch.include
can i nullify this file? hope to hear from you
6 REPLIES 6
apple
Super Advisor

Re: Can I Nullify one directory in /var?

can i nullify this this file also?
/var/adm/cron/log/OLDlog
i'm afraid to nullify any important file. where can i find the usage of this directories? whether can i nullify it or need to backup first? hope to hear from you
Kapil Jha
Honored Contributor
Solution

Re: Can I Nullify one directory in /var?

Hello
generally for ignite backups people have different filesystem which is different from /var.
/var/opt/ignite/recovery/arch.include this files contain listing of all the files to be backed up.So better to make another filesystem , if you are backing up more servers on this machine.
/var/adm/cron/log/ you can remove because they just contain info about all the command run by run.If logs are very big null them and restart the cron.
lsof /var would help you find , all the big files open and consuming space which u can not see by bdf.

Hope ths help
Kapil













can i nullify this this file also?
/var/adm/cron/log/OLDlog
i'm afraid to nullify any important file. where can i find the usage of this directories? whether can i nullify it or need to backup first? hope to hear from you
I am in this small bowl, I wane see the real world......
apple
Super Advisor

Re: Can I Nullify one directory in /var?

Dear HPUX Gurus,
Thank you for the reply. get better understanding about the /var file trimming. would really appreciate if you can share the how do you keep your /var or any other file system in good shape? do you schedule cron job to clear some disc space? hope to hear frm you. thanks a bundle
Bill Hassell
Honored Contributor

Re: Can I Nullify one directory in /var?

The LAST thing you look for are big files. You look for big directories since there might thousands of small file in one directory. The command is called du. Analyze the /var directory and sort the directories by size like this:

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

/var is a variable directory and there are many uses for the space. /var should be quite large, several GB as a minimum but it all depends on what you do with your system. If you set it up as an Ignite network server, you may need 200 to 500 GB for /var. Do you use a lot of HP-UX email? Run a lot of very large print jobs?

There is no simple answer except daily checks using bdf and du. That is the (thankless) job of the system administrator. You can automate this task with scripts but you must first find where most of the space is located. Then truncate or remove unnecessary files.

Disks are too cheap to have disk space affect the reliability of your system. Add more disks and then split the very large directories into separate mountpoints. Typical mountpoints are:

/var/adm
/var/adm/sw
/var/mail
/var/spool
/var/opt/ignite


Bill Hassell, sysadmin
apple
Super Advisor

Re: Can I Nullify one directory in /var?

I always need to nullify the root mail. may be i need to automate in the cron job to clear the root mail. what do you think?
How can we know it does large print jobs? how can i check this large print jobs?
hope to hear frm you. thank u

TTr
Honored Contributor

Re: Can I Nullify one directory in /var?

/var/tmp is also a common offender. It can have many old leftover files. Whatever you do do not delete or nullify andy files that may be open by a process. Check each file before you delete it or nullify it with the "fuser" command. If it is open by a process, do not touch it.

/var/preserve contains aborted "vi" files. The newer ones may still be wanted by their owners but most likely the older ones can be deleted.

/var/opt contains the "var" equivalent of larger software products. Each one may contain tmp and log folders. You have to klnow what each one is before cleaning up in here.

/var/mail, you should read the root mail and delete individual mail messages from within a mail reader such as elm.

/var/adm/sw, use the "cleanup" tool to delete doubly and more superseded patches.

There are more, you should identify and get comfortable with each folder under /var before cleaning up.