some Load Sensor tips

Posted by Rayson Thu, 22 Sep 2005 05:02:00 GMT

1) turning off output stream buffering

By default scripting languages such as Perl and Python have the output stream buffered. If a load sensor is written in one of those languages, buffering needs to be turned off. For example:
- in Perl: $|++;
- in python: python -u

2) the suggested sequence of collecting external load

Collecting external load can be slow. A good example is contacting a flexlm server for the number of licenses available.

Charu wrote, “… in any case a good idea is to grab the values *before* the ‘read input’ part. IE, [grab values] –> [read input, check it] –> [echo output] –> [repeat]. In this way, you perform the (potentially) slow step of getting license values during the load report interval, instead of between the read and the echo.”
Link to Charu’s mail.