ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/host/java/DecodeCPU_TXT.java
(Generate patch)

Comparing projects/cms/source/host/java/DecodeCPU_TXT.java (file contents):
Revision 1.2 by tdb, Thu Dec 7 23:19:49 2000 UTC vs.
Revision 1.3 by tdb, Thu Dec 7 23:54:54 2000 UTC

# Line 24 | Line 24 | class DecodeCPU_TXT {
24                          // first line has the format: load averages:  0.30,  0.27,  0.29    16:58:10
25                          // tokenize it using spaces as delimiters?
26                          line = in.readLine();
27 +                        // it seems some versions of top prefix this line with something else... lets remove it :)
28 +                        line = line.substring(line.indexOf("load averages:"));
29                              System.out.println("line1: "+line);
30                          StringTokenizer tok = new StringTokenizer(line,":",false);
31                          tok.nextToken(); // load averages
# Line 97 | Line 99 | class DecodeCPU_TXT {
99                          // done now make it into an xml packet ;)
100                        
101                          packet = new XMLFormatter();
102 +                        packet.addElement("sTime",sTime);
103                          packet.addNest("load");
104                                  packet.addElement("load1",load1);
105                                  packet.addElement("load5",load5);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines