Linux view the CPU information, type of machines and other hardware information

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

Test the machine's hardware information:

To view the CPU information (model)
# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
      8  Intel(R) Xeon(R) CPU            E5410   @ 2.33GHz
(see the 8 logic CPU, know the CPU model)

# cat /proc/cpuinfo | grep physical | uniq -c
      4 physical id      : 0
      4 physical id      : 1
(that is actually two stars 4 core CPU)

# getconf LONG_BIT
   32
(the CPU is running in 32bit mode, but it does not mean that CPU does not support 64bit)

# cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l
   8
(the result is greater than 0, that support 64bit. LM refers to the long mode calculation, LM is 64bit)


To complete CPU detailed information, but most of us don't care about it.
# dmidecode | grep 'Processor Information'

Check the inventory information
# cat /proc/meminfo

# uname -a
Linux euis1 2.6.9-55.ELsmp #1 SMP Fri Apr 20 17:03:35 EDT 2007 i686 i686 i386 GNU/Linux
(see the current operating system kernel information)

# cat /etc/issue | grep Linux
Red Hat Enterprise Linux AS release 4 (Nahant Update 5)
(see the release information about the current operating system)

Check the machine model
# dmidecode | grep "Product Name" 

View card information
# dmesg | grep -i eth

-------------

# uname -a               # View the kernel / operating system /CPU information
# head -n 1 /etc/issue   # Check the operating system version
# cat /proc/cpuinfo      # To view the CPU information
# hostname               # Check the computer name
# lspci -tv              # A list of all PCI equipment
# lsusb -tv              # A list of all USB equipment
# lsmod                  # A list of kernel module loading
# env                    # The environmental variables

Resources

# free -m                # View memory usage and exchange area usage
# df -h                  # Check the partition usage
# du -sh <The directory name > # view of the specified directory size
# grep MemTotal /proc/meminfo   # View the amount of memory
# grep MemFree /proc/meminfo    # Check the amount of free memory
# uptime                 # View the system running time, number of users, load
# cat /proc/loadavg      # View the system load

Disk and partition

# mount | column -t      # See hanging partition state
# fdisk -l               # View all partitions
# swapon -s              # View all the swap partition
# hdparm -i /dev/hda     # View disk parameters (only for IDE devices)
# dmesg | grep IDE       # IDE detection equipment to check start

Network

# ifconfig               # To view the properties for all network interfaces
# iptables -L            # Check the firewall settings
# route -n               # Check the routing table
# netstat -lntp          # View all listening port
# netstat -antp          # Check all connections have been established.
# netstat -s             # Check the network statistics

Process

# ps -ef                 # View all processes
# top                    # Real time display of process state

The user

# w                      # To view the active user
# id <The user name > # view specific user information
# last                   # View user login log
# cut -d: -f1 /etc/passwd   # All users to view the system
# cut -d: -f1 /etc/group    # View the system all groups
# crontab -l             # Plan view of the current user

Service

# chkconfig --list       # List of all system services
# chkconfig --list | grep on    # System service list all start

The program

# rpm -qa                # View all installed packages

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Oprah at November 10, 2013 - 2:46 PM