系统状态C#的功能 [英] Functions for system status C#

查看:110
本文介绍了系统状态C#的功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找Mono的常规系统状态功能.我需要的是:

I'm looking for general system state functions for Mono. Things I need are:

  • 内存(可用,总计)
  • 可用磁盘空间
  • IP号码
  • 外部IP
  • 运行进程/服务/守护程序

我怎么得到那些?

预先感谢

伊万

推荐答案

按照您的列表要求的顺序,我为这些功能概述了必要的命名空间.由于您没有提供平台...

In the order of your list requirements, I have outlined the necessary namespaces for those functions. Since you did not supply the platform...

  • 内存(可用/总计),也许是System.Environment类?
  • 可用磁盘空间(Mono.Unix.DriveInfo命名空间)System.IO.DriveInfo?
  • IP号(Mono.Unix.UnixEndPoint)System.Net.EndPoint?
  • 外部IP地址-不确定,这将基于ipconfigifconfig的输出,或者检查路由表.
  • 正在运行进程/服务/守护程序(Mono.Unix.UnixProcess)System.Diagnostics.Process类吗?
  • 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.

这篇关于系统状态C#的功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆