uptime (显示有关系统已运行多长时间的信息)

嚯嚯 发表于 2020-07-22 17:29
浏览次数:
在手机上阅读

在类似Unix的操作系统上,uptime命令告诉您系统已经运行了多长时间。 本文档介绍了Linux版本的uptime。

查看英文版

目录

1 uptime 运行系统环境

2 uptime 描述

3 uptime 语法

4 uptime 示例

uptime 运行系统环境

Linux

uptime 描述

uptime 单行显示以下信息:

  • 当前时间。
  • 系统已运行多长时间。
  • 当前有多少用户登录。
  • 过去1、5和15分钟的系统平均负载。

正常运行时间信息与w显示在标题行中的信息相同。

平均系统负载是处于可运行或不可中断状态的平均进程数。处于可运行状态的进程正在使用CPU或等待使用CPU。处于不间断状态的进程正在等待某些I / O访问,例如,等待磁盘。在三个时间间隔内取平均值。没有针对CPU数量对平均负载进行标准化,因此平均负载为“ 1”表示一直都在加载单个CPU系统,而在4 CPU系统上则意味着75%的时间处于空闲状态。

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.
  • The system load averages for the past 1, 5, and 15 minutes.

The uptime information is the same information contained in the header line displayed by w.

System load averages is the average number of processes that are either in a runnable or uninterruptible state. A process in a runnable state is either using the CPU or waiting to use the CPU. A process in uninterruptible 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, 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.

查看英文版

查看中文版

uptime 语法

uptime [options]
选件
-h--help 显示简短的帮助消息,然后退出。
-V--version 显示版本信息,然后退出。
档案
/var/run/utmp 有关谁当前登录的信息。
/proc 处理信息。
uptime [options]
Options
-h--help Display a brief help message, and exit.
-V--version Display version information, and exit.
Files
/var/run/utmp Information about who is currently logged on.
/proc Process information.

查看英文版

查看中文版

uptime 示例

uptime

显示系统正常运行时间信息。输出将类似于以下内容:

08:11:22 up 146 days, 34 min, 3 users, load average: 0.28, 0.45, 0.38

以下是上述输出含义的细分。

08:11:22 当前系统时间是8:11 AM(和22秒)。
up 146 days, 34 min 该系统已运行146天34分钟。
3 users 系统上有三个用户会话处于活动状态。
load average: 0.28, 0.45, 0.38 最近1分钟,5分钟和15分钟的平均CPU负载分别为0.28、0.45和0.38。该数字代表全部CPU负载的百分比,其中零是无负载,而1.00是满负载。大于1.00的数字表示对CPU的要求超出了实时要求,某些任务将等待CPU时间。例如,如果平均CPU负载为1.70,则CPU的税率为170%。也就是说,当前进程的70%将被迫在任何给定时间等待。
uptime

Displays system uptime information. Output will resemble the following:

08:11:22 up 146 days, 34 min, 3 users, load average: 0.28, 0.45, 0.38

The following is a breakdown of what the above output means.

08:11:22 The current system time is 8:11 A.M. (and 22 seconds).
up 146 days, 34 min The system has been up for 146 days and 34 minutes.
3 users Three user sessions are active on the system.
load average: 0.28, 0.45, 0.38 The average CPU load for the last 1, 5, and 15 minutes is 0.28, 0.45, and 0.38, respectively. The number represents a percentage of full CPU load, where zero is no load, and 1.00 is full load. A number greater than 1.00 indicates that the CPU has been asked more than it can do in real time, and some tasks will wait for CPU time. For example, if the average CPU load is 1.70, the CPU is taxed at 170%. That is, 70% of the current processes will be forced to wait at any given time.

查看英文版

查看中文版

其他命令行

userdel | usermod | ul | umask | unalias | uname | uncompress | unhash | uniq | until | unlink | unpack | unzip | useradd |

如此好文,分享给朋友
发表评论
验证码:
评论列表
共0条