Package Products :: Package ZenRRD :: Module zenperfsnmp :: Class Status |
[hide private]
[frames] | no frames]

# Class Status

source code

Keep track of the status of many parallel requests

Instance Methods | [hide private]
__init__(self, daemon) Initializer | source code
reset(self) Reset instance variables to intial values | source code
start(self, devicesToQuery, prevQueriesAndAges) Record our start time, and return a deferred for our devices | source code
record(self, name, success) Record success or failure | source code
_checkFinished(self) Determine the stopping point and log our current stats | source code
finished(self) Determine if we have finished, disregarding devices that were queried in a previous cycle and still haven't reported back. | source code
stats(self) Return a dictionary with stats for this cycle:... | source code
inProcess(self) Return the name of the devices that have been queried this cycle but from whom no response has been received. | source code
prevInProcess(self) Return the names of the devices that were queried prior to this cycle and have not yet reported. | source code
inQueue(self) Return the names of the devices that have yet to be queried. | source code
popDevice(self) Pop a device to be queried from the queue | source code
getQueryAges(self) Return a dictionary with the device and age of each query from this or previous cycles that has not yet responeded. | source code

Method Details | [hide private]

### start(self, devicesToQuery, prevQueriesAndAges) | source code
Record our start time, and return a deferred for our devices Parameters: `devicesToQuery` (iterable) - names of devices to poll `prevQueriesAndAges` (dict) - devices with outstanding quests Returns: deferred

### record(self, name, success) | source code
Record success or failure Parameters: `name` (string) - name of device reporting results `success` (boolean) - True if query succeeded, False otherwise.

### stats(self) | source code
    Return a dictionary with stats for this cycle:
        numSucceeded - queries made this cycle and reported back success
        numPrevSucceeded - queries from a prev cycle reported back success
        numFailed - queries made this cycle reported back failure
        numPrevFailed - queries made prev cycle reported back failure
        startTime - timestamp when this cycle started
        stopTime - timestamp when this cycle stopped
        age - time cycle took to run or current age (if still running)
        queueSize - num of devices not queried yet
        numInProcess - num queried this cycle not reported back yet
        numPrevInProcess - num queried prev cycle still not reported back
        numReported - number reported back from this or previous cycles