[LCP]Kernel Sensors
Matthew Sanderson
matthew at DaMOO.csun.edu
Tue Nov 20 16:49:04 UTC 2001
Hi Karel,
You want to use the system call 'getrusage' (this is pretty portable
across different *NIXes), and/or read the files located under the virtual
directory '/proc/<pid>/' (fairly specific to Linux).
I don't know which getrusage fields correspond to the NT statistics you
list, because I don't understand windoze's MM subsystem. When does a byte
become 'committed'? When the marriage ring is in place? ;-)
I do however know enough to say this: these operating systems are designed
very differently, and direct comparisons even of statistics that mean the
same thing may not be meaningful because the system design differs.
For instance, my Win32 programmer colleague says that M$ are moving most
of their kernel-mode drivers into ring 0 (!). And they already have a lot
of stuff (eg printer drivers) that run in kernel mode that absolutely
don't need to and could be moved to userspace, and are in user space
under *NIX. So even though 'Priveleged Time' and 'ru_stime' *may* mean the
same thing, comparing them may not be meaningful. And so on for other
fields. Caveat comparator, or something.
HTH
--m@
On Fri, 16 Nov 2001, Karel Cardona wrote:
>
>
> Hi Folks,
>
> I need to get some system sensors from a Linux box, these sensors exist in
> Windows NT but I don't know if the Linux Kernel provided these sensors:
>
> - Privileged Time
> - % Disk Time
> - Committed bytes
> - % Committed bytes in use
> - Current disk queue length
>
> Best Regards,
>
> Karel Cardona
> Software Engineer
> MSI-Miami
> www.marsys.com
> www.metilinx.com
>
>
> _______________________________________________
> This is the Linux C Programming List
> : http://lists.linux.org.au/listinfo/linuxcprogramming List
>
More information about the linuxCprogramming
mailing list