uptime命令记录在线时长
时间:2014-11-29 13:28 来源:linux.it.net.cn 作者:IT
如何获得Linux服务器当前已经运行了多长时间?
可以通过uptime命令,执行该命令后会返回一组数据
例如:
20:03:36 up 11:41, 3 users, load average: 0.15, 0.14, 0.05
其中,
20:03:36 当前的系统时间
11:41 服务器开机后持续的运行时间
3 users 当前登录到系统的用户数,包括通过远程工具登录的
load average 分别代表了最近1分钟、5分钟、15分钟系统的平均负载
还可以通过访问/proc/uptime
man /proc
/proc/uptime
This file contains two numbers:
1. the uptime of the system (seconds)
2. the amount of time spent in idle process (seconds). (责任编辑:IT)
如何获得Linux服务器当前已经运行了多长时间? 可以通过uptime命令,执行该命令后会返回一组数据 例如: 20:03:36 up 11:41, 3 users, load average: 0.15, 0.14, 0.05 其中, 20:03:36 当前的系统时间 11:41 服务器开机后持续的运行时间 3 users 当前登录到系统的用户数,包括通过远程工具登录的 load average 分别代表了最近1分钟、5分钟、15分钟系统的平均负载 还可以通过访问/proc/uptime man /proc /proc/uptime This file contains two numbers: 1. the uptime of the system (seconds) 2. the amount of time spent in idle process (seconds). (责任编辑:IT) |