def __init__(self, tid): self._tid = tid self._request = GeNlMessage( TaskStatHelper.family_id, cmd=TASKSTATS_CMD_GET, attrs=[U32Attr(TASKSTATS_CMD_ATTR_PID, self._tid)], flags=NLM_F_REQUEST) self._stats_total = None self._stats_delta = Stats.build_all_zero() self.duration = None self._timestamp = time.time()
def build_request(self, tid): return GeNlMessage(self.family_id, cmd=TASKSTATS_CMD_GET, attrs=[U32Attr(TASKSTATS_CMD_ATTR_PID, tid)], flags=NLM_F_REQUEST)