Systeminfo

Memory and swap

'free' command is used find out the physical memory installed on a system free command is used. ‘free –m’ gives the size in MB

  # free -m
             total       used       free     shared    buffers     cached
  Mem:         48298      38577       9721          0        360      34202
  -/+ buffers/cache:       4014      44284
  Swap:        20479        365      20114

The second line starting with -/+ buffers/cache: tells us how much of the memory in the buffers/cache is used by the applications and how much is free. Keep in mind that in general the cache is filled with disk IO cached data. The cache can be very easily reclaimed by the OS for applications. Linux will always try to use free RAM for caching IO, so "free" will almost always be very low. Therefore the line "-/+ buffers/cache:" is shown, because it shows how much memory is free when ignoring caches; caches will be freed automatically if memory gets scarce, so they do not really matter.

Let BUFFERS + CACHED from first line be value X.
X subtracted from the USED memory from the first line gives how much RAM is used by applications (USED value on second line)
X added to the FREE memory on the first line gives how much RAM applications can still request from the OS.

A Linux system is really low on memory if the free value in "-/+ buffers/cache:" gets low.

Also we can use ‘cat /proc/meminfo’ to find out the memory usage

To find out current swap usage:

  # swapon -s
  Filename                                Type            Size    Used    Priority
  /dev/sda6                               partition       17125248        0       -1
  /dev/sdb1                               partition       143364020       0       -2

List all PCI devices

Use the lspci command to list all PCI devices. Use the command lspci -v for more verbose information or lspci -vv for very verbose output. For example, lspci can be used to determine the manufacturer, model, and memory size of a system's video card:

Processor Info

To find out the number of processors installed and processor details:

cat /proc/cpuinfo

[root@Jeeva root]# cat /proc/cpuinfo
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 6
model           : 8
model name      : AMD Athlon(tm) XP 2100+
stepping        : 1
cpu MHz         : 1728.451
cache size      : 256 KB

Hardware Resources

lshw is a very good utility which can be installed from dag repo. This gives the detailed information about the current hardware configuration.

dmesg and /var/log/dmesg: When booting, kernal generates messages cataloging detected Hardware and they are stored in internal kernal buffer memory. This can be examined using ‘dmesg’ command. Also, this buffer contents are copied to /var/log/dmesg file.

/var/log/dmesg

kudzu: kudzu maintains a Database of detected Hardware at /etc/sysconfig/hwconf file. When run, Kudzu compares the currently detected hardware against to the stored database. If any changes found, kudzu automatically will attempt to reconfigure the system. Kudzu uses catalogs of known Hardwares in /usr/share/hwdata directory.

/etc/sysconfig/hwconf
/usr/share/hwdata

/proc filesystem: This filesystem contains pseudo-files which provide detailed hardware informatiom. The meminfo, cpuinfo, interrupts, ioports and iomem files and bus, scsi and ide directories are few good examples.

How to find the OS release

 cat /etc/redhat-release

How to find the OS kernal release version

 uname -r

To find out whether the running kernel is 32-bit or 64-bit

 $ uname -a
 Linux ora100 2.6.5-7.252-smp #1 SMP Tue Feb 14 11:11:04 UTC 2006 x86_64 x86_64 x86_64 GNU/Linux

The x86_64 confirms you can run 64 bit apps.

How to view the full command path and details in process listing

 ps -ef --cols 5555  | grep openview

dmidecode

dmidecode is a tool for dumping a computer's DMI (some say SMBIOS) table contents in a human-readable format. This table contains a description of the system's hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision.