1753451 Members
6026 Online
108794 Solutions
New Discussion юеВ

/var filling up

 
SOLVED
Go to solution
Tim Votta`
Occasional Contributor

/var filling up

I am filling in for the senior unix guy and have run into a problem.
The /var file system is approaching 100% and I need to remove some stuff. This machine is on it's way to being replaced but I ned it from the next couple of weeks.

Is is safe to rm file in the /var/adm/sw dir? For instance the PHCO_XXX.depot files.

Also in the /var/adm/sw/patch directory. Can I rm the directories there? They appear to be patches from 1999.

Any assistance you can provide is appreciated.
Here fishie fishie fishie
13 REPLIES 13
Uday_S_Ankolekar
Honored Contributor

Re: /var filling up

Hello,

No don't want to remove sw directory.
Instead look for big files in /var directory

Find files more than 1 GB
find /var -type f -xdev -size +100000000c -exec ll {} \;

You can also use du -sk command .

Look for /var/tmp directory Also check for old log files and remove them

-USA..
Good Luck..
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: /var filling up

Don't remove them that way; your installed software database will become corrupt. Instead, run the 'cleanup' utility. You will probably safely regain quite a bit of space.
If it ain't broke, I can fix that.
PIYUSH D. PATEL
Honored Contributor

Re: /var filling up

Hi,

Dont remove the /var/adm/sw directory. It will create lot of problems for you.

Lokk for the big files in the /var/adm/crash and you can delete the subdirectories and files in this directory.

Do
# cat /dev/null > /var/adm/wtmp
# cat /dev/null > /var/adm/btmp

Check for the logs and temp files and delete them.

Piyush
Helen French
Honored Contributor

Re: /var filling up

DONOT remove those files manually. As suggested you can run 'cleanup' command to do a patch cleanup on your system.

# man cleanup - for details.

Also check the bigger files with:

# cd /var
# du -k | sort -rn | pg
# find . -xdev -type f -size +10000 -exec ll {} \; > /tmp/big_files

Also trim the log files (/var/adm/wtmp, utmp, syslog.log, mail.log) and remove the core files ( /var/adm/cron) if not needed any more.
Life is a promise, fulfill it!
Helen French
Honored Contributor

Re: /var filling up

Oops... sorry :((

I meant /var/adm/crash ! and NOT /var/adm/cron.
Life is a promise, fulfill it!
PIYUSH D. PATEL
Honored Contributor

Re: /var filling up

Hi,

Also try
cd /var

#find . -type f -size +1000000c -exec ls -al {}\; | sort -rn > /tmp/bigfiles

This will show you the files with more than 1MB size.

Pls give the output of these files and we can suggest what files to remove.

Piyush
Sanjay_6
Honored Contributor

Re: /var filling up

Hi Tim,

Do not remove files from /var/adm/sw manually. Use the patch cleanup utility "cleanup" to clean the old patches from your system. The utility is available as a patch which you can download and install on your system. The cleanup patch is availble as

patch PHCO_20824 for 10.20
patch PHCO_24347 for 11.0

You can also look into the var filesystem and clean these files.

Anything under /var/adm/crash
old files under /var/opt/hparray (files starting with L , Delete the old ones only.

Hope this helps.

Regds
Brian Crabtree
Honored Contributor

Re: /var filling up

I dont know if you are running a database on the machine, but...

If you are running Oracle, and using the RMAN plugin with the Omniback software and a catalog database, this software automaticlly puts export dumps of the catalog database into /var/opt/omni/tmp. These files are mostly worthless, and can be cleaned up for space.

Brian
Sebastian Galeski_1
Trusted Contributor

Re: /var filling up

Hi
as above don't erase /var/adm/sw,
did You check system logs files? If not run sam -> routine tasks -> system log files and have a look on size of this log files, trim them it should give You some free space.
Maybe in /var/adm/crash there is a core dump file, You can erase it.

If You check everything and find nothing to erase, but You have free space on other filesystem You can move something from /var to this filesystem and create a link on /var to it.

hope it help