System Information and Operation status acquisition

Source: Internet
Author: User

System type
Uname-o
System version
Cat/etc/issue
Number of system bits
Uname-a
System kernel
Uname-r
Host Name
Hostname, UNAME-N, Echo $HOSTNAME
Intranet IP
Hostname-i
Public network IP
Curl-s
System DNS
cat/etc/resolv.conf | Grep-e "\<nameserver[]+" |awk ' {print $NF} '
Test network
Ping-c www.baidu.com &>/dev/null && echo "internet:connected" | | echo "Internet:disconnected"
Number of current user logins
Who, W

Analyze the operating state of the system
Free-m
Total used free shared buffers Cached
mem:3831 3347 484 34 194 2668
-/+ buffers/cache:483 3348
swap:4094 0 4094
Cached cache is used primarily for open file least use principle (LRU)
Buffers sub-cache is mainly used for the first-in-and-out policies of directory entries, inode nodes, etc.

Cat/proc/meminfo
Memtotal Total Memory
Memfree Memory Usage Memory
System memory
awk '/memtotal/{total=$2}/memfree/{free=$2}end{print (tolal-free)/1024} '/proc/meminfo

CPU Load
Top-n 1-b | grep "Load average:" |awk ' {print $ $13 $14} '

Hard Drive information
Df-h
Filesystem Size used Avail use% mounted on
/dev/sda2 9.8G 4.3G 5.0G 46%/
Tmpfs 1.9G 0 1.9G 0%/dev/shm
/DEV/SDA1 380M 78M 282M 22%/boot
/dev/sda3 18G 1.6G 15G 10%/data

Filesystem Disk device Name
Size Device Total
Used already used capacity
Avail Usable capacity
Use% Usage Capacity Percentage
Mounted on device mounted system catalog file
DF-HP | Grep-v Filesystem | awk ' {print $ ' "$"

System Information and Operation status acquisition

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.