监测unix平台的进程 高分奖励

xiaolang800 2003-07-18 11:22:16
怎么样才能在windows程序中加入对局域网中unix主机进程的监测。已经实现了对局域网中windows进程的监控,对于不能监测的windows平台的机器是要进行密码认证。所以我认为不能对unix系统监控也是由于没有登陆系统,因此我用如下代码连接:
using System.Managment;
....
...
ConnectionOptions opt=new ConnectionOption();
\\以下是用户命和密码
opt.Username="root";
opt.Passwork="root";
//192.1.1.1 是unix 主机的ip地址
ManagementScope s=new ManagementScope("\\\\192.1.1.1\\root",opt);
s.Connect();

执行上面语句后出现错误 提示为“无法创建终结点“

还望高手们指点
...全文
51 16 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
16 条回复
切换为时间正序
请发表友善的回复…
发表回复
xiaolang800 2003-07-21
  • 打赏
  • 举报
回复
我请教了一位大侠,但是他只是非常简单得说了一下 说要再unix上装snmp,具体得没有说
希望这能给大家带来想法,也来使我解决现在这个问题
aspnetwuxueyou 2003-07-21
  • 打赏
  • 举报
回复
There are two ways to implement your function
1. Set up a web service in your unix os, then you access the service from your web app to retrieve process info.
2. Use telnet, it's something not secure.
Using System.Diagnostics.Process, you can start telnet service, then you use this process to retrieve back process info in unix os.

May u good luck
aspnetwuxueyou 2003-07-20
  • 打赏
  • 举报
回复
等我帮你想想办法
xiaolang800 2003-07-19
  • 打赏
  • 举报
回复
up
维她奶 2003-07-19
  • 打赏
  • 举报
回复
帮你UP一下
xiaolang800 2003-07-19
  • 打赏
  • 举报
回复
我不能更改unix,只能使用它
xiaolang800 2003-07-18
  • 打赏
  • 举报
回复
up
xiaolang800 2003-07-18
  • 打赏
  • 举报
回复
up
aspnetwuxueyou 2003-07-18
  • 打赏
  • 举报
回复
Did you get services for Unix.
If you do not have it, how could you use WMI in unix operating system?
xiaolang800 2003-07-18
  • 打赏
  • 举报
回复
高手们不要不帮忙!!!!
up
up
up
up
AhBian 2003-07-18
  • 打赏
  • 举报
回复
但愿有异想就会天开。
aspnetwuxueyou 2003-07-18
  • 打赏
  • 举报
回复
I think the only way you can implement it is to
1. Build a server application in unix that can return process info in data packet.
2. Your .net client communicate with the unix server.
Use socket to send tcp packet.
维她奶 2003-07-18
  • 打赏
  • 举报
回复
up
xiaolang800 2003-07-18
  • 打赏
  • 举报
回复
I see!
不使用wmi,有没有其他的方法连接unix系统平台,或者不用连接,直接获取unix系统的进程列表
xiaolang800 2003-07-18
  • 打赏
  • 举报
回复
up
aspnetwuxueyou 2003-07-18
  • 打赏
  • 举报
回复
You don't what WMI is.

WMI is composed of CIM-compliant store, CIM Object Manager, WMI provider. For example, you develop a driver, you can use WMI provider for WDM to store some information, then the use can use WMI to retrieve these informations.
WMI is something like a registry or a database.

You can retrieve system info using System.Management from remote machine, only because all windows OS implement WMI, and the OS stores info in the WMI store.

WMI is part of Windows Operating System, I can't find it in Unix OS, i.e. you could never use WMI to access Unix

111,094

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • AIGC Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧