Hardware information of the test machine:
View CPU information (model)
# Cat/proc/cpuinfo | grep name | cut-f2-d: | uniq-c
8 Intel (R) Xeon (R) CPU E5410 @ 2.33 GHz
(We can see eight logical CPUs and the CPU model)
# Cat/proc/cpuinfo | grep physical | uniq-c
4 physical id: 0
4 physical id: 1
(It means two 4-core CPUs)
# Getconf LONG_BIT
32
(This indicates that the current CPU runs in 32bit mode, but does not indicate that the CPU does not support 64bit)
# Cat/proc/cpuinfo | grep flags | grep 'lm '| wc-l
8
(If the result is greater than 0, 64bit computing is supported. lm indicates long mode, and lm indicates 64bit)
Let's take a full look at the cpu details, but we don't care about most of them.
# Dmidecode | grep 'processor information'
View memory information
# Cat/proc/meminfo
# Uname-
Linux euis1 2.6.9-55. ELsmp #1 SMP Fri Apr 20 17:03:35 EDT 2007 i686 i686 i386 GNU/Linux
(View the kernel information of the current operating system)
# Cat/etc/issue | grep Linux
Red Hat Enterprise Linux AS release 4 (Nahant Update 5)
(View the released version of the current operating system)
View the Machine Model
# Dmidecode | grep "Product Name"
View Nic Information
# Dmesg | grep-I eth
-------------
# Uname-a # view kernel/OS/CPU information # head-n 1/etc/issue # view OS version # cat/proc/cpuinfo # view CPU information # hostname # view computer name # lspci-TV # list all PCI devices # lsusb-TV # list all USB devices # lsmod # list loaded kernel modules # env # view environment variables
Resources
# Free-m # view memory usage and swap zone usage # df-h # view usage of each partition # du-sh <Directory Name> # view the size of a specified directory # grep MemTotal/proc /meminfo # view the total memory # grep MemFree/proc/meminfo # view the Amount of idle memory # uptime # view the system running time, number of users, and load # cat/proc/loadavg # view the system load
Disks and partitions
# Mount | column-t # view the status of the mounted partition # fdisk-l # view all partitions # swapon-s # view all swap partitions # hdparm-I/dev/hda # view disk parameter (applicable only to IDE devices) # dmesg | grep IDE # view the IDE Device Detection Status at startup
Network
# Ifconfig # view the attributes of all network interfaces # iptables-L # view firewall settings # route-n # view route tables # netstat-lntp # view all listening ports # netstat-antp # view all established connection # netstat-s # view network statistics
Process
# Ps-ef # view all processes # top # display Process status in real time
User
# W # view active users # id <User Name> # view specified user information # last # view User Logon logs # cut-d: -f1/etc/passwd # view all users in the system # cut-d:-f1/etc/group # view all groups in the system # crontab-l # view the scheduled tasks of the current user
Service
# Chkconfig -- list # list all system services # chkconfig -- list | grep on # list all started system services
Program
# Rpm-qa # view all installed software packages