If available, dmidecode comes in handy. Particularly on Dell, HP, IBM hardware, where they bother to program relevant hardware information into the various registers.
lspci is a great utility for listing the system hardware. (Anything on the PCI bus, anyway.)
cat /proc/cpuinfo - Displays CPU info
cat /proc/meminfo - Displays memory info
dmesg (or cat /var/log/dmesg) contains some info, not necessarily everything.
If you have a RedHat/CentOS system, you can use sosreport to collect a good bit of information, though I don't know if it has all the hardware info listed in it.
Those are some good places to start to find the info you're looking for.
The /proc filesystem will give you the information that you want... BUT i don't know how you will get it is one easy place.
'cat /proc/cpuinfo' will tell you about your CPU
'cat /proc/devices' will tell you some limited information about block devices.
'ifconfig -a' will tell you about network connections
Others will be able to tell you about more devices. Are you troubleshooting a particular device? If so, you will get better help asking a specific question.
lspci
for pci cards,lsusb
for usb,lshw
works on debian based distros, here's a list of ways to get other hardware specs,If available,
dmidecode
comes in handy. Particularly on Dell, HP, IBM hardware, where they bother to program relevant hardware information into the various registers.lspci
is a great utility for listing the system hardware. (Anything on the PCI bus, anyway.)cat /proc/cpuinfo
- Displays CPU infocat /proc/meminfo
- Displays memory infodmesg
(orcat /var/log/dmesg
) contains some info, not necessarily everything.If you have a RedHat/CentOS system, you can use
sosreport
to collect a good bit of information, though I don't know if it has all the hardware info listed in it.Those are some good places to start to find the info you're looking for.
The /proc filesystem will give you the information that you want... BUT i don't know how you will get it is one easy place.
'cat /proc/cpuinfo' will tell you about your CPU 'cat /proc/devices' will tell you some limited information about block devices. 'ifconfig -a' will tell you about network connections
Others will be able to tell you about more devices. Are you troubleshooting a particular device? If so, you will get better help asking a specific question.
inxi will show just about everything, run with no arguments for short form, the options are many however, run inxi -h to see them
inxi
is a 'full featured information script' as described by the project home page: https://github.com/smxi/inxiHere is information about how you can install it on Ubuntu: https://askubuntu.com/questions/284635/inxi-installation-on-ubuntu
below code u can copy using vi
For hard disks I use a custom script which massages into one list the outputs of:
to summarize that, I'd say here is good start to get information about your system:
I recommend checking out facter which outputs a lot of information in a form that is easy to use in scripts.
http://www.puppetlabs.com/puppet/related-projects/facter/
I really enjoy using "Facter". Gives a nice list of very useful information.