I've added the following to my process.py module to retrieve the loadavg of my
minions.
def loadavg(self):
return open("/proc/loadavg", "r").readline().strip().split(" ")
def register_method_args(self):
.
.
.
'loadavg':{
'args':{},
'description':"Returns a list of loadavg details."
},
.
.
.
Usage:
# func * call process loadavg
{'HOST': ['0.58', '0.30', '0.30', '6/145', '32295']}
Perhaps others will find this simple method useful.
Phil
_______________________________________________
Func-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/func-list