szaydel
10/8/2019 - 9:00 PM

Get sched information from kernel for a suspect process


cat /proc/{PID}/sched | \
  awk 'BEGIN {printf("{");} 
    { 
      if (NR > 2 && $1 != "numa_faults")
        printf("\"%s\": %.4f,", $1, $3)
    }
    END
    {
      printf("\b"); printf("}");
    }'