Operating System - HP-UX
1825668 Members
3408 Online
109686 Solutions
New Discussion

Re: Easy /var/adm/sw question I can't remember the answer to.

 
SOLVED
Go to solution
Kelli Ward
Trusted Contributor

Easy /var/adm/sw question I can't remember the answer to.

Hi,
I have a server with a /var full.
The bulk of the problem is in /var/adm/sw in the ./products and ./patches directories.
My question is:
Is it safe to delete any or all of the patch files in either or both these directories?
I can't for the life of me remember and I don't want to do anything I'd regret later.
Thanks for helping the brain-faded.
Kel
The more I learn, the more I realize how much more I have to learn. Isn't it GREAT!
9 REPLIES 9
Sanjay_6
Honored Contributor
Solution

Re: Easy /var/adm/sw question I can't remember the answer to.

Hi Kelli,

Do not delete the files under /var/adm/sw on your own. You may have later problems with SD. use the hp-ux "cleanup" utility to cleanup the old and unrequired patches from your system and reclaim the disk space. Also check for the log files. you may find a lot many log files from STM / arraymanager under /var. You can clean some of them to get some space in /var.

Hope this helps.

Regds
Thom Cornwell
Frequent Advisor

Re: Easy /var/adm/sw question I can't remember the answer to.

Look at the manual page on "cleanup". It allows you to peruse what it will do before actually executing it. Do a backup as specified in the manual page.
Jeff Machols
Esteemed Contributor

Re: Easy /var/adm/sw question I can't remember the answer to.

cleanup -c 2 will remove all patches that have been superseed at least two times. That will hopefully get some space back, and is fairly safe
someone_4
Honored Contributor

Re: Easy /var/adm/sw question I can't remember the answer to.

Before running the cleanup do
#cleanup -p -c 2
to review what is going to be commited.

Richard
A. Clay Stephenson
Acclaimed Contributor

Re: Easy /var/adm/sw question I can't remember the answer to.

Hi Kelli:

You need to run cleanup -c 1 (to leave 1 revision) or cleanup -c 2 (to leave 2 revisions). Do not remove the files manually!!

If you are running 11.11 (11i); you will need to install patch PHCO_24630. The cleanup utility was accidently omitted from the 11.11 release.

Clay
If it ain't broke, I can fix that.
Jeff Machols
Esteemed Contributor

Re: Easy /var/adm/sw question I can't remember the answer to.

ps, you can also use the -p option to see before you do anything

cleanup -p -c 2 will show how much space you will get back. This way you can play with the c number before removing anything
Helen French
Honored Contributor

Re: Easy /var/adm/sw question I can't remember the answer to.

Hi,

I would try to use these two commands to look for big files or newly created files.
1) find /var -xdev -size +1000 -exec ll {} \; > /tmp/bigfiles
2) find /var -xdev -type f -mtime -2 -exec ll {} \; > /tmp/newfiles
Check to see if there are files under any mount points too. (ncheck is good for that)

Also do 'cleanup' if you need to remove patch information from the SD-UX IPD after patches have been overwritten by software updates.

HTH,
Shiju
Life is a promise, fulfill it!
Scott_14
Regular Advisor

Re: Easy /var/adm/sw question I can't remember the answer to.

hello:

If your running hp-ux 11, you can check your /var/adm/sw/save area, this is where backup copies are kept incase you need to roll back a patch.

if your using 11, you can use the swmodify command to commit
the patches you know are working ok for you.

hope this helps.

scott
Kelli Ward
Trusted Contributor

Re: Easy /var/adm/sw question I can't remember the answer to.

Thanks for all the assistance. Lots of good variations and information to play with.
My system is now happy.
10's to all.
Happy New Year
Kel
The more I learn, the more I realize how much more I have to learn. Isn't it GREAT!