1838604 Members
4169 Online
110128 Solutions
New Discussion

What is in: /var/adm/sw

 
Gene Laoyan
Super Advisor

What is in: /var/adm/sw

I ran out of space on /dev/vg00/lvol7 which is my /var.

I found a directory "/var/adm/sw" that holds a ton of little files. Is it OK to delete? What is in this volume?

Thanks
Gene Laoyan
7 REPLIES 7
Patrick Wallek
Honored Contributor

Re: What is in: /var/adm/sw

No, absolutely do NOT manually delete anything from that directory structure. This would royally screw up you sw* commands and might severely limit your ability to install new patches and software.

What you need to do instead is use the 'cleanup' (man cleanup for more info) to commit patches and remove the files from /var/adm/sw/save.

You can commit all patches that have been superseded once by using:

# cleanup -c 1

If you would like to preview the actions do:

# cleanup -p -c 1

You can also search for large directories in your /var file system by doing:

# cd /var
# du -ks * | sort -n

Then once you find the large directories, you can analyze them and find things that can be deleted.
A. Clay Stephenson
Acclaimed Contributor

Re: What is in: /var/adm/sw

Stop!. Go directly to jail. Do not pass Go. Do not collect $200.00.

This is the installed software database that all the swxxxx commands use. If you remove files, your system will not be patchable. You can run the cleanup command (e.g. cleanup -c 1) which will commit patches and leave only the last superseded version of a patch so that you can swremove only the most recent version. This will probably free up quite a bit of space. You should really break /var into several filesystems such as /var/tmp, /var/spool, /var/mail, and perhaps /var/adm/sw. You never want /var to run out of room because that will bring a system down vwery quickly. Several critical daemons (e.g. syslogd) have probably stopped because of /var filling up.
If it ain't broke, I can fix that.
whiteknight
Honored Contributor

Re: What is in: /var/adm/sw

Gene,

You cannot just remove the content of /var/adm/sw directory

You can use cleanup tool to remove the old patches

See this patch cleanup tool
PHCO_27780
http://www2.itrc.hp.com/service/patch/patchDetail.do?patchid=PHCO_27780&sel={hpux:11.11,}&BC=main|search|

WK
please assign points
Problem never ends, you must know how to fix it

Re: What is in: /var/adm/sw

Gene,

Just to add to the comments already posted, please make sure you take an archive backup of /var/adm/sw before running any cleanup commands, you never know, a patch you have committed may then be declared as bad by HP - in that situation without a backup you can't back the pacth out.

The backup is of course only any good until your next patch installs.

HTH

Duncan

I am an HPE Employee
Accept or Kudo
MarkSyder
Honored Contributor

Re: What is in: /var/adm/sw

There are numerous log files in /var that you can trim. In /var/adm:

btmp, sulog, wtmp, cron/log, lp/log, syslog/mail.log, syslog/syslog.log.

DO NOT delete any of these files. Either null them (e.g. > btmp) or trim them with SAM. If your system has been up for a long time you should be able to null files such as OLDsyslog.log without problem.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Marcin O.
Frequent Advisor

Re: What is in: /var/adm/sw

Hi
I think if you ask about sw directory, you just started your journey with hp-ux, better check other directory ex. logs, service scripts (sometimes ;)), and trim that files.
Marcin
James R. Ferguson
Acclaimed Contributor

Re: What is in: /var/adm/sw

Hi Gene:

The contents of '/var/adm/sw' are also known as the Installed Product Database (IPD).

As such, it is managed and queried by the SD (Software Distributer) tools -- 'swinstall', 'swcopy', 'swremove', 'swmodify', 'swverify', etc. THe 'show_patches' and 'check_patches' utililities are user-friendly front-ends to 'swlist' and 'swverify', respectively. The 'cleanup' utility is a front-end to 'swmodify' and 'swremove' to commit patches as noted.

An excellent guide to patch management is:

http://www.docs.hp.com/en/5992-0674/index.html

Regards!

...JRF...