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.
- Β 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βββββββββββββ
Β
- Β 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.
- Β Β 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βββββββββββββ
- Β Β Β 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βββββββββββββ
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β