Recently found that big data technology deployment, high availability, cluster and web site load Balancing, automation operations, disaster preparedness and so on actually have a lot of knowledge are coincident, to learn Linux operation and maintenance related, in the big data research will also be improved. Since the work needs to go to the system to learn the Linux operation and maintenance technology, then go to the good to learn it ~ ~, and I also like to do this. :)
Summarize the common commands that understand the status of a server: (The results of two server tests)
(1) View Linux version:
[Email protected] home]# lsb_release-alsb Version: : Core-4.1-amd64:core-4.1- Noarchdistributor ID: centosdescription: 7.0. 1406 (Core) Release: 7.0. 1406codename: Core
(2) Check the system's hard disk usage:
DF -
Filesystem Size used Availuse%
8 %/#这里第一行应该是系统用户所分配的硬盘的占用情况
0 0%/dev//
%/data #挂载的硬盘的大小
(3) To view the size of a file in a directory:
[[Email protected]
du -H--max-depth=11. 6G./5. 2G./MySQL 509M. /7. 3G.
(4) View Linux memory usage:
free-m total used free shared buffers Cachedmem: 992 916 65 -/+ Buffers/cache: 788 204Swap: 0 0 0
Total: Memory count.
Look at the remaining memory: the free:204 of the +buffers/cahe column (also known as free+buffers+cached. can also be used-buffers-cashed).
(5) To view the size of a directory or file:
du -sh jdk8315m jdk8
(6) Check the average load on the system:
Uptime : +- 2: 4 users, 0.960.770.64
Here the load average three number and generally not logical CPU number
[Email protected] backup]#Cat/proc/cpuinfo |grep "Physical ID"|Sort|Uniq|WC-L #物理cpu个数4[email protected] backup]#Cat/proc/cpuinfo |grep "CPU Cores"|Uniq #cpu核数CPU Cores:1[email protected] backup]#Cat/proc/cpuinfo |grep "Processor"|WC-L #逻辑cpu个数4
Number of physical CPUs *CPU cores = number of logical CPUs
0.96+0.77+0.64 =2.73 < 4, there is no problem.
(7) Check the network card configuration:
[Email protected] network-scripts]# ifconfig
Linux Operations Technology (view common commands for Linux server status)