1827260 Members
2081 Online
109717 Solutions
New Discussion

Re: clean out patch logs

 
Dalin Bruns
Occasional Advisor

clean out patch logs

What do you do w/ the files in /var/adm/sw/save? Over time quite a few files have accumulated there as we have applied patches and it needs to be cleaned up.

What other things can be cleaned out of /var?
7 REPLIES 7
Paula J Frazer-Campbell
Honored Contributor

Re: clean out patch logs

Hi

What you need is cleanup

See man claenup.


Paula
If you can spell SysAdmin then you is one - anon
Victor_5
Trusted Contributor

Re: clean out patch logs

What do you mean? If you are trying to recover space of /var/adm/sw/save, try
cleanup, you can cleanup -p first, then do the real cleanup, man for details.
James R. Ferguson
Acclaimed Contributor

Re: clean out patch logs

Hi:

The only safe way to manage files in '/var/adm/sw' is with the 'cleanup' utility. This will trim the SD logs, too.

'cleanup' and allows prior versions of patches to be safely removed while retaining a level of old versions which could be reinstated over the current one.

Given the name of the directory you used, it appears that you are running 11.x. Thus you can regain space and trim logs with:

# cleanup -c 1

Have a look at the man pages for more information.

Regards!

...JRF...
Dalin Bruns
Occasional Advisor

Re: clean out patch logs

My concern from the warning in the man page was when is it safe to commit patches ... I guess the -c 1 option is a conservative approach. Has anyone ever moved all of those files to perhaps CD-ROM? (Understanding that if a patch had to be removed, the necessary file(s) would need to be recovered)

Any comment on using swmodify mentioned in the cleanup man?

Thanks for your input.
Sean OB_1
Honored Contributor

Re: clean out patch logs

Use the "cleanup" command.

on 10.20
cleanup -F

on 11.00

cleanup -p
cleanup -i
Martin Johnson
Honored Contributor

Re: clean out patch logs

The issue I have with moving the files to CD is what do you do afterward when you've installed new patches? Another CD? How do you recover to a consistant view?

There is less chance of causing problems if you just use cleanup.

Besides, IMHO, if /var/adm/sw/save is getting *THAT* big, maybe it is time to upgrade. :-)

HTH
Marty
George A Bodnar
Trusted Contributor

Re: clean out patch logs


One thing you could do is run du -ks against the directories in save to see which patches are large. Then for patches for things that could easily be reloaded and not risking the health of the OS (i.e. core software, kernel patches, etc.) then you could run the following:

swmodify -x patch_commit=true PHSS_xxxxx

Once again - be VERY cautious about this as you could not back-off these patches once you do them. Of course dumping patches for layered products that you could remove/reload with no business impact is certainly reasonably safe thing to do in a pinch.