Grigsby, Garl wrote:

> Does anyboyd know where I can find out what the "C" colum in a `ps
> -ef` means? I looked through the man page, but it didn't jump out at
> me. The reason I am asking is that I have a backup process the will
> run for a while and then crashes with no error. The only thing I
> have noticed is that just before it crashes the "C" column in `ps
> -ef` grows. I'm hoping there is something there to help me figure
> out what is happening.

C means Crashing.  That's why it goes up just before the crash. (-:

But seriously, folks, here's the code from ps.c that prints it.

/* "Processor utilisation for scheduling."  --- we use %cpu w/o fraction */
static int pr_c(char *restrict const outbuf, const proc_t *restrict const pp){
  unsigned long long total_time;   /* jiffies used by this process */
  unsigned pcpu = 0;               /* scaled %cpu, 99 means 99% */
  unsigned long long seconds;      /* seconds of process life */
  total_time = pp->utime + pp->stime;
  if(include_dead_children) total_time += (pp->cutime + pp->cstime);
  seconds = seconds_since_boot - pp->start_time / Hertz;
  if(seconds) pcpu = (total_time * 100ULL / Hertz) / seconds;
  if (pcpu > 99U) pcpu = 99U;
  return snprintf(outbuf, COLWID, "%2u", pcpu);
}

I read that as percent CPU over the process's lifetime.


-- 
Bob Miller                              K<bob>
kbobsoft software consulting
http://kbobsoft.com                     [EMAIL PROTECTED]
_______________________________________________
EuG-LUG mailing list
[EMAIL PROTECTED]
http://mailman.efn.org/cgi-bin/listinfo/eug-lug

Reply via email to