Package com.ajjpj.abase.proc

Examples of com.ajjpj.abase.proc.CliCommand


        }
    }

    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 static 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

    }

    public static Map<String, String> getMountPoints() throws Exception {
        final Map<String, String> result = new HashMap<String, String>();

        for(String line: new CliCommand("df", "-P").getOutput()) {
            if(! line.startsWith("/dev/")) {
                continue;
            }

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

            add(data, timestamp, getIosInProgressKey(dev), iosInProgress, 0);
        }
    }

    static void contributeDiskSize(Map<String, AScalarDataPoint> data, long timestamp) throws Exception {
        final List<String> df = new CliCommand("df", "-P").getOutput();
        for(String line: df) {
            if(! line.startsWith("/dev/")) {
                continue;
            }
View Full Code Here

TOP

Related Classes of com.ajjpj.abase.proc.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.