I'm writing a script to display a lot of information which describe a server (OS distrib, release, Hardware platform, CPU, HD, S/N...).
For Linux side it is ok as you have almost all the information in /proc/cpuinfo, /proc/meminfo... and you can use dmidecode but for HP-UX I didn't find such files and command.
Could you please help me?
Yep - cfg2html.
Beware that it can have security implications if you publish the results, as it includes a "ps" listing which may include application passwords on the command line (shame on you, Oracle!); you can edit out the function though.
This is great for one or two servers, what if you have several thousand or tens of thousands of servers?
Is there anyway to get this utility to create a normalised output rather than a summary report?
I'm looking at writing a script that collects the hardware inventory, services running, host OS information then the software packages and files installed.
At the moment there is nothing like this, unless I use a commercial product like Peregrine ED, which I don't have several $million to spend.
So far, I have this..
Does anybody know how to list packages installed, then the files used in those packages?
Great, thanks, I'll look at this when I get access.
What I'd really like to know is how to list packages and the files they own in HP/UX. Then I can incorporate the inventory with the other platforms I currently process.
Under Linux dpkg -l lists all packages and versions installed. Then dpkg -L lists which files and where the files are installed. I guess I'll have to write something different for each version of HP/UX.
this command will list what you want...
Now about packages in HPUX there is nothing called of the sort...
You would have products or filesets and both can be listed with swlist
e.g. swlist -l product or swlist -l fileset
Do a ma swlist
If you want to get all the files listed that belong to a fileset then use the
-l file option of swlist
e.g.
$ /usr/sbin/swlist -l file OpenSSL
HP-UX's SD devides SW into bundles (which only HP can package), products, subproducts, filesets, files.
With the swpackage command you can create SW depots if you provide
a Package Specification File.
Alternatively you can look up the contents of installed SW packages in the filesystem
beneath /var/adm/sw/<SW_SOFTWARE_SPEC>/pfiles/INDEX
There are also the sizes and checksums stored which an swverify will look up.
You can obtain a lot of system information if you query the Support Tools Manager which is part of the OnlineDiag SW package.
(try: $ /usr/sbin/swlist -l fileset OnlineDiag )
For instance you can say (which will also list the Serial No. that you need to file support cases)
$ echo "sc product system;info;wait;il" | /usr/sbin/cstm | more
If you want to know how much physical RAM your box has just substitute system above by memory.
A big thanks, this is precisely what I was after. For the sake of executive summary reports I have to call them Applications/Packages with versions. As I become more discreet I suppose I can then call them Products and filesets for HP/UX.