Start and stop programs depending on the system load

Slashdot it! Delicious Share on Facebook Tweet! Digg!
HONGQI ZHANG, 123RF.com

HONGQI ZHANG, 123RF.com

Weight Lifting

Long-running and resource-hungry programs are best deployed when the computer has nothing much to do. The loadwatch tool can make this happen.

The following is a very simple idea. During times when the load on the system is low, a daemon starts programs that have long computing times and therefore could otherwise interfere with user interaction.

In systems built along the lines of Unix, these helpful spirits are referred to as daemons. They putter along as processes in the background and spring into action as soon as a particular event or condition occurs.

The concept of taking advantage of low system load is easy to implement. Thanks to the /proc/ filesystem, important system information is made available to all processes. Even the average user can enter cat /proc/loadavg on a terminal and find out what the current system is or what it was. Listing 1 shows the output the user will receive.

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF

Pages: 3

Price $0.99
(incl. VAT)

Buy Ubuntu User

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content