I am just experimenting with the jt400.jar
to receive system information from an AS400
.
I figured out how to connect and how to receive values by using the class SystemStatus
and how to read SystemValues
. (only need to find an explanation for those values, any hints for me?)
Can anyone tell me, which of the functions in SystemStatus
delivers me the usage of RAM or a poper way of receiving this information?
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 >>>>");
}
I already read a lot of documentation but was not able to find anything.
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/
Thanks in advance