We all know by now that monitoring system information is incredibly important. System Admins and Network Admins constantly need to monitor resources and know what hardware they are working with. Below are a few commands that will help gather hardware information and monitor system resources.

Hardware information:
These commands will show you all information, from the manufacturer to the speed, for the CPU or Memory.

# cat /proc/cpuinfo
# cat /proc/meminfo

Next, we’ll take look at DMIDE CODE. These commands will list hardware information based on the computer’s current configuration. If you have two processors, for instance, the output of the processor would display all information regarding the manufacture, speeds, cores, threads and more. Same goes for the memory, information for each stick of RAM will be displayed.
When checking the BIOS, the output will display the current version, manufacture and any other pieces of information relating to it. As for the system, this will display all hardware information on your system. It might be a bit overwhelming so, you can always use the “| less” when viewing the information.

# dmidecode -t bios
# dmidecode -t memory# dmiecode -t processor
# dmidecode -t system

Uptime, which shows how long the system has been online for. This can be useful to check for any unscheduled downtime

# uptime

Top, which displays the system’s resources in real time. Top will show the process ID or PID, the CPU resources being used and the memory information being used. I personally use Top all the time, if I have a system up for days some resources will eventfully chew through resources causing my machine to become slow. After killing the process, I’ll restart it and everything will run smoothly. Be aware that there are alternatives to top, like htop or the GUI version you can find in settings… like gnome system monitor or KDE System Guard.

# top

Free will only display memory and how much RAM is Free/Used in real time. Information can be displayed in bytes, kilobytes, and megabytes by using each of the following options: -b (bytes) -k (kilobytes) -m (megabytes)

# free

Iostat is used for monitoring input/output. It will generate three types of reports, the CPU Utilization report, the Device Utilization Report and the Network Filesystem report. When using this command, think Average CPU usage and Disk utilization.

# iostat

mpstat or multiprocessor usage displayed the activity for each available processor. 0 is the first processor. Adding a -P (uppercase) will display the avg. CPU utilization per processor.

# mpstat
#mpstat -P

Networking Information:

Netstat is used to display information for network connections, routing tables, interface statistics, masquerade connections, and multicast memberships.

# netstat

iptraf displays real-time network statistics. While showing you the network stats in real time, it will display the following information,  TCP information, UDP counts, ICMP and OSPF information, Ethernet load, net stat, IP checksum and more.

# iptraf

I should note that checking the system’s networking information can be done with one of two commands. Either command works, to be honest, but the output is a little different.

# ifconfig
# ip addr


Finally, we have uname. Uname, will display information based on your current system. Some of what it displays will be OS, kernel version, the host name, OS type, or it can display all the information regarding the machine. The only drawback is, it’s not very detailed.

# uname

This command will display all the information:

# uname -a

This will display you the kernel and version number. the -r option, will show you the kernel and its release number.

# uname -v

These will display the hardware platform, processor type, machines hardware name, and the host’s name.

# uname -i
# uname -p
# uname -m
# uname -n


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s