karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Lichtin <lich...@yahoo.com>
Subject shell:info command, memory details, infoproviders
Date Tue, 14 Nov 2017 14:03:29 GMT
Wanted to ask two things about shell:info (4.0.10)

a) OS Memory details:

    printValue("Total physical memory", maxNameLen, printSizeInKb(getSunOsValueAsLong(os,
"getTotalPhysicalMemorySize")));
    printValue("Free physical memory", maxNameLen, printSizeInKb(getSunOsValueAsLong(os,
"getFreePhysicalMemorySize")));
    printValue("Committed virtual memory", maxNameLen, printSizeInKb(getSunOsValueAsLong(os,
"getCommittedVirtualMemorySize")));
    printValue("Total swap space", maxNameLen, printSizeInKb(getSunOsValueAsLong(os, "getTotalSwapSpaceSize")));
    printValue("Free swap space", maxNameLen, printSizeInKb(getSunOsValueAsLong(os, "getFreeSwapSpaceSize")));

Above code does not currently work under Linux. 
Could work if we would use com.sun.management.OperatingSystemMXBean instead, I guess?

b) InfoProviders

    if (infoProviders != null) {
        // dump all properties to Map, KARAF-425

not seeing any output from any provider, is this feature still in use or could it be dismantled?

- Martin


Mime
View raw message