Re: help on /var/adm/sw/save (397 Views)
Reply
Super Advisor
NDO
Posts: 536
Registered: ‎12-10-2003
Message 1 of 9 (450 Views)

help on /var/adm/sw/save

[ Edited ]

Hi!

 

My /var is 100% full, and I noticed that on /var/adm/sw/save is where I got most of the files. I understand that I cant just delete with rm those files, and instead I need to use the cleanup command. But please can someone explain how does this works, because I dont quite understand the commit process.

 

 

 

P.S. This thread has been moved from HP-UX > System Administration to HP-UX > patches. - HP Forum Moderator

 

Acclaimed Contributor
Dennis Handly
Posts: 25,063
Registered: ‎03-06-2006
Message 2 of 9 (444 Views)

Re: help on /var/adm/sw/save

>instead I need to use the cleanup command.

 

If you use cleanup, you can specify how many patches you want to be able to go back.

If a patch is committed, it can't be removed.

 

So using "-c 1" should be reasonable, if you are happy with your current patch level.

Super Advisor
NDO
Posts: 536
Registered: ‎12-10-2003
Message 3 of 9 (440 Views)

Re: help on /var/adm/sw/save

My current patch level is:

 

mcelrate[383]/ # swlist |grep -Ei "qpk|gold"
  QPKAPPS                               B.11.23.0712.070a Applications Patches for HP-UX 11i v2, December 2007
  QPKBASE                               B.11.23.0712.070a Base Quality Pack Bundle for HP-UX 11i v2, December 2007
mcelrate[384]/ #

 So and its quite an old server (rx4640)... so I am not sure wether I should commit current patchs..

Acclaimed Contributor
Dennis Handly
Posts: 25,063
Registered: ‎03-06-2006
Message 4 of 9 (438 Views)

Re: help on /var/adm/sw/save

[ Edited ]

>My current patch level is:

 

This is meaningless.  The -c is for EACH SD product, patch tree.

You need to look at "swlist -l patch" instead.  Then add "-x show_superseded_patches=true" to see all of the saved copies.

 

>it's quite an old server (rx4640)... so I am not sure whether I should commit current patches.

 

If it's that old, you don't need N previous patches for the same component, especially if you're happy with the latest.

-c 1 allows you to roll back each patch, once.  And you can always add more patches.

 

You can always use "cleanup -p -c 1" to see what will be cleaned up.

It will show you the size and the new and the superseded patch IDs.

(Unfortunately it doesn't total them for you.  :-)

Super Advisor
NDO
Posts: 536
Registered: ‎12-10-2003
Message 5 of 9 (434 Views)

Re: help on /var/adm/sw/save

[ Edited ]

the command:

swlist -l patch -x show_superseded_patches=true | more

  gave me a long list.

 

When I used cleanup with -p :

 

#cleanup -p -c 1
### Cleanup program started at 02/19/14  12:04:41
Preview mode enabled. No modifications will be made.
Commit patches superseded at least 1 time(s) on 'mcelrate'.
Obtaining superseded patch information...done.
No non-committed patches superseded at least 1 time(s) are present.
All information has been logged to /var/adm/cleanup.log.
### Cleanup program completed at 02/19/14  12:04:41

 So I can use the cleanup command....

 

 

and there is nothing on /var/adm/cleanup.log

 

#ls -lrt /var/adm/cleanup.log
-rw-r--r--   1 root       sys              0 Feb 19 11:03 /var/adm/cleanup.log

 

Acclaimed Contributor
Dennis Handly
Posts: 25,063
Registered: ‎03-06-2006
Message 6 of 9 (421 Views)

Re: help on /var/adm/sw/save

[ Edited ]

>So I can use the cleanup command....

 

No, it means you can't.

The only way to free up space there is to manually analyze large saved patches, guess which you don't need and use swmodify to commit those patches.

 

You also could save off those patches and move them elsewhere but you would need to put them back if you wanted to run cleanup in the future.  See:

http://h30499.www3.hp.com/t5/Patches/to-remove-commited-patches/m-p/4767331

Honored Contributor
Patrick Wallek
Posts: 13,774
Registered: ‎06-21-2000
Message 7 of 9 (418 Views)

Re: help on /var/adm/sw/save

You may also need to further analyze your /var filesystem for other large directories.

 

You may have some large log files in the /var/adm/syslog and maybe the /var/stm/logs/os directory.

 

Your best bet is start in /var and run a 'du -ks * | sort -n' command.  The largest directories will be last in the list.  From there go into one of the directories and run the du command again to narrow the search.

 

It may be that your /var/adm directory structure is not the culprit.

Super Advisor
NDO
Posts: 536
Registered: ‎12-10-2003
Message 8 of 9 (410 Views)

Re: help on /var/adm/sw/save

[ Edited ]

Hi

 

I found that using the du -sk* command, the biggest directories are:

 

/var/opt

/var/tmp

 

Inside /var/opt there is a /sfmdb dir which I am not sure I should delete stuff in there:

 

mcelrate[184]/ #cd /var/opt/sfmdb
mcelrate[185]/var/opt/sfmdb #du -sk
122008  .
mcelrate[186]/var/opt/sfmdb #du -sk *
122008  pgsql
mcelrate[187]/var/opt/sfmdb #cd pgsql/
mcelrate[188]/var/opt/sfmdb/pgsql #du -sk *
8       PG_VERSION
72304   base
152     global
280     pg_clog
8       pg_hba.conf
8       pg_ident.conf
49160   pg_xlog
8       postgresql.conf
8       postmaster.opts
8       postmaster.pid
56      sfmdb.log
mcelrate[189]/var/opt/sfmdb/pgsql 

 

 

and inside /var/tmp

 

-rw-r--r--   1 sfmdb      users          254 Mar 15  2010 caaa01444
-rw-r--r--   1 sfmdb      users         3606 Mar 15  2010 daaa01444
-rw-r--r--   1 sfmdb      users          952 Mar 15  2010 eaaa01444
-rw-r--r--   1 sfmdb      users         7191 Mar 17  2010 iaaa01444
-rw-r--r--   1 sfmdb      users          487 Mar 17  2010 haaa01444
-rw-r--r--   1 sfmdb      users         1883 Mar 17  2010 jaaa01444
-rw-r--r--   1 sfmdb      users        10776 Mar 19  2010 laaa01444
-rw-r--r--   1 sfmdb      users          720 Mar 19  2010 kaaa01444
-rw-r--r--   1 sfmdb      users         2814 Mar 19  2010 maaa01444
-rw-r--r--   1 sfmdb      users          487 Mar 21  2010 paaa01444
-rw-r--r--   1 sfmdb      users         1883 Mar 21  2010 raaa01444

 

 

I dont know if I can delete this either. Pls comment

Acclaimed Contributor
Dennis Handly
Posts: 25,063
Registered: ‎03-06-2006
Message 9 of 9 (397 Views)

Re: help on /var/adm/sw/save

>and inside /var/tmp

 

You can delete these old temp files, especially since 2010.  The were created by PID 1444, long gone.

This find command will show you files older than 60 days:

find /var/tmp -mtime +60 -exec ll -td {} +

 

If you want to remove them:

find /var/tmp -mtime +60 -exec rm -f {} +

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.