// /proc/<pid>/stat
if(unlikely(read_proc_pid_stat(p))) {
- error("Cannot process %s/proc/%d/stat", host_prefix, pid);
+ error("Cannot process %s/proc/%d/stat (command '%s')", host_prefix, pid, p->comm);
// there is no reason to proceed if we cannot get its status
return;
}
// check its parent pid
if(unlikely(p->ppid < 0 || p->ppid > pid_max)) {
- error("Pid %d states invalid parent pid %d. Using 0.", pid, p->ppid);
+ error("Pid %d (command '%s') states invalid parent pid %d. Using 0.", pid, p->comm, p->ppid);
p->ppid = 0;
}
// /proc/<pid>/io
if(unlikely(read_proc_pid_io(p)))
- error("Cannot process %s/proc/%d/io", host_prefix, pid);
+ error("Cannot process %s/proc/%d/io (command '%s')", host_prefix, pid, p->comm);
// --------------------------------------------------------------------
// /proc/<pid>/statm
if(unlikely(read_proc_pid_statm(p))) {
- error("Cannot process %s/proc/%d/statm", host_prefix, pid);
+ error("Cannot process %s/proc/%d/statm (command '%s')", host_prefix, pid, p->comm);
// there is no reason to proceed if we cannot get its memory status
return;
}
// /proc/<pid>/cmdline
if(likely(proc_pid_cmdline_is_needed)) {
if(unlikely(read_proc_pid_cmdline(p)))
- error("Cannot process %s/proc/%d/cmdline", host_prefix, pid);
+ error("Cannot process %s/proc/%d/cmdline (command '%s')", host_prefix, pid, p->comm);
}
if(unlikely(debug))
// /proc/<pid>/fd
if(unlikely(read_pid_file_descriptors(p))) {
- error("Cannot process entries in %s/proc/%d/fd", host_prefix, pid);
+ error("Cannot process entries in %s/proc/%d/fd (command '%s')", host_prefix, pid, p->comm);
}
// --------------------------------------------------------------------