cancel
Showing results for 
Search instead for 
Did you mean: 

var is 90 %

gany59
Regular Advisor

var is 90 %


Hi techiees

In my hp-ux 6600 server the /var if 90%
if i do the du -sk /var/adm | sort -nr | more it will tell as
736715 sw
25496 syslog -
10801 cron
6601 sa
3619 perfmgr
2209 sulog -
1101 sudolog -
561 OLDsulog -
122 wtmp

SO i tried to move the OLDsulog file .. then also the size of the /var is 90%

Could anybody tell what task should be performed for this ... Thxs in advance



11 REPLIES
Raj D.
Honored Contributor

Re: var is 90 %

gany59,

From the above details it looks like you have many old patches residing on /var/adm/sw/

Try cleanup with preview option and see what it can clean up for the superseded patches from /var/adm/sw/save/ . (Remember not to delete anything manually.)
# cleanup -p -c 1

And if it shows many patches it can cleanup do a cleanup and it will recover the free space on var.

Cheers,
Raj
" If u think u can , If u think u cannot , - You are always Right . "
Tingli
Esteemed Contributor

Re: var is 90 %

Why not do du -sk /var? I am a little bit reluctant to clean the /var/adm/sw, which is less than 1g. I would search somewhere else or it is time to increase your /var.
gany59
Regular Advisor

Re: var is 90 %

Ok.. its possible to trim the log file
or remove the file
James R. Ferguson
Acclaimed Contributor

Re: var is 90 %

HI:

As noted, you can use 'cleanup -c 1' to recover space from '/var/adm/sw'. This will remove the rollback images of patches that have been superseded at least once. This is quite safe.

Never remove or otherwise muddle with the contents of '/var/adm/sw'. To do so may leave your server in a state where it can no longer be patched or have software added, removed or even listed.

Regards!

...JRF...
Patrick Wallek
Honored Contributor

Re: var is 90 %

>> its possible to trim the log file or remove the file

It is certainly possible, but it will not make a big difference.

In your output above, the 'sw' dir is approx. 730 MB. The 'syslog' dir approx 24 MB.

The OLDsulog was only 561 KB, so I'm not surprised the percentage didn't move.
Bill Hassell
Honored Contributor

Re: var is 90 %

/var/adm is just a portion of /var. The correct command is:

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

This will show the largest directories. Work on thos first.

Logfiles in /var/adm and /var/adm/syslog can be copied to a new name, compressed and the old logfile reduced to zero bytes like this:

cd /var/adm/syslog
cp syslog.log syslog.log.20090818
cat /dev/null > /var/adm/syslog/syslog.log

mv OLDsyslog.log OLDsyslog.log.20090818
compress syslog.log.20090818
compress OLDsyslog.log.20090818


Bill Hassell, sysadmin
Norm Diederich
Honored Contributor

Re: var is 90 %

gany59,

You might also want to check the size of /var/tmp and /var/adm/sw/save.

The FS /var/adm/sw/save contains the old files saved when patches applied to provide for rollbqack of the patches.

Another option, if you have disk space, to create another lv, is to copy the contents /var/adm/sw/save to a new FS and then mount it under /var/adm/sw/save. This file system can get very large, especially if you have products like the Data Protector Cell Manager, NNM, or OM installed.

As mentioned above, cleanup -c1 will remove all patches that have been supersceeded at least once from /var/adm/sw/save.

Regards,
Norm
avizen9
Esteemed Contributor

Re: var is 90 %

Hello gany

as mentioned find out folders which are occupying more space in /var through below command.
du -kx /var | sort -nr | head -20

once you have folder list you should have Couple choices.

1) create new logical volume and migrate these folder in new lv put symbolic link.

2)create a nfs space to storage server or any other server which having more space and migrate these folder there.

hope this will help.

avizen9
Esteemed Contributor

Re: var is 90 %

you should only follow my suggestion if you can not remove any logs or can not housekeep from /var.

first you should verify and find out the possibility to housekeep.
Vijaykumar_1
Valued Contributor

Re: var is 90 %

Hi Gany,

You can use the below script..It identifies the large files..


find /var -type f -xdev | xargs ls -s | sort -rn | awk '{size=$1/2048; printf("%dMb %s\n", size,$2);}' | head

Also check /var/adm/sa and gzip the sa.old files say like sa.18,sa.17 for the previous dates.

Let me know if you have any queries..
trilok_pvp
Frequent Advisor

Re: var is 90 %

Hi

Pls check for any STM tool is creating the logs.

path /var/stm/logs/os