开发者

Functions for system status C#

开发者 https://www.devze.com 2022-12-18 19:13 出处:网络
I\'m looking for general system stat开发者_开发知识库e functions for Mono. Things I need are:

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 or ifconfig, or check the routing tables.
  • Running processes/services/daemons (Mono.Unix.UnixProcess) System.Diagnostics.Process class?

Hope this helps, Best regards, Tom.

0

精彩评论

暂无评论...
验证码 换一张
取 消