2 |
|
|
3 |
|
# Display the following data. |
4 |
|
|
5 |
– |
printLine("Machine"); |
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 |
|
|
11 |
+ |
|
12 |
+ |
printLine("Load"); |
13 |
+ |
|
14 |
+ |
showStat("Load 1", "packet.load.load1", $input); |
15 |
+ |
showStat("Load 5", "packet.load.load5", $input); |
16 |
+ |
showStat("Load 15", "packet.load.load15", $input); |
17 |
+ |
|
18 |
+ |
|
19 |
+ |
printLine("Memory graphs"); |
20 |
+ |
|
21 |
+ |
showBar("Swap Free", "packet.swap.free", "packet.swap.total", "Mb", $input); |
22 |
+ |
showBar("Memory Free", "packet.memory.free", "packet.memory.total", "Mb", $input); |
23 |
+ |
|
24 |
+ |
|
25 |
+ |
printLine("CPU graphs"); |
26 |
+ |
|
27 |
+ |
showBar("User CPU", "packet.cpu.user", 100, "%", $input); |
28 |
+ |
showBar("Swap CPU", "packet.cpu.swap", 100, "%", $input); |
29 |
+ |
showBar("Idle CPU", "packet.cpu.idle", 100, "%", $input); |
30 |
+ |
showBar("Kernel CPU", "packet.cpu.kernel", 100, "%", $input); |
31 |
+ |
showBar("IO wait CPU", "packet.cpu.iowait", 100, "%", $input); |
32 |
+ |
|
33 |
+ |
|
34 |
|
printLine("Operating System"); |
35 |
|
|
36 |
|
showStat("Operating System Release", "packet.os.release", $input); |
37 |
|
showStat("Operating System Version", "packet.os.version", $input); |
38 |
|
showStat("Operating System Name", "packet.os.name", $input); |
15 |
– |
showStat("System Name", "packet.os.sysname", $input); |
39 |
|
showStat("Operating System Platform", "packet.os.platform", $input); |
40 |
+ |
showStat("System Name", "packet.os.sysname", $input); |
41 |
|
|
42 |
+ |
|
43 |
|
printLine("Processes"); |
44 |
|
|
45 |
+ |
showStat("Total Processes", "packet.processes.total", $input); |
46 |
+ |
showStat("CPU Processes", "packet.processes.cpu", $input); |
47 |
|
showStat("Sleeping Processes", "packet.processes.sleeping", $input); |
48 |
|
showStat("Zombie Processes", "packet.processes.zombie", $input); |
49 |
|
showStat("Stopped Processes", "packet.processes.stopped", $input); |
23 |
– |
showStat("CPU Processes", "packet.processes.cpu", $input); |
24 |
– |
showStat("Total Processes", "packet.processes.total", $input); |
50 |
|
|
51 |
+ |
|
52 |
|
printLine("Uptime"); |
53 |
|
|
54 |
|
showStat("Uptime (um... seconds)", "packet.os.uptime", $input); |
55 |
|
|
30 |
– |
printLine("Packet details"); |
56 |
|
|
57 |
+ |
printLine("Packet"); |
58 |
+ |
|
59 |
|
showStat("Last sequence number", "packet.attributes.seq_no", $input); |
60 |
|
|
61 |
+ |
|
62 |
|
printLine("Users"); |
63 |
|
|
64 |
|
showStat("Number of users", "packet.users.count", $input); |
65 |
|
showStat("User list", "packet.users.list", $input); |
38 |
– |
|
39 |
– |
printLine("Load"); |
40 |
– |
|
41 |
– |
showStat("Load 1", "packet.load.load1", $input); |
42 |
– |
showStat("Load 5", "packet.load.load5", $input); |
43 |
– |
showStat("Load 15", "packet.load.load15", $input); |
44 |
– |
|
45 |
– |
printLine("CPU"); |
46 |
– |
|
47 |
– |
showBar("User CPU", "packet.cpu.user", 100, $input); |
48 |
– |
showBar("Swap CPU", "packet.cpu.swap", 100, $input); |
49 |
– |
showBar("Idle CPU", "packet.cpu.idle", 100, $input); |
50 |
– |
showBar("Kernel CPU", "packet.cpu.kernel", 100, $input); |
51 |
– |
showBar("IO wait CPU", "packet.cpu.iowait", 100, $input); |
52 |
– |
|
53 |
– |
printLine("Memory"); |
54 |
– |
|
55 |
– |
showBar("Swap Free", "packet.swap.free", "packet.swap.total", $input); |
56 |
– |
showBar("Memory Free", "packet.memory.free", "packet.memory.total", $input); |
57 |
– |
|
66 |
|
|
67 |
< |
?> |
67 |
> |
?> |