45 |
|
tok = new StringTokenizer(line," ",false); |
46 |
|
String totalProcesses = tok.nextToken(); // "632" |
47 |
|
// System.out.println("totalProcesses: "+totalProcesses); |
48 |
< |
tok.nextToken(); // processes |
48 |
> |
tok.nextToken(":"); // processes: |
49 |
|
String sleeping = tok.nextToken(": ,"); // "591" |
50 |
|
// System.out.println("sleeping: "+sleeping); |
51 |
|
tok.nextToken(); // sleeping |
119 |
|
packet.addElement("swap",swap.trim()); |
120 |
|
packet.closeNest(); |
121 |
|
packet.addNest("memory"); |
122 |
< |
packet.addElement("real",real.substring(0, real.length()-1)); |
122 |
> |
packet.addElement("total",real.substring(0, real.length()-1)); |
123 |
|
packet.addElement("free",free.substring(0, free.length()-1)); |
124 |
< |
packet.addElement("swapinuse",swapInUse.substring(0, swapInUse.length()-1)); |
125 |
< |
packet.addElement("swapfree",swapFree.substring(0, swapFree.length()-1)); |
124 |
> |
packet.closeNest(); |
125 |
> |
packet.addNest("swap"); |
126 |
> |
packet.addElement("inuse",swapInUse.substring(0, swapInUse.length()-1)); |
127 |
> |
packet.addElement("free",swapFree.substring(0, swapFree.length()-1)); |
128 |
|
packet.closeNest(); |
129 |
|
|
130 |
|
in.close(); |