mod_tile 0.9.1
Renders map tiles with Mapnik and serves them using Apache HTTP Server
Loading...
Searching...
No Matches
sys_utils.h File Reference

Go to the source code of this file.

Functions

double get_load_avg (void)
 Retrieve the system's 1-minute load average.

Function Documentation

◆ get_load_avg()

double get_load_avg ( void )

Retrieve the system's 1-minute load average.

Queries the 1-minute load average via getloadavg() when HAVE_GETLOADAVG is defined, falling back to reading and parsing the first floating-point field from /proc/loadavg on Linux-like systems. If the load average cannot be obtained or parsed, returns 1000.0 as a high sentinel value so callers treat the host as overloaded.

Returns
Current 1-minute load average, or 1000.0 on failure.