Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with logical volume growth

Status
Not open for further replies.

ehspacl

IS-IT--Management
Feb 11, 2002
54
GB
Dear All,

I have a problem with /var. It seems to be growing and I can not pin-point where. Is there a hp-ux command that would allow me to look at the /var logical volume and pick out the ten last amended files? Or the ten largest files in this logical volume?

Many thanks for your help in advance.

Paul
 
You can use the find command i.e.

create a file ( using touch and give it a time stamp
of say 9.00 am september 10 e.g. touch 0910090002 file1

then use find :- find /var -type f -newer /tmp/file1 -exec ls -l {} \;

to find large files

find /var -type f -size +3000 -exec ls -l {} \;

Do you have printers setup on your system and print large files becuase they will be spooled in /var/spool/lp
and once finished prinitng disapear

Also check /var/mail for large mail files


HTH
 
I don't have a printer but your reply was very much appreciated.

Many thanks
 
One place that people overlook is /var/adm/crash, for any recent crash dumps, you should not need any more than the most recent if you have any there, However if /var grows wuickly, as DSMARWAY suggestly it is highly likely to be a spooled file.

Clare
 
Hi,
check /var/adm/wtmp you can see the man page to know how it is used and how to reset it.

hope this help u
 
Hi,

Issue the cmd :
du -kx /var |sort -rn > /tmp/du.var
to locate big directories (not files). Then look inside the directory to see if the files can be removed.

DO NOT REMOVE /var/adm/sw !!! coz, if you do , you will never be able to run swinstall again.

Another option is to run the cleanup utility to clear some superseded patches.
If you are on 10.20, use "cleanup" without any arguments. On 11.x, use "cleanup -c 1".

Have a look at the man pages for "cleanup" for more information.

Hope the above information helps.

cheers,

Mok
 
HI,

I think i got the answer for your question. I was facing the same problem of growing this particular /var folder. The problem is that there is file in this folder which grows everytime and you can't stop that. The file name is activity_log, which stores per second activity as a log file. You can find this file in the /var/stm/logs/sys/activity_log. what you have to do is to just remove this file by using "rm activity_log" command. The you can use the bdf command to see that you /var folder is restored a quite a lot free space. So you have to remove this file time to time, whenever you run out of space in /var folder.
If you want to stop this file from growing, i can give you that solution as well. I hope this answer will definately resolve your problem. Hanwant Verma
Software Engineer
London, UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top