public static void main(String[] args) throws Exception { new MultiPs().processCommand(args); } }
public void output(String[] args) throws SigarException { String query = args[0]; MultiProcCpu cpu = this.proxy.getMultiProcCpu(query); println("Number of processes: " + cpu.getProcesses()); println("Cpu usage: " + CpuPerc.format(cpu.getPercent())); println("Cpu time: " + Ps.getCpuTime(cpu.getTotal())); ProcMem mem = this.proxy.getMultiProcMem(query); println("Size: " + Sigar.formatSize(mem.getSize())); println("Resident: " + Sigar.formatSize(mem.getResident())); println("Share: " + Sigar.formatSize(mem.getShare())); }
registerCommandHandler("route", new Route(this)); registerCommandHandler("version", new Version(this)); registerCommandHandler("mps", new MultiPs(this)); registerCommandHandler("sysinfo", new SysInfo(this)); registerCommandHandler("time", new Time(this));