Commands with dynamic displays eat up more time than “snapshot” displays.

Some programs are designed to keep updating themselves. What’s ironic is that many of these programs are used to monitor system resources, while they themselves use up more than their fair share.

A classic example is the xload program, which shows you the system load average in a small X window. xload polls the operating system every 10 seconds for the system load average, and then updates the display. While this is an appropriate tool for the person responsible for maintaining the system, so he or she will know when the system is becoming overloaded, it’s unnecessary for regular users. The only reason a regular user might want to know the load average is if he or she wants to know if this is a good time to start a resource-intensive job. If that’s the case, the uptime command will tell you the load average, and it won’t add significantly to that average.

Another example is the top program, which is installed on many systems. top shows you what processes have been using up the most process time. However, you’ll find that top itself is almost always at the top of the list, because it updates the listing every five seconds.

Even clock programs might come into play here. If you run a program that updates the time every second, then it’s going to work 60 times as hard as one that updates every minute.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset