Package com.ajjpj.asysmon.util

Examples of com.ajjpj.asysmon.util.CliCommand


        final Snapshot prev = (Snapshot) mementos.get(KEY_MEMENTO);
        final Snapshot current = createSnapshot();

        final long diffTime = current.timestamp - prev.timestamp;

        final List<String> df = new CliCommand("df", "-P").getOutput();
        for(String line: df) {
            if(! line.startsWith("/dev/")) {
                continue;
            }
View Full Code Here


        }
    }

    private String kernelVersion() {
        try {
            return new CliCommand(1, "uname", "-v").getOutput().get(0);
        } catch (Exception e) {
            return "";
        }
    }
View Full Code Here

        }
    }

    private void registerHostName(EnvironmentCollector data) {
        try {
            data.add(new CliCommand(1, "uname", "-n").getOutput().get(0), KEY_OVERVIEW, "hostname");
        } catch (Exception e) {
        }
    }
View Full Code Here

        contributeMtab(data);
        contributeDf(data);
    }

    private void contributeDf(EnvironmentCollector data) throws Exception {
        for(String line: new CliCommand("df", "-P").getOutput()) {
            if(! line.startsWith("/dev/")) {
                continue;
            }

            final String[] split = line.split("\\s+");
View Full Code Here

TOP

Related Classes of com.ajjpj.asysmon.util.CliCommand

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.