uptime - Tell how long the system has been running.
upjustin@Justin:~$ uptime 10:45:10 up 13 min, 2 users, load average: 0.45, 0.89, 0.7
uptime gives a one line display of the following information.
running,
NOTE:
System load averages is the average number of processes that are either in a runnable or uninterruptable state.
waiting to use the CPU. (vmstat - proc - r)
is waiting for some I/O access, eg waiting for disk. (vmstat - proc - b)
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.
load average 一般来说不能大于系统cpu的个数:
uptime 的输出是w命令输出的第一行:
justin@Justin:~$ w 10:53:38 up 22 min, 2 users, load average: 0.07, 0.49, 0.66 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT justin tty7 :0 10:34 21:56 1:08 0.25s gnome-session justin pts/1 :0.0 10:45 0.00s 0.75s 0.03s w
FILEs:
/var/run/utmp information about who is currently logged on
justin@Justin:~$ uptime -V procps version 3.2.8