uptime
Tell the current time, how long the system has been running, the number of users, and the system load averages for the past 1, 5 and 15 minutes.
Usage:
uptime [options]
Options:
-p, --pretty show uptime in pretty format
-h, --help display this help and exit
-s, --since system up since
-V, --version output version information and exit
$ uptime
09:34:30 up 12 min, 0 users, load average: 6.78, 6.98, 4.92
$ uptime -s
2021-01-28 09:22:10
/proc/loadavg
The first three columns measure CPU and IO utilization of the last one, five, and 10 minute periods. The fourth column shows the number of currently running processes and the total number of processes. The last column displays the last process ID used.
$ cat /proc/loadavg
6.64 7.00 5.63 4/3687 8040
/proc/stat
# cat /proc/stat
cpu 164819 22146 193253 814793 4009 35944 8266 0 0 0
cpu0 45538 3739 68998 161187 1012 23293 5696 0 0 0
cpu1 47436 3906 63997 180322 1758 9408 1408 0 0 0
cpu2 39190 6546 34574 227399 658 1821 718 0 0 0
cpu3 32655 7955 25684 245885 581 1422 444 0 0 0
intr 15149646 0 0 0 7548845 0 87104 566796 0 4 0 0 949 27659 0 0 0 0 0 0 0 0 0 0 0 0 1 85968 200 107290 2725 23561 0 14192 132 311930 0 0 0 0 80545 65 0 0 0 0 2854 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 33332 0 239935 0 0 0 0 10 0 0 0 0 29 0 3315 0 0 0 6 0 0 0 0 0 0 0 0 93 0 0 0 1 1 0 2 2 0 0 215440 527879 1 0 0 0 0 0 1327 62431 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 326 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 52 0 0 0 0 0 0 0 0 0 2

本文详细介绍了Linux系统监控的一些关键工具和文件,如`uptime`用于查看系统运行时间和负载平均值,`/proc`目录下如`loadavg`和`stat`提供CPU和系统状态信息,`vmstat`展示内存、交换、IO和CPU活动,以及`/sys/devices/system/cpu`揭示CPU调度详情。这些工具对于理解和优化Linux系统的性能至关重要。
最低0.47元/天 解锁文章
8780

被折叠的 条评论
为什么被折叠?



