ubuntu cpu负载_获取Ubuntu Linux上的平均CPU /系统负载

ubuntu cpu负载

ubuntu cpu负载

Ubuntu linux has a rich set of commands for getting system info. One of the useful pieces of information that a system administrator might need is to know what the overall system load on a server is.

Ubuntu linux有很多用于获取系统信息的命令。 系统管理员可能需要的有用信息之一是,了解服务器上整个系统的负载是多少。

There are a couple of ways to get this information, which may or may not be enabled on your system. It’s useful to know more than one way to get the uptime information in case the commands are disabled on your shared hosting server.

有两种获取此信息的方法,您的系统可能启用或未启用。 如果在共享托管服务器上禁用了命令,则了解不止一种获取正常运行时间信息的方法很有用。

uptime

正常运行时间

The uptime command gives information on system load averages for the past 1, 5, and 15 minutes:

uptime命令提供有关过去1分钟,5分钟和15分钟的系统平均负载的信息:

Example:

例:

[root@ubuntu geek]# uptime05:59:07 up 87 days, 13:13, 1 user, load average: 0.00, 0.00, 0.39

[root @ ubuntu geek]#uptime05:59:07 up 87 days,13:13,1 user,平均负载:0.00,0.00,0.39

w

w

The w command shows who is logged on and what they are doing, including system load averages for the past 1, 5, and 15 minutes.

w命令显示谁已登录以及他们正在做什么,包括过去1、5和15分钟的平均系统负载。

[root@ubuntu geek]# uptime05:59:56 up 87 days, 13:13, 1 user, load average: 0.00, 0.00, 0.39USER TTY FROM LOGIN@ IDLE JCPU PCPU WHATgeek pts/0 192.168.1.115 6:31pm 0.00s 0.62s 0.03s /usr/sbin/sshd

[root @ ubuntu geek]#正常运行时间05:59:56最多87天,13:13、1个用户,平均负载:0.00、0.00、0.39来自登录用户的TTY @ IDLE JCPU PCPU WHATgeek pts / 0 192.168.1.115 6:31 pm 0.00秒0.62秒0.03秒/ usr / sbin / sshd

/proc/loadavg

/ proc / loadavg

The /proc/loadavg file contains information on the system load. Most likely the uptime/w commands utilize this information. The first 3 values contain system load averages for the past 1, 5, and 15 minutes.

/ proc / loadavg文件包含有关系统负载的信息。 uptime / w命令最有可能利用此信息。 前三个值包含过去1、5和15分钟的系统平均负载。

[root@ubuntu geek]# cat /proc/loadavg0.00 0.00 0.39 1/49 15352

[root @ ubuntu geek]#cat /proc/loadavg0.00 0.00 0.39 1/49 15352

There are probably some more commands, but these are the ones off the top of my head that I know of.

可能还有更多的命令,但是这些是我所不知道的。

翻译自: https://www.howtogeek.com/howto/ubuntu/get-cpu-system-load-average-on-ubuntu-linux/

ubuntu cpu负载

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值