[Mono-list] Getting CPU, Disk, RAM information using P/Invoke or other technique in C# using Monowith Linux

J.P. Trosclair jptrosclair at judelawfirm.com
Fri Mar 28 15:16:15 EDT 2008

If you're just targeting linux, you can make use of the files /proc/cpuinfo
and /proc/meminfo for the CPU and memory respectively. I'm not sure what
info you can get from /proc about the discs other that /proc/partitions that
will give you block sizes.


-----Original Message-----
From: mono-list-bounces at lists.ximian.com
[mailto:mono-list-bounces at lists.ximian.com] On Behalf Of Krishna Nadiminti
Sent: Wednesday, March 19, 2008 12:32 AM
To: mono-list at lists.ximian.com
Subject: [Mono-list] Getting CPU, Disk,RAM information using P/Invoke or
other technique in C# using Monowith Linux


Hi all,


I'm looking to get CPU, Disk, RAM usage (and total availability) information
using C# on Mono and Linux.


I know that there are some .NET framework classes that give some of the
information, but some of them are not yet implemented in Mono.


I've searched a good bit on google and nabble ->mono forums but it looks
like I'm searching using the wrong keywords. 


I'm not a Linux/C programmer, and so I'm unaware of the p/invoke
possibilities with Linux. I've no idea which lib*.so files have what
functions exported.


If I can find managed code libraries that help me to do what I mentioned
above - great! Otherwise, I'd like some pointers to how it can be done.
(p/invokes for example?)


It'll be great if one of you guys with knowledge in Linux + C#/.NET could
help me out.




ps. Thanks to all the guys @ Novell and the community - Mono has surprised
me and many others in how far it has come in such a short time! Great work!





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20080328/31c9efba/attachment.html 

More information about the Mono-list mailing list