Re: kernel patch for /proc/stat addition

AppleUni Author (ag784@freenet.buffalo.edu)
Tue, 26 Aug 1997 23:30:21 -0400 (EDT)


>
> here, gimme some feedback on this idea
>
> --------------------------------------------------------------------------
> 'The ultimate seal on any software product is not any sort of kite mark or
> standards conformance certificate, it's that label that says, "Destruction
> tested by Alan Cox.... Survived."' -- Clive Dolphin (3Com PDD)
>
> ---------- Forwarded message ----------
> Date: Tue, 26 Aug 1997 23:00:47 -0400 (EDT)
> From: James Mastros <root@jennifer-unix.dyn.ml.org>
> To: Phil Schwan <pschwan@apk.net>
> Cc: linux-kernel@vger.rutgers.edu
> Subject: Re: kernel patch for /proc/stat addition
>
> 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
>
>
>

yes, but that also slows down the process of reading that information with
extra system calls... some may think it's trivial, but when you are doing a
real-time display as we are, it does matter. :-)

I don't see why we couldn't have the detailed one in another, seperate file
though...

Yours,

-- 

________________ -= Andrew Kroll =---------------\ /----------------------------- Tired of Bill Gates? LL \ /Think Bill is getting MY CASH?? Win '95 sucks! DOS is OK. LL II NNNNN UU UU XX XX Linux! A free Un*x Want to turn your PC intoLL II NN NN UU UU XXX clone for 386/486/P5's a powerful workstation? LLLLL II NN NN UUUUU XX XX FINALLY A -=REAL=- OS! -------------------------------------\ /--= <ag784@freenet.buffalo.edu> =-- \ / \/ FREELY available at your favorite ftp site!