开发者

how to read task manager list using java program

I am trying to read the processes names f开发者_开发问答rom different REMOTE machines' task managers list. i.e., A java program that keep polls into different remote machines task lists.

Can any one suggest a good solution for this...?

Thanks in advance...


You can use WMI for connection to remote windows machine and ssh to connect to uinx machine.

There are a lot of free SSH implementations for java. If you need WMI I'd recommed you jinterop.

for WMI use

select * from WIN32_Process;

for ssh use

ps command.

Window support telenet too, so you can connect to windows using telnet if you want.


Probably the simplest way would be to have the remote machines publish their list of processes to authenticated clients - in other words, you'd need a "server" app on each of the remote machines, from which your client app would receive the process list.

Possible caveats:

  • remote-side app needed to monitor processes on that machine (you can't just read the process list off any machine, you need their cooperation)
  • authentication (you don't want just anyone to read the process list just by opening a connection to the remote server)
  • encryption (you don't want people to snoop the list out of the network as it's transmitted)
  • reliability (the server process may be slow/stop responding when computer is too loaded)
  • observer effect (at the very least, you'll see your "process-list-server" as an additional process)
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜