0

According to the manpage for w:

-u   Ignores the username while figuring out the current process and cpu times. To demonstrate this, do a "su" and do a "w" and a "w -u".

I've tried this with(out) the -u option, both as root and as regular user, and get quite the same results. I don't think I get this option at all:

  • The headline provides the average load during the last 5, 10 and 15 minutes. Of all users, summed up, I guess.
  • Each line under the headers represents one account and its idle time as well as the average load and the CPU load of the current process.

Question

As I don't see any difference between the outputs and have no idea where something should be ignored: Where am I stuck here?!
 

The output of <code>w</code> command with(out) the <code>-u</code> option and – for me – not much difference…

(P.S.: I think to feel a massive facepalm gathering here…)

1 Answer 1

2

Run a sudo sleep 100 in a shell.

Now w will show bash, while w -u will show sleep as a command in the WHAT column.


w usually shows which command you are running in this terminal. Now sleep does not run as you but as root. With the -u option it will ignore the different username and display sleep anyway.

2
  • sudo - make stuff happen :) but: where does this ignore usernames?
    – erch
    Commented Jan 5, 2014 at 23:15
  • w usually shows which command you are running in this terminal. Now sleep does not run as you but as root. With the -u option it will ignore the different username and display sleep anyway.
    – michas
    Commented Jan 6, 2014 at 0:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .