diff --git a/kill.c b/kill.c index c3dbe86..ce805cd 100644 --- a/kill.c +++ b/kill.c @@ -403,10 +403,15 @@ void debug_print_procinfo(procinfo_t* cur) return; } fill_informative_fields(cur); - debug("pid %5d: badness %3d VmRSS %7lld uid %4d oom_score_adj %4d \"%s\"", + debug("%5d %9d %7lld %5d %13d \"%s\"", cur->pid, cur->badness, cur->VmRSSkiB, cur->uid, cur->oom_score_adj, cur->name); } +void debug_print_procinfo_header() +{ + debug(" PID OOM_SCORE RSSkiB UID OOM_SCORE_ADJ COMM\n"); +} + /* * Find the process with the largest oom_score or rss(when flag --sort-by-rss is set). */ @@ -422,6 +427,8 @@ procinfo_t find_largest_process(const poll_loop_args_t* args) clock_gettime(CLOCK_MONOTONIC, &t0); } + debug_print_procinfo_header(); + procinfo_t victim = { 0 }; while (1) { errno = 0;