1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

Adding NET defaults for IM polling, for VMware server

git-svn-id: http://svn.opennebula.org/one/trunk@964 3034c82b-c49b-4eb3-8279-a7acafdc01c0
This commit is contained in:
Constantino Vázquez Blanco 2010-02-05 10:25:23 +00:00
parent f3be56e997
commit e45889f989

View File

@ -207,13 +207,17 @@ class OneImVmware extends Thread
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);