| 1 | 
 pjm2 | 
 1.1 | 
 <? | 
 
 
 
 
 
 | 2 | 
   | 
   | 
  | 
 
 
 
 
 
 | 3 | 
   | 
   | 
 # Display the following data. | 
 
 
 
 
 
 | 4 | 
   | 
   | 
  | 
 
 
 
 
 
 
 
 
 | 5 | 
 pjm2 | 
 1.6 | 
  | 
 
 
 
 
 
 | 6 | 
   | 
   | 
 printLine("Machine identification"); | 
 
 
 
 
 
 
 
 
 | 7 | 
 pjm2 | 
 1.5 | 
  | 
 
 
 
 
 
 
 
 
 | 8 | 
 pjm2 | 
 1.1 | 
 showStat("Machine Name", "packet.attributes.machine_name", $input); | 
 
 
 
 
 
 
 
 
 | 9 | 
 pjm2 | 
 1.2 | 
 showStat("I.P. Address", "packet.attributes.ip", $input); | 
 
 
 
 
 
 | 10 | 
   | 
   | 
  | 
 
 
 
 
 
 
 
 
 | 11 | 
 pjm2 | 
 1.6 | 
  | 
 
 
 
 
 
 
 
 
 | 12 | 
 tdb | 
 1.13 | 
 printLine("Operating System"); | 
 
 
 
 
 
 
 
 
 | 13 | 
 pjm2 | 
 1.6 | 
  | 
 
 
 
 
 
 
 
 
 | 14 | 
 tdb | 
 1.13 | 
 showStat("Operating System Release", "packet.os.release", $input); | 
 
 
 
 
 
 | 15 | 
   | 
   | 
 showStat("Operating System Version", "packet.os.version", $input); | 
 
 
 
 
 
 | 16 | 
   | 
   | 
 showStat("Operating System Name", "packet.os.name", $input); | 
 
 
 
 
 
 | 17 | 
   | 
   | 
 showStat("Operating System Platform", "packet.os.platform", $input); | 
 
 
 
 
 
 | 18 | 
   | 
   | 
 showStat("System Name", "packet.os.sysname", $input); | 
 
 
 
 
 
 
 
 
 | 19 | 
 pjm2 | 
 1.6 | 
  | 
 
 
 
 
 
 | 20 | 
   | 
   | 
  | 
 
 
 
 
 
 | 21 | 
   | 
   | 
 printLine("CPU graphs"); | 
 
 
 
 
 
 | 22 | 
   | 
   | 
  | 
 
 
 
 
 
 
 
 
 | 23 | 
 tdb | 
 1.11 | 
 showBar("User CPU", "packet.cpu.user", 100, "%", $input, "cpu"); | 
 
 
 
 
 
 | 24 | 
   | 
   | 
 showBar("Swap CPU", "packet.cpu.swap", 100, "%", $input, "cpu"); | 
 
 
 
 
 
 | 25 | 
   | 
   | 
 showBar("Idle CPU", "packet.cpu.idle", 100, "%", $input, "cpu"); | 
 
 
 
 
 
 | 26 | 
   | 
   | 
 showBar("Kernel CPU", "packet.cpu.kernel", 100, "%", $input, "cpu"); | 
 
 
 
 
 
 | 27 | 
   | 
   | 
 showBar("IO wait CPU", "packet.cpu.iowait", 100, "%", $input, "cpu"); | 
 
 
 
 
 
 
 
 
 | 28 | 
 pjm2 | 
 1.6 | 
  | 
 
 
 
 
 
 | 29 | 
   | 
   | 
  | 
 
 
 
 
 
 
 
 
 | 30 | 
 tdb | 
 1.13 | 
 printLine("Load"); | 
 
 
 
 
 
 | 31 | 
   | 
   | 
  | 
 
 
 
 
 
 | 32 | 
   | 
   | 
 showStat("Load 1", "packet.load.load1", $input, "load"); | 
 
 
 
 
 
 | 33 | 
   | 
   | 
 showStat("Load 5", "packet.load.load5", $input, "load"); | 
 
 
 
 
 
 | 34 | 
   | 
   | 
 showStat("Load 15", "packet.load.load15", $input, "load"); | 
 
 
 
 
 
 | 35 | 
   | 
   | 
  | 
 
 
 
 
 
 | 36 | 
   | 
   | 
  | 
 
 
 
 
 
 | 37 | 
   | 
   | 
 printLine("Memory graphs"); | 
 
 
 
 
 
 
 
 
 | 38 | 
 pjm2 | 
 1.2 | 
  | 
 
 
 
 
 
 
 
 
 | 39 | 
 tdb | 
 1.14 | 
 showBar("Swap Used", "packet.swap.free", "packet.swap.total", "MB", $input, "swap", 'swap'); | 
 
 
 
 
 
 | 40 | 
   | 
   | 
 showBar("Memory Used", "packet.memory.free", "packet.memory.total", "MB", $input, "mem", 'swap'); | 
 
 
 
 
 
 
 
 
 | 41 | 
 tdb | 
 1.13 | 
 showStat("Swap Pages in (per sec)", "packet.pages.pageins", $input, "paging"); | 
 
 
 
 
 
 | 42 | 
   | 
   | 
 showStat("Swap Pages out (per sec)", "packet.pages.pageouts", $input, "paging"); | 
 
 
 
 
 
 
 
 
 | 43 | 
 pjm2 | 
 1.6 | 
  | 
 
 
 
 
 
 
 
 
 | 44 | 
 pjm2 | 
 1.2 | 
  | 
 
 
 
 
 
 
 
 
 | 45 | 
 pjm2 | 
 1.5 | 
 printLine("Processes"); | 
 
 
 
 
 
 
 
 
 | 46 | 
 pjm2 | 
 1.2 | 
  | 
 
 
 
 
 
 
 
 
 | 47 | 
 tdb | 
 1.11 | 
 showStat("Total Processes", "packet.processes.total", $input, "proc"); | 
 
 
 
 
 
 | 48 | 
   | 
   | 
 showStat("CPU Processes", "packet.processes.cpu", $input, "proc"); | 
 
 
 
 
 
 | 49 | 
   | 
   | 
 showStat("Sleeping Processes", "packet.processes.sleeping", $input, "proc"); | 
 
 
 
 
 
 | 50 | 
   | 
   | 
 showStat("Zombie Processes", "packet.processes.zombie", $input, "proc"); | 
 
 
 
 
 
 | 51 | 
   | 
   | 
 showStat("Stopped Processes", "packet.processes.stopped", $input, "proc"); | 
 
 
 
 
 
 
 
 
 | 52 | 
 pjm2 | 
 1.6 | 
  | 
 
 
 
 
 
 
 
 
 | 53 | 
 pjm2 | 
 1.2 | 
  | 
 
 
 
 
 
 
 
 
 | 54 | 
 tdb | 
 1.13 | 
 printLine("Disks"); | 
 
 
 
 
 
 | 55 | 
   | 
   | 
  | 
 
 
 
 
 
 
 
 
 | 56 | 
 tdb | 
 1.14 | 
 showDisks("packet.disk", "MB", $input); | 
 
 
 
 
 
 
 
 
 | 57 | 
 tdb | 
 1.13 | 
  | 
 
 
 
 
 
 | 58 | 
   | 
   | 
  | 
 
 
 
 
 
 | 59 | 
   | 
   | 
 printLine("Disk IO"); | 
 
 
 
 
 
 
 
 
 | 60 | 
 pjm2 | 
 1.2 | 
  | 
 
 
 
 
 
 
 
 
 | 61 | 
 tdb | 
 1.13 | 
 showDiskIO("packet.diskio", $input); | 
 
 
 
 
 
 
 
 
 | 62 | 
 pjm2 | 
 1.2 | 
  | 
 
 
 
 
 
 
 
 
 | 63 | 
 pjm2 | 
 1.6 | 
  | 
 
 
 
 
 
 
 
 
 | 64 | 
 tdb | 
 1.13 | 
 printLine("Network IO"); | 
 
 
 
 
 
 
 
 
 | 65 | 
 pjm2 | 
 1.9 | 
  | 
 
 
 
 
 
 
 
 
 | 66 | 
 tdb | 
 1.13 | 
 showNet("packet.net", $input); | 
 
 
 
 
 
 
 
 
 | 67 | 
 pjm2 | 
 1.9 | 
  | 
 
 
 
 
 
 | 68 | 
   | 
   | 
  | 
 
 
 
 
 
 
 
 
 | 69 | 
 tdb | 
 1.14 | 
 printLine("Mail Queue Sizes"); | 
 
 
 
 
 
 | 70 | 
   | 
   | 
  | 
 
 
 
 
 
 | 71 | 
   | 
   | 
 showMailQ("packet.mailq", $input); | 
 
 
 
 
 
 | 72 | 
   | 
   | 
  | 
 
 
 
 
 
 | 73 | 
   | 
   | 
  | 
 
 
 
 
 
 
 
 
 | 74 | 
 tdb | 
 1.13 | 
 printLine("Uptime"); | 
 
 
 
 
 
 
 
 
 | 75 | 
 pjm2 | 
 1.2 | 
  | 
 
 
 
 
 
 
 
 
 | 76 | 
 tdb | 
 1.14 | 
 showUptime("Uptime", "packet.os.uptime", $input); | 
 
 
 
 
 
 
 
 
 | 77 | 
 pjm2 | 
 1.2 | 
  | 
 
 
 
 
 
 
 
 
 | 78 | 
 pjm2 | 
 1.6 | 
  | 
 
 
 
 
 
 
 
 
 | 79 | 
 pjm2 | 
 1.5 | 
 printLine("Users"); | 
 
 
 
 
 
 
 
 
 | 80 | 
 pjm2 | 
 1.2 | 
  | 
 
 
 
 
 
 
 
 
 | 81 | 
 tdb | 
 1.11 | 
 showStat("Number of users", "packet.users.count", $input, "users"); | 
 
 
 
 
 
 
 
 
 | 82 | 
 pjm2 | 
 1.2 | 
 showStat("User list", "packet.users.list", $input); | 
 
 
 
 
 
 
 
 
 | 83 | 
 tdb | 
 1.13 | 
  | 
 
 
 
 
 
 | 84 | 
   | 
   | 
  | 
 
 
 
 
 
 | 85 | 
   | 
   | 
 printLine("Packet"); | 
 
 
 
 
 
 | 86 | 
   | 
   | 
  | 
 
 
 
 
 
 | 87 | 
   | 
   | 
 showStat("Last sequence number", "packet.attributes.seq_no", $input); | 
 
 
 
 
 
 | 88 | 
   | 
   | 
  | 
 
 
 
 
 
 
 
 
 | 89 | 
 pjm2 | 
 1.2 | 
  | 
 
 
 
 
 
 
 
 
 | 90 | 
 pjm2 | 
 1.8 | 
 ?> |