Operating System - HP-UX
1834175 Members
2704 Online
110064 Solutions
New Discussion

Re: Text processing - newbie question

 
SOLVED
Go to solution
Chris Ciapala
Trusted Contributor

Text processing - newbie question

Hi gurus,
Story is: i've HP UX 11 box where /var is almost full. I know that there is method of deleting superseded patches. I know idea, but to commit patches I need to process output file (swlist -l...) to pass this file to swmodify. List is big (500 entries) so manually this is hard to do. Tasks to do:
- leave only unique entries,
- replace everything after PHXXXXX. with *. I know it can be done with awk and/or sed, grep, etc. but for now I can't handle this. Thanks guys.
Chris
PS Merry Christmas to everyone!!!
4 REPLIES 4
Madhu Sudhan_1
Respected Contributor

Re: Text processing - newbie question

Can you attach that output file ?

Thanks,
Think Positive
Sridhar Bhaskarla
Honored Contributor
Solution

Re: Text processing - newbie question

Hi,

The best method to delete superceded patches is to use "cleanup" command.

Take a backup of /var/adm/sw/save to a tape and keep it safe for sometime before you run this command.

This command comes with the patch PHCO_24347, the latest one.

Use cleanup -C 2 to delete the patches that have been superceded twice. You can also preview it with -p switch.

This is equivalent to the command swmodify -x patch_commit

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
A. Clay Stephenson
Acclaimed Contributor

Re: Text processing - newbie question

Hi:

All you need to do is run the cleanup command. Typically cleanup -c 1 is all you need and restores the mosdt space. If your patches have been installed for quite a while (and thus you are confident of their integrity) then cleanup -c 1 is the best bet; otherwise -c 2 will leave you with 2 versions.
If it ain't broke, I can fix that.
fg_1
Trusted Contributor

Re: Text processing - newbie question

Krystopf

Run the Cleanup -c 1 command.

This will take all patches that have been superseeded at least once on your system and remove them from the /var filesystem.

We ran this on all of our systems after each patch CD we apply and it averages about 200MB of space per system.

If you haven't run this in a while, you will probably gain anywhere from 250-500MB per system.

Before you run this, run the following:

1) make_tape_recovery or make_recovery -A -C -v (depending on version of ignite you have)

Good luck

Happy Holidays.