X
    Categories: Linux

Linux system information commands

Linux system information commands.

Some time we need to drill down in the system for getting the details about the Linux system information such asΒ memory/CPU details, architecture details etc. Hence this post about β€œLinux system information commands.” will help you to all the server information using commands.So here comes some important Linux system information commands. to help you with Β πŸ™‚

NOTE:Β some Linux system information commands requires root account.

  1. Β uname -a : Β This command is short abbreviation for unix name. Β Uname command is very important command in Linux which shows kernel version and system architecture.

————————————————————–OUTPUTβ€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

[root@kalwa2 ~]# uname -a
Linux kalwa2.home 2.6.32-220.el6.x86_64 #1 SMP Wed Nov 9 08:03:13 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
[root@kalwa2 ~]#

————————————————————–END OF OUTPUTβ€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

2. Β  head -n1 /etc/issue : Β This command Β shows name and version of distribution of the linux server.

————————————————————–OUTPUTβ€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

[root@kalwa2 ~]# head -n1 /etc/issue
Red Hat Enterprise Linux Server release 6.2 (Santiago)
[root@kalwa2 ~]#

————————————————————–END OF OUTPUT—————————————–

3. Β  cat /proc/partitions : Β This command Β shows all partitions registered on the system.

————————————————————–OUTPUTβ€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

[root@kalwa2 ~]# cat /proc/partitions
major minor #blocks name

8 0 20971520 sda
8 1 307200 sda1
8 2 16534528 sda2
8 3 4128768 sda3
[root@kalwa2 ~]#

————————————————————–END OF OUTPUTβ€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

4. Β  Β grep MemTotal /proc/meminfo : Β This command Β shows total RAM seen by the system.

————————————————————–OUTPUTβ€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

[root@kalwa2 ~]# grep MemTotal /proc/meminfo
MemTotal: 2051164 kB
[root@kalwa2 ~]#

————————————————————–END OF OUTPUTβ€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

5. grep β€œmodel name” /proc/cpuinfo : Β This command Β shows CPU(s) information.

————————————————————–OUTPUTβ€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

[root@kalwa2 ~]# grep β€œmodel name” /proc/cpuinfo
model name : Intel(R) Core(TM) i7-3537U CPU @ 2.00GHz
model name : Intel(R) Core(TM) i7-3537U CPU @ 2.00GHz
[root@kalwa2 ~]#

————————————————————–END OF OUTPUTβ€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

Β 

  1. Β  lspci -tv Β : This command Β shows PCI information.

————————————————————–OUTPUTβ€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

[root@kalwa2 ~]# lspci -tv
-[0000:00]-+-00.0 Intel Corporation 440BX/ZX/DX – 82443BX/ZX/DX Host bridge
+-01.0-[01]–
+-07.0 Intel Corporation 82371AB/EB/MB PIIX4 ISA
+-07.1 Intel Corporation 82371AB/EB/MB PIIX4 IDE
+-07.3 Intel Corporation 82371AB/EB/MB PIIX4 ACPI
+-07.7 VMware Virtual Machine Communication Interface
+-0f.0 VMware SVGA II Adapter
+-10.0 LSI Logic / Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI
+-11.0-[02]–+-00.0 VMware USB1.1 UHCI Controller
| +-01.0 Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
| +-02.0 Ensoniq ES1371 [AudioPCI-97]
| \-03.0 VMware USB2 EHCI Controller
+-15.0-[03]–
+-15.1-[04]–
+-15.2-[05]–
β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”OUTPUT truncated due to long listingβ€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”-
[root@kalwa2 ~]#

————————————————————–END OF OUTPUTβ€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

7. Β  lsusb -tv Β : This command Β shows USB information.

————————————————————–OUTPUTβ€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

[root@kalwa2 ~]# lsusb -tv
Bus# 2
`-Dev# 1 Vendor 0x1d6b Product 0x0001
|-Dev# 2 Vendor 0x0e0f Product 0x0003
`-Dev# 3 Vendor 0x0e0f Product 0x0002
`-Dev# 7 Vendor 0x0e0f Product 0x0008
Bus# 1
`-Dev# 1 Vendor 0x1d6b Product 0x0002
[root@kalwa2 ~]#

————————————————————–END OF OUTPUTβ€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

Β 

Β  Β  Β  Β  Β  Β  Β 

Now some disk related commands for troubleshooting.

  1. Β  Β hdparm -tT /dev/sdaΒ :This command performsΒ a read speed test on disk sda.

————————————————————–OUTPUTβ€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

[root@kalwa2 ~]# hdparm -tT /dev/sda

/dev/sda:
Timing cached reads: 11192 MB in 2.00 seconds = 5600.18 MB/sec
Timing buffered disk reads: 248 MB in 3.06 seconds = 81.04 MB/sec

————————————————————–END OF OUTPUTβ€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

  1. Β  Β  Β badblocks -s /dev/sdaΒ :This command performs test for unreadable blocks on disk sda.

————————————————————–OUTPUTβ€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

[root@kalwa2 ~]# badblocks -s /dev/sda
Checking for bad blocks (read-only test): done
[root@kalwa2 ~]#

————————————————————–END OF OUTPUTβ€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β 

Related Post