技术知识库

帮助中心 >  产品文档 >  云服务器 >  ubuntu查看系统运行时间

uptime [options]


下面是该工具的手册页解释它的方式:


uptime gives a one line display of the following information. The current time, how long the system

has been running, how many users are currently logged on, and the system load averages for the past

1, 5, and 15 minutes.

下面的问答样例应该能让你更好地了解正常运行时间命令的工作原理。


正常运行时间的基本使用非常简单 - 只需编写命令的名称,然后按回车即可。


uptime

这是工具产生的输出类型:

image.png



如何使用正常运行时间命令


因此,第一个条目是当前时间,然后“上”显示系统正在运行,5:53是系统已经启动的总时间,最后是系统负载平均值。 以防万一你想知道更多,这里是正常运行时间手册页上最后一项说:


System load averages is the average number of processes that are either in a runnable or 

uninterruptable state. A process in a runnable state is  either using the CPU or waiting to use the

CPU. A process in uninterruptable state is waiting for some I/O access, eg waiting for  disk.


The  averages are taken over the three time intervals. Load averages are not normalized for the 

number of CPUs in a system, so a load  average  of 1 means a single CPU system is loaded all the 

time while on a 4 CPU system it means it was idle 75% of the time.


如果你只是想知道系统已经启动的时间,并且也是以一种更易读的格式,使用-p命令行选项。


uptime -p

image.png

提交成功!非常感谢您的反馈,我们会继续努力做到更好!

这条文档是否有帮助解决问题?

非常抱歉未能帮助到您。为了给您提供更好的服务,我们很需要您进一步的反馈信息:

在文档使用中是否遇到以下问题: