简体   繁体   English

仅提供主机名,登录用户名和密码的远程系统的可用系统内存,磁盘空间,CPU使用率是否可​​行?

[英]Is it feasible to get available system memory, disk space, cpu usage of a remote system only providing host name, Login UserId and Password

I'm checking the system parameters like CPU Utilisation, Memory utilisation etc of a remote system(Windows server) only by login in to that system remotely(running mstsc). 我仅通过远程登录(运行mstsc)该系统来检查远程系统(Windows服务器)的系统参数,例如CPU利用率,内存利用率等。 There I provide the inputs like ServerIP or Host name, Port number, Login UserId and Password. 在那里,我提供了诸如ServerIP或主机名,端口号,登录用户名和密码之类的输入。

There are Java programs by which we can get the local system's parameter. 有一些Java程序可用来获取本地系统的参数。 We can go for building and the deploying such a J2EE application in broadcast mode in the remote server and on calling the services which can return the server system's parameters. 我们可以在远程服务器上以广播模式构建和部署这样的J2EE应用程序,然后调用可以返回服务器系统参数的服务。 But

-> I do not want to install any software/server in remote system. ->我不想在远程系统中安装任何软件/服务器。 -> I don't want to deploy J2EE application in remote server. ->我不想在远程服务器中部署J2EE应用程序。 Simply I don't want any change in remote server. 简而言之,我不想对远程服务器进行任何更改。

Is there any way to get these parameters of remote servers by Java or any language provided only running application from local systems; 是否有任何方法可以通过Java或仅从本地系统运行应用程序提供的任何语言来获取远程服务器的这些参数; without touching the Remote system. 无需触摸远程系统。

Thanks in Advance!! 提前致谢!!

if you can't install a JVM in the remote server, than you cannot run a java program there :-) 如果您无法在远程服务器中安装JVM,则无法在其中运行Java程序:-)

what you can do, then, is to automate the routine to connect to the machine, capture input and output, send some commands and retrieve their results, just like you would do with expect for example. 然后,您可以做的是使例程自动化以连接到计算机,捕获输入和输出,发送一些命令并检索其结果,例如您对Expect的期望。

there are some java libraries that behave like expect, such as enchanter, expectj, expect4j, etc. 有些Java库的行为类似于Expect,例如附魔,expectj,expect4j等。

the tricky part here, of course, is how you're going to connect to these servers. 当然,这里最棘手的部分是如何连接这些服务器。 If you can use telnet is easier to automate, because that is only text in and out. 如果可以使用telnet,则更容易实现自动化,因为那只是文本输入和输出。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM