Examples of CliCommand


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

Examples of com.ajjpj.abase.proc.CliCommand

        }
    }

    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

Examples of com.ajjpj.abase.proc.CliCommand

        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

Examples of com.ajjpj.abase.proc.CliCommand

    }

    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

Examples of com.ajjpj.abase.proc.CliCommand

            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

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

Examples of com.ajjpj.asysmon.util.CliCommand

        }
    }

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

Examples of com.ajjpj.asysmon.util.CliCommand

        }
    }

    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

Examples of com.ajjpj.asysmon.util.CliCommand

        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

Examples of com.sun.enterprise.admin.cli.CLICommand

    protected int dasNotRunning(boolean local) throws CommandException {
        if (!local)
            throw new CommandException(
                Strings.get("restart.dasNotRunningNoRestart"));
        logger.warning(strings.get("restart.dasNotRunning"));
        CLICommand cmd = habitat.getService(CLICommand.class, "start-domain");
        /*
         * Collect the arguments that also apply to start-domain.
         * The start-domain CLICommand object will already have the
         * ProgramOptions injected into it so we don't need to worry
         * about them here.
         *
         * Usage: asadmin [asadmin-utility-options] start-domain
         *      [-v|--verbose[=<verbose(default:false)>]]
         *      [--upgrade[=<upgrade(default:false)>]]
         *      [--debug[=<debug(default:false)>]] [--domaindir <domaindir>]
         *      [-?|--help[=<help(default:false)>]] [domain_name]
         *
         * Only --debug, --domaindir, and the operand apply here.
         */
        List<String> opts = new ArrayList<String>();
        opts.add("start-domain");
        if (debug != null) {
            opts.add("--debug");
            opts.add(debug.toString());
        }
        if (domainDirParam != null) {
            opts.add("--domaindir");
            opts.add(domainDirParam);
            // XXX - would this be better?
            //opts.add(getDomainRootDir().toString());
        }
        if (getDomainName() != null)
            opts.add(getDomainName());

        return cmd.execute(opts.toArray(new String[opts.size()]));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.