X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fprocesses.c;h=a6c50965a041ce921c6d5cdd0cac342f33ad3adf;hb=754a0590a5e28b0d3d1cb655865fd91a14d5a71d;hp=9ae48dbd741adff2d7bb9fef10babb2682e3d8c4;hpb=cce136946b879557f91183e4de58e92b81e138c8;p=collectd.git diff --git a/src/processes.c b/src/processes.c index 9ae48dbd..a6c50965 100644 --- a/src/processes.c +++ b/src/processes.c @@ -897,33 +897,6 @@ static procstat_t *ps_read_tasks_status (int pid, procstat_t *ps) return (ps); } /* int *ps_read_tasks_status */ -static int ps_read_tasks (int pid) -{ - char dirname[64]; - DIR *dh; - struct dirent *ent; - int count = 0; - - ssnprintf (dirname, sizeof (dirname), "/proc/%i/task", pid); - - if ((dh = opendir (dirname)) == NULL) - { - DEBUG ("Failed to open directory `%s'", dirname); - return (-1); - } - - while ((ent = readdir (dh)) != NULL) - { - if (!isdigit ((int) ent->d_name[0])) - continue; - else - count++; - } - closedir (dh); - - return ((count >= 1) ? count : 1); -} /* int *ps_read_tasks */ - /* Read data from /proc/pid/status */ static procstat_t *ps_read_status (int pid, procstat_t *ps) {