package net.hyperic.sigar.cmd;

import net.hyperic.sigar.SigarException;

/**
 * Display System Information
 */
public class SysInfo extends SigarCommandBase {

    public SysInfo(Shell shell) {
        super(shell);
    }

    public SysInfo() {
        super();
    }

    public String getUsageShort() {
        return "Display system information";
    }

    public void output(String[] args) throws SigarException {
        //sigar/os info
        Version.printInfo(this.out);
        println("");

        //uptime
        new Uptime(this.shell).output(args);
        println("");

        //cpu info
        CpuInfo cpuinfo = new CpuInfo(this.shell);
        cpuinfo.displayTimes = false;
        cpuinfo.output(args);
        println("");

        //memory info
        new Free(this.shell).output(args);
        println("");

        //system resource limits
        println("System resource limits:");
        new Ulimit(this.shell).output(args);
    }

    public static void main(String[] args) throws Exception {
        new SysInfo().processCommand(args);
    }
}

@@ -25,16 +25,42 @@
 r.cmd;%0A%0A
+import java.util.Arrays;%0A%0A
 import n
@@ -846,32 +846,290 @@
   println(%22%22);%0A%0A
+        println(%22File Systems.........%22 +%0A                Arrays.asList(this.sigar.getFileSystemList()));%0A        println(%22%22);%0A%0A        println(%22Network Interfaces...%22 +%0A                Arrays.asList(this.sigar.getNetInterfaceList()));%0A        println(%22%22);%0A%0A
         //system

print filesystem and netif names