*/
running = strstr(buffer, id);
if (!running) {
- WARNING("procs_running not found");
+ WARNING("'processes ' not found in /proc/stat");
return -1;
}
running += strlen(id);
processes = strstr(buffer, id);
if (!processes) {
- WARNING("processes not found");
+ WARNING("'processes ' not found in /proc/stat");
return -1;
}
ctxt = strstr(buffer, id);
if (!ctxt) {
- WARNING("ctxt not found");
+ WARNING("'ctxt ' not found in /proc/stat");
return -1;
}
closedir(proc);
if (read_file_contents("/proc/stat", buffer, sizeof(buffer) - 1) <= 0) {
- ERROR("Cannot open `/proc/stat`");
+ ERROR("Cannot read `/proc/stat`");
return -1;
}
/* get procs_running from /proc/stat