is there a standard command for Linux that would provide a description of the server? (Things like model, number of cores, speed...)
is there a standard command for Linux that would provide a description of the server? (Things like model, number of cores, speed...)
Not really no (in general, how do you define "description"?), but you can pull most of that info using dmidecode.
Ubuntu provides lshw in
ubuntu-standard
, it will be on any distribution ending with "untu". Many other distributions have their own tools, a lot of it can be found in/proc
. You can find the man page for lshw heredmesg shows load of your hardware too.
These have worked on every linux system i've seen.
lspci
is part of thepciutils
package, and relies on a database of PCI id's. The stuff in /proc would only be the pci id's)Try these:
"dmidecode" is present in all linux distribution and usually enough, to find most relevant parts together with serialnumbers.
The standard tool in Debian and Suse however is "hwinfo". It is a very comprehensive DeviceInfo-tool, and I wish (based on habbits) it would be standard accross all distributions.
For a short Overview you type
You can combine --short with specific devices like --cpu and --disk.
For everything you simply type
Or specific to a devicetype:
you get a complete list of features with
In addition "smartctl --all" shows special informations about harddrives, not shown in any other tool.
Puppet facter from PuppetLabs provides an interface to identify hardware on a system.
facter
can work without Puppet itself, can be extended to gather your own facts, and runs on many Operating Systems.I'm using
facter
, along with Puppet and The Foreman as a Puppet ENC to keep track of hardware. Facter provides a frontend to disparate tools likedmidecode
,cat /proc/cpuinfo,
MAC=ifconfig en0 |grep ether |cut -f2 -d" "
, and then information is all presented in a neat, orderly format. I've used it on RHEL, Ubuntu, Mac OS X, FreeBSD & Solaris-- gathering this information on my own was maddening. Puppetfacter
does much of the work for you.