Find Out Your Server Load, Users, and Uptime with One Letter

Sometimes, you are in a rush and just need to make sure your server is OK.  There are plenty of commands or scripts you could run to check on your server, but there is only one that only takes a single letter. The “w” command is quick, simple, and can be powerful.

When you are in a rush, just type w from the command line, and you will get output that looks like the following:

19:20:06 up 4 days,  8:42,  3 users,  load average: 1.03, 0.74, 0.64
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
user     tty1                      Sat18    2days  0.56s  0.50s -bash
user     pts/0    :0               Fri21    2days  0.00s  1:33  kdeinit4: kded4 [kdeinit]
user     pts/1    :0               19:20    0.00s  0.30s  0.00s w

This is from my laptop computer, so yours will likely look different. There are several pieces of information in this output. The first is the current server time and uptime. Hopefully yours will be longer than my 4-day-uptime laptop. The second piece tells you how many users are logged in, and the third gives you the server’s load average. Lower is better for load averages.

The rest of the output gives you details about each user and exactly what they are doing. In the example, there is really only one user running three different programs: bash, KDE, and the “w” program.

That’s it! It really is that simple. If you want to do even more things with “w”, be sure to read the documentation online or type “man w” from the command line.