Re: kernel patch for /proc/stat addition

James Mastros (root@jennifer-unix.dyn.ml.org)
Tue, 26 Aug 1997 23:00:47 -0400 (EDT)


On Tue, 26 Aug 1997, Phil Schwan wrote:
> [...]
> Feedback is appreciated, let me know what I'm doing wrong, if there's
> something :) What sort of chance of getting into the kernel does this have?
>
> Phil
>
> for (i = 0 ; i < NR_IRQS ; i++)
> len += sprintf(buffer + len, " %u", kstat.interrupts[i]);
> len += sprintf(buffer + len,
> "\nctxt %u\n"
> "btime %lu\n"
> - "processes %lu\n",
> + "processes %lu\n"
> + "prstcnts %u %u %u %u %u %u\n",
> kstat.context_swtch,
> xtime.tv_sec - jiffies / HZ,
> - total_forks);
> + total_forks, running, sleeping, disk_sleep,
> + zombie, stopped, paging);
> return len;
> }

I would much prefer to output somthing like
Running: 123
Sleeping: 456
Disk_sleep: 789
Zombie: 123
Stopped: 456
Paging: 789

That way we get that nice, readable "tag: val" pair that we argue so much
about periodicly.

-=- James Mastros