Skip to content

Commit

Permalink
Adding NET defaults for IM polling, for VMware server
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.opennebula.org/one/trunk@964 3034c82b-c49b-4eb3-8279-a7acafdc01c0
  • Loading branch information
tinova committed Feb 5, 2010
1 parent c14c585 commit 815f4a3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/im_mad/vmware/OneImVmware.java
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,17 @@ else if (action.equals("FINALIZE"))
response = response + ",FREEMEMORY=" + (totalMemory-usedMemory);

// NET
int net=0;
rf = gP.getPerformanceCounter("net.transmitted.average", 60);
if (!rf) throw new Exception();
response = response + ",NETTX=" + (int)gP.getMeasure();
if (!rf) net = 0;
else net = (int)gP.getMeasure();
response = response + ",NETTX=" + net;

rf = gP.getPerformanceCounter("net.received.average", 60);
if (!rf) throw new Exception();
response = response + ",NETRX=" + (int)gP.getMeasure();
if (!rf) net = 0;
else net = (int)gP.getMeasure();
response = response + ",NETRX=" + net;

// Send the actual response
send_message("MONITOR SUCCESS " + hid_str + " " + response);

Expand Down

0 comments on commit 815f4a3

Please sign in to comment.