| 2 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 3 |  | # Display the following data. | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 4 |  |  | 
 
 
 
 
 
 
 
 | 5 | + |  | 
 
 
 
 
 
 
 
 | 6 | + | printLine("Machine identification"); | 
 
 
 
 
 
 
 
 | 7 | + |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 8 |  | showStat("Machine Name", "packet.attributes.machine_name", $input); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 9 |  | showStat("I.P. Address", "packet.attributes.ip", $input); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 10 |  |  | 
 
 
 
 
 
 
 
 
 | 8 | – | printLine(); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 11 |  |  | 
 
 
 
 
 
 
 
 | 12 | + | printLine("Load"); | 
 
 
 
 
 
 
 
 | 13 | + |  | 
 
 
 
 
 
 
 
 | 14 | + | showStat("Load 1", "packet.load.load1", $input, "load"); | 
 
 
 
 
 
 
 
 | 15 | + | showStat("Load 5", "packet.load.load5", $input, "load"); | 
 
 
 
 
 
 
 
 | 16 | + | showStat("Load 15", "packet.load.load15", $input, "load"); | 
 
 
 
 
 
 
 
 | 17 | + |  | 
 
 
 
 
 
 
 
 | 18 | + |  | 
 
 
 
 
 
 
 
 | 19 | + | printLine("Memory graphs"); | 
 
 
 
 
 
 
 
 | 20 | + |  | 
 
 
 
 
 
 
 
 | 21 | + | showBar("Swap Used", "packet.swap.free", "packet.swap.total", "Mb", $input, "swap", 'swap'); | 
 
 
 
 
 
 
 
 | 22 | + | showBar("Memory Used", "packet.memory.free", "packet.memory.total", "Mb", $input, "mem", 'swap'); | 
 
 
 
 
 
 
 
 | 23 | + | showStat("Swap Pages in (per sec)", "packet.pages.swapins", $input, "paging"); | 
 
 
 
 
 
 
 
 | 24 | + | showStat("Swap Pages out (per sec)", "packet.pages.swapouts", $input, "paging"); | 
 
 
 
 
 
 
 
 | 25 | + |  | 
 
 
 
 
 
 
 
 | 26 | + | printLine("CPU graphs"); | 
 
 
 
 
 
 
 
 | 27 | + |  | 
 
 
 
 
 
 
 
 | 28 | + | showBar("User CPU", "packet.cpu.user", 100, "%", $input, "cpu"); | 
 
 
 
 
 
 
 
 | 29 | + | showBar("Swap CPU", "packet.cpu.swap", 100, "%", $input, "cpu"); | 
 
 
 
 
 
 
 
 | 30 | + | showBar("Idle CPU", "packet.cpu.idle", 100, "%", $input, "cpu"); | 
 
 
 
 
 
 
 
 | 31 | + | showBar("Kernel CPU", "packet.cpu.kernel", 100, "%", $input, "cpu"); | 
 
 
 
 
 
 
 
 | 32 | + | showBar("IO wait CPU", "packet.cpu.iowait", 100, "%", $input, "cpu"); | 
 
 
 
 
 
 
 
 | 33 | + |  | 
 
 
 
 
 
 
 
 | 34 | + |  | 
 
 
 
 
 
 
 
 | 35 | + | printLine("Operating System"); | 
 
 
 
 
 
 
 
 | 36 | + |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 37 |  | showStat("Operating System Release", "packet.os.release", $input); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 38 |  | showStat("Operating System Version", "packet.os.version", $input); | 
 
 
 
 
 
 
 
 
 
 
 | 39 | < | showStat("Operating System Name", "packet.os.name", $input"); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 13 | < | showStat("System Name", "packet.os.sysname", $input); | 
 
 
 
 
 
 
 
 
 | 39 | > | showStat("Operating System Name", "packet.os.name", $input); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 40 |  | showStat("Operating System Platform", "packet.os.platform", $input); | 
 
 
 
 
 
 
 
 | 41 | + | showStat("System Name", "packet.os.sysname", $input); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 42 |  |  | 
 
 
 
 
 
 
 
 
 | 16 | – | printLine(); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 43 |  |  | 
 
 
 
 
 
 
 
 
 
 
 | 44 | < | showStat("Sleeping Processes", "packet.processes.sleeping", $input); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 19 | < | showStat("Zombie Processes", "packet.processes.zombie", $input); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 20 | < | showStat("Stopped Processes", "packet.processes.stopped", $input); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 21 | < | showStat("CPU Processes", "packet.processes.cpu", $input); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 22 | < | showStat("Total Processes", "packet.processes.total", $input); | 
 
 
 
 
 
 
 
 
 | 44 | > | printLine("Processes"); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 45 |  |  | 
 
 
 
 
 
 
 
 
 
 
 | 46 | < | printLine(); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 46 | > | showStat("Total Processes", "packet.processes.total", $input, "proc"); | 
 
 
 
 
 | 47 | > | showStat("CPU Processes", "packet.processes.cpu", $input, "proc"); | 
 
 
 
 
 | 48 | > | showStat("Sleeping Processes", "packet.processes.sleeping", $input, "proc"); | 
 
 
 
 
 | 49 | > | showStat("Zombie Processes", "packet.processes.zombie", $input, "proc"); | 
 
 
 
 
 | 50 | > | showStat("Stopped Processes", "packet.processes.stopped", $input, "proc"); | 
 
 
 
 
 
 
 
 
 
 
 | 51 |  |  | 
 
 
 
 
 
 
 
 
 | 26 | – | showStat("Uptime (um... seconds)", "packet.os.uptime", $input); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 52 |  |  | 
 
 
 
 
 
 
 
 
 
 
 | 53 | < | printLine(); | 
 
 
 
 
 
 
 
 
 | 53 | > | printLine("Uptime"); | 
 
 
 
 
 
 
 
 
 
 
 | 54 |  |  | 
 
 
 
 
 
 
 
 
 
 
 | 55 | < | showStat("Last sequence number", "packet.attributes.seq_no", $input); | 
 
 
 
 
 
 
 
 
 | 55 | > | showStat("Seconds Uptime", "packet.os.uptime", $input); | 
 
 
 
 
 
 
 
 
 
 
 | 56 |  |  | 
 
 
 
 
 
 
 
 
 | 32 | – | printLine(); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 57 |  |  | 
 
 
 
 
 
 
 
 
 
 
 | 58 | < | showStat("Number of users", "packet.users.count", $input); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 35 | < | showStat("User list", "packet.users.list", $input); | 
 
 
 
 
 
 
 
 
 | 58 | > | printLine("Disks"); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 59 |  |  | 
 
 
 
 
 
 
 
 
 
 
 | 60 | < | printLine(); | 
 
 
 
 
 
 
 
 
 | 60 | > | showDisks("packet.disk", "Kb", $input); | 
 
 
 
 
 
 
 
 
 
 
 | 61 |  |  | 
 
 
 
 
 
 
 
 
 | 39 | – | showStat("Load 1", "packet.load.load1", $input); | 
 
 
 
 
 
 
 
 
 | 40 | – | showStat("Load 5", "packet.load.load5", $input); | 
 
 
 
 
 
 
 
 
 | 41 | – | showStat("Load 15", "packet.load.load15", $input); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 62 |  |  | 
 
 
 
 
 
 
 
 
 
 
 | 63 | < | printLine(); | 
 
 
 
 
 
 
 
 
 | 63 | > | printLine("Packet"); | 
 
 
 
 
 
 
 
 
 
 
 | 64 |  |  | 
 
 
 
 
 
 
 
 
 
 
 | 65 | < | showBar("User CPU", "packet.cpu.user", 100, $input); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 46 | < | showBar("Swap CPU", "packet.cpu.swap", 100, $input); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 47 | < | showBar("Idle CPU", "packet.cpu.idle", 100, $input); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 48 | < | showBar("Kernel CPU", "packet.cpu.kernel", 100, $input); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 49 | < | showBar("IO wait CPU", "packet.cpu.iowait", 100, $input); | 
 
 
 
 
 
 
 
 
 | 65 | > | showStat("Last sequence number", "packet.attributes.seq_no", $input); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 66 |  |  | 
 
 
 
 
 
 
 
 
 | 51 | – | printLine(); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 67 |  |  | 
 
 
 
 
 
 
 
 
 
 
 | 68 | < | showBar("Swap Free", "packet.swap.free", "packet.swap.total", $input); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 54 | < | showBar("Memory Free", "packet.memory.free", "packet.memory.total", $input); | 
 
 
 
 
 
 
 
 
 | 68 | > | printLine("Users"); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 69 |  |  | 
 
 
 
 
 
 
 
 | 70 | + | showStat("Number of users", "packet.users.count", $input, "users"); | 
 
 
 
 
 
 
 
 | 71 | + | showStat("User list", "packet.users.list", $input); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 72 |  |  | 
 
 
 
 
 
 
 
 
 
 
 | 73 | < | ?> | 
 
 
 
 
 
 
 
 
 | 73 | > | ?> |