static const char *config_keys[] = {"ReportRelative"};
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
static const char *config_keys[] = {"ReportRelative"};
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
static int load_config(const char *key, const char *value) {
if (strcasecmp(key, "ReportRelative") == 0)
#ifdef _SC_NPROCESSORS_ONLN
static int load_config(const char *key, const char *value) {
if (strcasecmp(key, "ReportRelative") == 0)
#ifdef _SC_NPROCESSORS_ONLN
#else
WARNING("load plugin: The \"ReportRelative\" configuration "
"is not available, because I can't determine the "
"number of CPUS on this system. Sorry.");
#endif
#else
WARNING("load plugin: The \"ReportRelative\" configuration "
"is not available, because I can't determine the "
"number of CPUS on this system. Sorry.");
#endif
#ifdef _SC_NPROCESSORS_ONLN
if (report_relative_load) {
if ((cores = sysconf(_SC_NPROCESSORS_ONLN)) < 1) {
#ifdef _SC_NPROCESSORS_ONLN
if (report_relative_load) {
if ((cores = sysconf(_SC_NPROCESSORS_ONLN)) < 1) {
- WARNING("load: sysconf failed : %s",
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ WARNING("load: sysconf failed : %s", STRERRNO);
if (getloadavg(load, 3) == 3)
load_submit(load[LOADAVG_1MIN], load[LOADAVG_5MIN], load[LOADAVG_15MIN]);
else {
if (getloadavg(load, 3) == 3)
load_submit(load[LOADAVG_1MIN], load[LOADAVG_5MIN], load[LOADAVG_15MIN]);
else {
- char errbuf[1024];
- WARNING("load: getloadavg failed: %s",
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ WARNING("load: getloadavg failed: %s", STRERRNO);
if (perfstat_cpu_total(NULL, &cputotal, sizeof(perfstat_cpu_total_t), 1) <
0) {
if (perfstat_cpu_total(NULL, &cputotal, sizeof(perfstat_cpu_total_t), 1) <
0) {
- char errbuf[1024];
- WARNING("load: perfstat_cpu : %s",
- sstrerror(errno, errbuf, sizeof(errbuf)));
- return (-1);
+ WARNING("load: perfstat_cpu : %s", STRERRNO);
+ return -1;