Operating System - HP-UX
1823230 Members
3477 Online
109648 Solutions
New Discussion юеВ

Re: Inventory of applications

 
SOLVED
Go to solution
Richard Prosser
Occasional Contributor

Inventory of applications

I have been given the job of determining the applications that have been installed on a variety of UNIX boxes, mostly HP-UX. This seems to be quite a difficult task, so I would appreciate any advice on forming such an inventory. So far I have written a simple script to locate all executables, but this is far from ideal, not least because I also need to obtain version numbers.

Are there any tools available to help with this task? Do all installations write to common log files?

Any advice would be much appreciated.

Thanks ..

Richard
10 REPLIES 10
Douglas Cromby_1
Valued Contributor

Re: Inventory of applications

Richard,

Have you tried:

swlist -l product

This should provide alot of the information you need.
Andreas Voss
Honored Contributor

Re: Inventory of applications

Hi,

on HP-UX (10.x and higher) all software contained in a SD-depot and installed via swinstall can be listed with:
swlist

Regards
James R. Ferguson
Acclaimed Contributor

Re: Inventory of applications

Hi:

# swlist -l bundle

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: Inventory of applications

Richard:

Read the man pages for 'swlist' and try out a few of the options. These may address your specific needs. For instance, including the verbose option (-v) in the example I gave above will reveal an enormous wealth of version and descriptive information about installed software:

# swlist -v -l bundle

...JRF...
John Palmer
Honored Contributor

Re: Inventory of applications

Richard,

This is a difficult one.

Well written applications will be 'swinstalled' and be visible with 'swlist'.

Others may be installed in separate directories in '/opt' or '/usr' but they could be anywhere.

As to common log files well about the only standard is that they'll probably have 'log' in the name ;-)

Best of luck,
John
Stefan Farrelly
Honored Contributor

Re: Inventory of applications


Hey, hang on a minute. This is indeed a very difficult task. The vast majority of applications have not yet been ported to SD (software distributor) so an swlist may not even show any installed apps at all. eg. Oracle and almost all DB's are not in SD format yet.

So, swlist is a start, but the best way to spot what apps are installed is to search the filesystems AND do a ps -elf and start identifying all the processes running. eg. from your ps -elf you can remove anything you know, system deamons, PIDs < 1500 or so (which are usually system daemons, any 3rd party apps should have pids > 1500) and then you will begin to track down the obscure apps anybody could have installed a long time ago. Once your left with process names/commands you cant determinte what they are youve probably found an application. Then you have to track down which dir they run out of (ps will give you a big start here) and hopefully in these dirs you will find some sort of documentation or version file which gives you more clues as to what the app might be.

Usually directories in /var or /opt or /usr/local which are unknown could be 3rd party apps dirs, but so could practically any filesystem on your server. All sorts or crazy apps out there which can be installed anywhere you want.

This is going to be a long and difficult task to do accurately. I did tons of Y2K audits where I had to do the exact same thing - took me damn ages to identify them all.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Alan Riggs
Honored Contributor

Re: Inventory of applications

This is indeed a difficult job. Stefan's suggestions are good. Let me add my own:

Trace the system startup in /etc/inittab and in the /sbin/rc*.d directories. This will show you every application that is configured to start automatcall on your system. (Note: ideally all startup rc scripts should be links to /sbin/init.d -- but I long since stopped assuming that the boxes I inherit are in an ideal condition.)
Richard Prosser
Occasional Contributor

Re: Inventory of applications

Gosh - loads of replies! Thanks to all of you.

I had discovered 'swlist' after posting my query, and it is very useful. It even showed applications which had not been installed via 'swinstall', or appeared to do so - "expect" being an example.

'ps' will show active applications, but what if they are not running at the time? And there are still the version numbers to be found.

I think that I will make do with 'swlist', as it is only major apps. that we are (probably) concerned with. I am assuming that things like Informix will show up.

At the risk of annoying HP, is there a similar utility for Sun?

Cheers,

Richard
Stefan Farrelly
Honored Contributor
Solution

Re: Inventory of applications


Sorry, I doubt if informix will show up in swlist at all. Ive never seen it.

You simply cant rely on swlist only. You must use ps and start looking through the filesystems to see whats there (looking for README files, version files etc.), its the only safe way to determine ALL the apps you have installed (wether or not theyre in use or running at the time). This is a big job, requires legwork (finger work) and you should allocate many hours to do it thoroughly.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Timothy Butler
Advisor

Re: Inventory of applications

Perhaps the wrong forum, but: pkginfo(1m) on Solaris, rpm on linux, lslpp on aix, etc...

That there are so many individual ones is the reason many third party apps don't use the native OS install tool.