Peter V. Saveliev has uploaded a new change for review.

Change subject: add "uptime" field to the getStats (getVdsStats in vdsClient) 
call.
......................................................................

add "uptime" field to the getStats (getVdsStats in vdsClient) call.

"uptime" field, measured in seconds, contains VDSM run time since
start, actually -- since first API.py import

Signed-off-by: Peter V. Saveliev <[email protected]>
Change-Id: Ibc998117e25faff17c2f3f6d66e2a961fc93e029
---
M vdsm/API.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/08/8008/1

diff --git a/vdsm/API.py b/vdsm/API.py
index 566d6e5..2c21a9e 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -47,7 +47,7 @@
 USER_SHUTDOWN_MESSAGE = 'System going down'
 
 PAGE_SIZE_BYTES = os.sysconf('SC_PAGESIZE')
-
+STARTTIME = time.time()
 
 class APIBase(object):
 
@@ -1103,6 +1103,7 @@
 
         stats['netConfigDirty'] = str(self._cif._netConfigDirty)
         stats['generationID'] = self._cif._generationID
+        stats['uptime'] = time.time() - STARTTIME
         return {'status': doneCode, 'info': stats}
 
     def setLogLevel(self, level):


--
To view, visit http://gerrit.ovirt.org/8008
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibc998117e25faff17c2f3f6d66e2a961fc93e029
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Peter V. Saveliev <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to