1

Why the 'uptime' command showing the load output faster than the 'w' command. I am unable to use the 'w' command in high load environment but the 'uptime' shows the results more faster..

Phil S
  • 11
  • 1

1 Answers1

1

uptimedoes less work, and is my default way to see load average. At very high load levels, w looping over the users is significant.

Notice the uptime line is probably identical. Both are from the procps package and using the same implementation. The source code is straightforward if you want to learn what exactly these do, these are simple utilities.

Performance tools sometimes don't scale well at the extremes. Running top is a noticeable impact on a system with 20,000 processes.

John Mahowald
  • 32,050
  • 2
  • 19
  • 34