MCPcopy Index your code
hub / github.com/apache/httpd / ap_get_loadavg

Function ap_get_loadavg

server/util.c:3360–3384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3358}
3359
3360AP_DECLARE(void) ap_get_loadavg(ap_loadavg_t *ld)
3361{
3362 /* preload errored fields, we overwrite */
3363 ld->loadavg = -1.0;
3364 ld->loadavg5 = -1.0;
3365 ld->loadavg15 = -1.0;
3366
3367#if HAVE_GETLOADAVG
3368 {
3369 double la[3];
3370 int num;
3371
3372 num = getloadavg(la, 3);
3373 if (num > 0) {
3374 ld->loadavg = (float)la[0];
3375 }
3376 if (num > 1) {
3377 ld->loadavg5 = (float)la[1];
3378 }
3379 if (num > 2) {
3380 ld->loadavg15 = (float)la[2];
3381 }
3382 }
3383#endif
3384}
3385
3386AP_DECLARE(char *) ap_get_exec_line(apr_pool_t *p,
3387 const char *cmd,

Callers 3

header_request_loadavgFunction · 0.85
status_handlerFunction · 0.85
httpd.hFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected