6

is there a standard command for Linux that would provide a description of the server? (Things like model, number of cores, speed...)

7 Answers 7

14

Not really no (in general, how do you define "description"?), but you can pull most of that info using dmidecode.

1
  • 6
    That'll work for server make, model, etc. If he just wants the type and number of cores, $ cat /proc/cpuinfo will do just fine.
    – EEAA
    Jan 28, 2010 at 16:12
6

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 here

2

dmesg shows load of your hardware too.

1
  • 5
    If your machine has been up for a while dmesg may no longer have the boot messages. If that's a case look for a /var/log/dmesg.boot file which will have the boot messages.
    – voretaq7
    Jan 28, 2010 at 16:21
2
cat /proc/cpuinfo = CPU information
lspci = Shows PCI card Hardware name
uname -a = Shows kernel version, architecture & build date/host
cat /proc/meminfo = memory (wired + vm) info

These have worked on every linux system i've seen. lspci is part of the pciutils package, and relies on a database of PCI id's. The stuff in /proc would only be the pci id's)

1

Try these:

# uname -a

# dmidecode

# vpddecode
0

"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

hwinfo --short 

You can combine --short with specific devices like --cpu and --disk.

hwinfo --short --cpu --disk

For everything you simply type

hwinfo 

Or specific to a devicetype:

hwinfo --netcard

you get a complete list of features with

hwinfo --help

In addition "smartctl --all" shows special informations about harddrives, not shown in any other tool.

-1

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 like dmidecode, 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. Puppet facter does much of the work for you.

3
  • this is not a standard Linux command Jan 22, 2015 at 21:59
  • GNU/Linux doesn't provide a single, unified "standard command" to describe a server. facter is one of the most commonly used alternatives, however. Jan 23, 2015 at 0:13
  • dmidecode comes close, and it is included in all of the distributions Jan 23, 2015 at 0:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .