Exemple #1
0
 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()
Exemple #2
0
 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)