sstrncpy(vl.plugin, "cgroups", sizeof(vl.plugin));
sstrncpy(vl.plugin_instance, plugin_instance, sizeof(vl.plugin_instance));
sstrncpy(vl.type, "cpu", sizeof(vl.type));
sstrncpy(vl.plugin, "cgroups", sizeof(vl.plugin));
sstrncpy(vl.plugin_instance, plugin_instance, sizeof(vl.plugin_instance));
sstrncpy(vl.type, "cpu", sizeof(vl.type));
- ssnprintf(abs_path, sizeof(abs_path), "%s/%s", dirname, cgroup_name);
+ snprintf(abs_path, sizeof(abs_path), "%s/%s", dirname, cgroup_name);
status = lstat(abs_path, &statbuf);
if (status != 0) {
ERROR("cgroups plugin: stat (\"%s\") failed.", abs_path);
status = lstat(abs_path, &statbuf);
if (status != 0) {
ERROR("cgroups plugin: stat (\"%s\") failed.", abs_path);
}
/* We are only interested in directories, so skip everything else. */
if (!S_ISDIR(statbuf.st_mode))
}
/* We are only interested in directories, so skip everything else. */
if (!S_ISDIR(statbuf.st_mode))
- ssnprintf(abs_path, sizeof(abs_path), "%s/%s/cpuacct.stat", dirname,
- cgroup_name);
+ snprintf(abs_path, sizeof(abs_path), "%s/%s/cpuacct.stat", dirname,
+ cgroup_name);
fh = fopen(abs_path, "r");
if (fh == NULL) {
char errbuf[1024];
ERROR("cgroups plugin: fopen (\"%s\") failed: %s", abs_path,
sstrerror(errno, errbuf, sizeof(errbuf)));
fh = fopen(abs_path, "r");
if (fh == NULL) {
char errbuf[1024];
ERROR("cgroups plugin: fopen (\"%s\") failed: %s", abs_path,
sstrerror(errno, errbuf, sizeof(errbuf)));
- ssnprintf(abs_path, sizeof(abs_path), "%s/%s", dirname, filename);
+ snprintf(abs_path, sizeof(abs_path), "%s/%s", dirname, filename);
status = lstat(abs_path, &statbuf);
if (status != 0) {
ERROR("cgroups plugin: stat (%s) failed.", abs_path);
status = lstat(abs_path, &statbuf);
if (status != 0) {
ERROR("cgroups plugin: stat (%s) failed.", abs_path);
}
if (S_ISDIR(statbuf.st_mode)) {
status = walk_directory(abs_path, read_cpuacct_procs,
/* user_data = */ NULL,
/* include_hidden = */ 0);
}
if (S_ISDIR(statbuf.st_mode)) {
status = walk_directory(abs_path, read_cpuacct_procs,
/* user_data = */ NULL,
/* include_hidden = */ 0);
if (strcasecmp(key, "CGroup") == 0) {
if (ignorelist_add(il_cgroup, value))
if (strcasecmp(key, "CGroup") == 0) {
if (ignorelist_add(il_cgroup, value))
} else if (strcasecmp(key, "IgnoreSelected") == 0) {
if (IS_TRUE(value))
ignorelist_set_invert(il_cgroup, 0);
else
ignorelist_set_invert(il_cgroup, 1);
} else if (strcasecmp(key, "IgnoreSelected") == 0) {
if (IS_TRUE(value))
ignorelist_set_invert(il_cgroup, 0);
else
ignorelist_set_invert(il_cgroup, 1);