cfg_opt_t load_opts[] = {
CFG_STR("format", "%1min %5min %15min", CFGF_NONE),
- CFG_INT("max_threshold", 5, CFGF_NONE),
+ CFG_FLOAT("max_threshold", 5, CFGF_NONE),
CFG_CUSTOM_COLOR_OPTS,
CFG_END()
};
CASE_SEC("load") {
SEC_OPEN_MAP("load");
- print_load(json_gen, buffer, cfg_getstr(sec, "format"), cfg_getint(sec, "max_threshold"));
+ print_load(json_gen, buffer, cfg_getstr(sec, "format"), cfg_getfloat(sec, "max_threshold"));
SEC_CLOSE_MAP;
}
void print_cpu_temperature_info(yajl_gen json_gen, char *buffer, int zone, const char *path, const char *format, int);
void print_cpu_usage(yajl_gen json_gen, char *buffer, const char *format);
void print_eth_info(yajl_gen json_gen, char *buffer, const char *interface, const char *format_up, const char *format_down);
-void print_load(yajl_gen json_gen, char *buffer, const char *format, const int max_threshold);
+void print_load(yajl_gen json_gen, char *buffer, const char *format, const float max_threshold);
void print_volume(yajl_gen json_gen, char *buffer, const char *fmt, const char *device, const char *mixer, int mixer_idx);
bool process_runs(const char *path);
#include <yajl/yajl_gen.h>
#include <yajl/yajl_version.h>
-void print_load(yajl_gen json_gen, char *buffer, const char *format, const int max_threshold) {
+void print_load(yajl_gen json_gen, char *buffer, const char *format, const float max_threshold) {
char *outwalk = buffer;
/* Get load */