They are a mix of Red Hat and CentOS 5.x, I'd like to have something on one host that can check basics like cpu/mem/disk hardware, Model, HW RAID controllers, etc would be nice.
I have key based ssh authentication set up, but I do not want to have to install anything on these hosts. Worst case, I could scp something to /tmp, but no install please.
Near as I can see, either I need to install something, or it is something really basic that I would run on the machine, and then manually aggregate.
Am I stuck writing some Perl to run and process the output of dmidecode, lspci, etc?
If I do, I'll put it up someplace, and link to it.
Related questions that do not have the answer:
Get server hardware details for ubuntu server
How to find out details about hardware on the Linux machine? this one had a nice bit of shell script, but it errors.
Without installing any new software on the remote systems, you can grab a raw snapshot of the remote machine's state with:
Then scp the tar archive from the remote server. This will get you: cpuinfo, meminfo, partitions, etc. Add more commands and temporary files for any additional information you may need (logical volumes, raid status, etc.)
As a minor bonus, you get an inventory of running processes on the remote machine at that instant.
Maybe try http://www.cfg2html.com/ it's just one bash script that outputs to html, which you can upload/download to a central directory. However it's just the output from commands so it's pretty hard to put it in a structured format like sql/xml.
You could install Spiceworks in a windows vm. It only uses ssh to inventory linux hosts.
Depending on if you have Python2 installed on your systems, you could also use Ansible.
This will output a nice JSON which includes CPU/RAM/HDD/Network and software configuration. Read the documentation for more information.
lshw command gives you a lot of hardware information and can output it in HTML or XML format...
If lshw is installed on the machines, you can use that, but it doesn't come pre-installed on Redhat and it's derivatives. There are RPM's out there for it, and you may be able to extract the required files from an RPM, SCP them to the machines, create a few symbolic links (most likely a link from /usr/sbin/lshw to the tmp location of the file, and from /usr/share/lshw to the tmp location of the folder) then you run lshw and remove the symbolic links afterwards. That is assuming you have root/sudo access ...
Copy hw-probe and hwinfo utilities to the temp directory on the server and run locally w/o installing anything. Just done this for one of my servers.
Example for CentOS 6:
Connect to server
Create a temp directory
Download proper
hwinfo
andlibx86emu
rpm binary packagesExtract them
Get latest
hw-probe
scriptCreate a probe
Clear local temp directory
The utility will return a permanent url to view collected hardware details and hardware related logs (like this).
I've just added an option
-hwinfo-path
tohw-probe:master
to simplify your use case.If you'd like to inventory many computers, then please see https://github.com/linuxhw/hw-probe#inventory.
I'm the author of the
hw-probe
project, feel free to ask any questions in the comments to this answer.