輸入w 命令api
[root@Carlton scripts]# w 18:38:17 up 2 days, 2:32, 4 users, load average: 0.00, 0.00, 0.00 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT carlton tty1 :0 Sun16 2days 7.21s 0.01s pam: gdm-password carlton pts/0 :0.0 Sun16 2days 0.01s 0.21s gnome-terminal root pts/1 119.145.10.77 18:28 0.00s 0.00s 0.00s w root tty7 :1 Sun16 2days 6.38s 6.38s /usr/bin/Xorg :1 -br -verbose -audit 4 -auth /var/run/gdm/auth-for-gdm-OyUK2i/database -nolisten tcp
Users:表明有幾個用戶登陸服務器
注意的地方有: load average 0.00,0.00,0.00 tcp
load average後面3個數字分別表明的意思是:fetch
1分鐘內的系統負載ui
5分鐘內的平均負載3d
15分鐘內的平均負載code
這個數值的大小參照於你服務器的CPU個數 ip
數值除以服務器的個數,大於1,則服務器繁忙,小於1則服務器正常ci
那麼如何查看服務器的個數呢? 見下圖terminal
[root@Carlton scripts]# cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 79 model name : Intel(R) Xeon(R) CPU E5-2682 v4 @ 2.50GHz stepping : 1 microcode : 1 cpu MHz : 2494.222 cache size : 40960 KB physical id : 0 siblings : 1 core id : 0 cpu cores : 1 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc up rep_good unfair_spinlock pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch xsaveopt fsgsbase bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx bogomips : 4988.44 clflush size : 64 cache_alignment : 64 address sizes : 46 bits physical, 48 bits virtual power management: [root@Carlton scripts]# grep -c 'processor' /proc/cpuinfo 1