// update pids from proc
int read_proc_pid_cmdline(struct pid_stat *p) {
-
+
if(unlikely(!p->cmdline_filename)) {
char filename[FILENAME_MAX + 1];
snprintfz(filename, FILENAME_MAX, "%s/proc/%d/cmdline", global_host_prefix, p->pid);
found++;
}
break;
-
+
case 2:
if(p->cmajflt > lost) {
fprintf(stderr, " > process %d (%s) could use the lost exited child majflt %llu of process %d (%s)\n", p->pid, p->comm, lost, pe->pid, pe->comm);
found++;
}
break;
-
+
case 3:
if(p->cutime > lost) {
fprintf(stderr, " > process %d (%s) could use the lost exited child utime %llu of process %d (%s)\n", p->pid, p->comm, lost, pe->pid, pe->comm);
case 1:
fprintf(stderr, " > cannot find any process to use the lost exited child minflt %llu of process %d (%s)\n", lost, pe->pid, pe->comm);
break;
-
+
case 2:
fprintf(stderr, " > cannot find any process to use the lost exited child majflt %llu of process %d (%s)\n", lost, pe->pid, pe->comm);
break;
-
+
case 3:
fprintf(stderr, " > cannot find any process to use the lost exited child utime %llu of process %d (%s)\n", lost, pe->pid, pe->comm);
break;
cpuuser = me.ru_utime.tv_sec * 1000000ULL + me.ru_utime.tv_usec;
cpusyst = me.ru_stime.tv_sec * 1000000ULL + me.ru_stime.tv_usec;
- bcopy(&now, &last, sizeof(struct timeval));
- bcopy(&me, &me_last, sizeof(struct rusage));
+ memmove(&last, &now, sizeof(struct timeval));
+ memmove(&me_last, &me, sizeof(struct rusage));
}
buffer_sprintf(output,
error("PLUGINSD: %s sleeping for %llu. Will kill with SIGCONT pid %d to wake it up.\n", cd->fullfilename, susec, cd->pid);
usleep(susec);
killpid(cd->pid, SIGCONT);
- bcopy(&now, &last, sizeof(struct timeval));
+ memmove(&last, &now, sizeof(struct timeval));
break;
}
#endif