我只是在尝试jt400.jar
从AS400
.
我想出了如何连接以及如何通过使用类SystemStatus
以及如何读取值来接收值SystemValues
。(只需要找到这些值的解释,对我有什么提示吗?)
谁能告诉我,其中的哪些功能SystemStatus
为我提供了 RAM 的使用或接收此信息的流行方式?
private static void getSystemStatus() throws AS400SecurityException, ErrorCompletingRequestException,
InterruptedException, IOException, ObjectDoesNotExistException, RequestNotSupportedException {
//Connect to AS400
AS400 as400 = new AS400("myAs400", "myUser", "myPassword");
//Reading SystemStatus like CPU usage and hdd usage
SystemStatus systemStatus = new SystemStatus(as400);
System.out.println(systemStatus.getPercentProcessingUnitUsed());
System.out.println(systemStatus.getActiveJobsInSystem());
//Reading SystemValues
SystemValueList sysValList = new SystemValueList(as400);
Vector<SystemValue> sysValVec = new Vector<SystemValue>();
sysValVec = sysValList.getGroup(SystemValueList.GROUP_ALL);
System.out.println("<<<< SystemValues >>>>");
for (SystemValue systemValue : sysValVec) {
String sysValName = systemValue.getName();
systemValue.getValue();
System.out.println("Value: " + sysValName + " - " + systemValue.getValue());
}
System.out.println("<<<< SystemValues >>>>");
}
我已经阅读了很多文档,但找不到任何东西。
http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_71/rzahh/as400obj.htm http://itknowledgeexchange.techtarget.com/itanswers/system-information-into-a-file/ http://www .ibm.com/developerworks/ibmi/library/i-javatoolbox/
提前致谢