1 # -*- coding: utf-8 -*-
46 ('delayacct_blkio_ticks', int),
60 def __init__(self, processid):
62 strstats = file('/proc/%s/stat' % processid).read()
64 # "getconf CLK_TCK" = 100 -> 1 tick = 1/100 seconds
65 strstats = strstats.rstrip('\n').split(' ')
66 for i, keycls in enumerate(__proc_keys__):
68 self[key] = cls(strstats[i])
72 nice_state = __states__.get(state, None)
75 return "%s (%s)" % (state, nice_state)
78 # "getconf CLK_TCK" = 100 -> 1 tick = 1/100 seconds
80 return self['utime'] / 100.
83 return self['stime'] / 100.