blocked) >= BUFSIZE)
return;
+ DBG ("running = %i; sleeping = %i; zombies = %i; stopped = %i; paging = %i; blocked = %i;",
+ running, sleeping, zombies, stopped, paging, blocked);
+
plugin_submit (MODULE_NAME, "-", buf);
}
if ((fh = fopen (filename, "r")) == NULL)
{
- syslog (LOG_ERR, "Cannot open `%s': %s", filename, strerror (errno));
+ syslog (LOG_NOTICE, "Cannot open `%s': %s", filename,
+ strerror (errno));
continue;
}
if (fgets (buf, BUFSIZE, fh) == NULL)
{
+ syslog (LOG_NOTICE, "Unable to read from `%s': %s",
+ filename, strerror (errno));
fclose (fh);
continue;
}
fclose (fh);
if (strsplit (buf, fields, BUFSIZE) < 3)
+ {
+ DBG ("Line has less than three fields.");
continue;
+ }
switch (fields[2][0])
{
}
}
- closedir(proc);
+ closedir (proc);
ps_submit (running, sleeping, zombies, stopped, paging, blocked);
#endif /* KERNEL_LINUX */