Linux - Commands to get System Information



Most of the HardWare related information can be extracted from /proc file system.

# cat /proc/meminfo
    To display memory information of the system.
  • See also # free 
  • See also # slabtop

# cat /proc/cpuinfo
   To display cpu information of the system.
  • See also # top

# cat /proc/cmdline
    This file shows the parameters passed to the kernel at the time it is started.

# cat /proc/crypto

    Lists all installed cryptographic ciphers used by the Linux kernel.

# cat /proc/devices
    Displays the various character and block devices currently configure.

# cat /proc/loadavg
   0.07  0.05  0.05  1/243  5431
    Provides the load average in regard to both the CPU and IO over time. The first three columns measure CPU and IO utilization of the last one, five, and 15 minute periods. The fourth column shows the number of currently running processes and the total number of processes. The last column displays the last process ID used. Load average refers to the number of processes waiting for a CPU share.
  • See also # uptime
  • See also # top
# cat /proc/swaps
   This file measures swap space and its utilization.
  • See also # swapon -s
  • See also # swapoff

# cat /proc/uptime
    This file contains information detailing how long the system has been on since its last restart.
  • See also # uptime
# cat /proc/version
   This file specifies the version of the Linux kernel, the version of gcc used to compile the kernel, and the time of kernel compilation. It also contains the kernel compiler's user name (in parentheses).
  • See also # uname -a
  • See also # arch
# cat /proc/mounts
   This file provides a list of all mounts in use by the system.
  • See also # mount   

 # ps -aux
     To list all the processes in the system.

Note:- To list the processes in sorted order.
From inside top you can try the following:
  • Press SHIFT+f
  • Press the Letter corresponding to %MEM
  • Press ENTER
The above trick will order the processes with descending order memory usage.
SHIFT+m ------->Ordering with memory usage
SHIFT+u-------->select particular user processes.
etc... 

This entry was posted by Unknown. Bookmark the permalink.

Leave a Reply