Kobi Ianko has posted comments on this change.

Change subject: Adding support in CPU monitoring
......................................................................


Patch Set 1:

(6 comments)

http://gerrit.ovirt.org/#/c/27240/1/mom/Collectors/Collector.py
File mom/Collectors/Collector.py:

Line 137:     if m:
Line 138:         return int(m.group(1))
Line 139:     else:
Line 140:         return None
Line 141:     
> whitespace
Done
Line 142: def count_int(regex, src):
Line 143:     """
Line 144:     Parse a body of text according to the provided regular expression 
and return
Line 145:     the count of matches as an integer.


http://gerrit.ovirt.org/#/c/27240/1/mom/Collectors/HostCpu.py
File mom/Collectors/HostCpu.py:

Line 13: 
Line 14: from mom.Collectors.Collector import *
Line 15: 
Line 16: class HostCpu(Collector):
Line 17:     
> whitespaces
Done
Line 18:     
Line 19:     def __init__(self, properties):
Line 20:         self.cpuinfo = open_datafile("/proc/cpuinfo")
Line 21: 


Line 27:         self.cpuinfo.seek(0)
Line 28: 
Line 29:         contents = self.cpuinfo.read()
Line 30:         cpu_count = count_int("^processor.*:.*", contents)
Line 31:                 
> whitespaces
Done
Line 32:         data = { 'cpu_count': cpu_count }
Line 33:         return data
Line 34: 
Line 35:     def getFields(self=None):


http://gerrit.ovirt.org/#/c/27240/1/mom/Controllers/CpuTune.py
File mom/Controllers/CpuTune.py:

Line 14: import logging
Line 15: 
Line 16: class CpuTune:
Line 17:     """
Line 18:     Simple Balloon Controller that uses the hypervisor interface to 
resize
> Update the docstring please. It still references the Balloon controller
Done
Line 19:     a guest's memory balloon.  Output triggers are:
Line 20:         - balloon_target - Set guest balloon to this size (kB)
Line 21:     """
Line 22:     def __init__(self, properties):


http://gerrit.ovirt.org/#/c/27240/1/mom/HypervisorInterfaces/libvirtInterface.py
File mom/HypervisorInterfaces/libvirtInterface.py:

Line 247: 
Line 248:     def getUserVmCpuTuneInfo(self, uuid):
Line 249:         ret = {}
Line 250:         domain = self._getDomainFromUUID(uuid)
Line 251:         
> whitespaces (all over the file)
Done
Line 252:         metadataCpuLimit = 
domain.getMetadata(2,'http://ovirt.org/param/vcpu_limit',0)
Line 253:         
Line 254:         if metadataCpuLimit:
Line 255:             ret['user_vcpu_limit'] = metadataCpuLimit


http://gerrit.ovirt.org/#/c/27240/1/mom/HypervisorInterfaces/vdsmInterface.py
File mom/HypervisorInterfaces/vdsmInterface.py:

Line 163:         except vdsmException, e:
Line 164:             e.handle_exception()
Line 165: 
Line 166:     def getUserVmCpuTuneInfo(self, uuid):
Line 167:         try:            
> whitespaces again..
Done
Line 168:             vm = API.VM(uuid)
Line 169:             response = vm.getStats()
Line 170:             self._check_status(response)
Line 171:             cpu_tune_info = 
response['statsList'][0]['userCpuTuneInfo']


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I31428499ae7b34cafa3eacf5ca0d7a39eabe23ec
Gerrit-PatchSet: 1
Gerrit-Project: mom
Gerrit-Branch: master
Gerrit-Owner: Kobi Ianko <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Kobi Ianko <[email protected]>
Gerrit-Reviewer: Martin Sivák <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to