Search code examples
javamemoryibm-midrangeramjt400

AS400 jt400 get RAM usage


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


Solution

  • I don't think you're going to find that information.

    IBM i Operating System, (aka OS/400) doesn't see RAM & HDD separately. Instead, it sees a single large address space known as the single level store.

    http://db2fori.blogspot.com/2012/11/one-of-crown-jewels-single-level-storage.html

    Certainly the low level Technology Independent Machine Interface (TIMI) knows about RAM/SSD/HDD. But that's buried deep. IBM surfaces some of that information via it's own command such as

    Work Disk Status (WRKDSKSTS)
                   Size    % 
    Unit  Type      (M)  Used
       1  4327    52923  68.9
       2  4327    52923  68.9
    

    But memory is basically always 100% used. The system basically treats all RAM as a cache for objects from auxiliary (SSD/HDD) storage.