I'm looking for general system stat开发者_开发知识库e functions for Mono. Things I need are:
- Memory (available, total)
- Free disk space
- IP Number
- External IP
- Running processes / services / daemons
How do I get those?
Thanks in advance,
Yvan
In the order of your list requirements, I have outlined the necessary namespaces for those functions. Since you did not supply the platform...
- Memory (available/total) Perhaps, System.Environment class?
- Free Disk Space (Mono.Unix.DriveInfo namespace) System.IO.DriveInfo?
- IP number (Mono.Unix.UnixEndPoint) System.Net.EndPoint?
- External IP address - not sure about this, this would be based on the output of
ipconfig
orifconfig
, or check the routing tables. - Running processes/services/daemons (Mono.Unix.UnixProcess) System.Diagnostics.Process class?
Hope this helps, Best regards, Tom.
精彩评论