korsygfhrtzangaiide
Elepffwdsff
/
usr
/
share
/
dstat
/
Upload FileeE
HOME
� c�Lc @ s d e f d � � YZ d S( t dstat_pluginc B s e Z d Z d � Z d � Z RS( s� Provide CPU information related to the dstat process. This plugin shows the CPU utilization for the dstat process itself, including the user-space and system-space (kernel) utilization and a total of both. On a system with one cpu and one core, the total cputime is 1000ms. On a system with 2 cores the total is 2000ms. It may help to vizualise the performance of Dstat and its selection of plugins. c C s1 d | _ d | _ d | _ d | _ d | _ d S( Ns dstat cput usert systemt totalt di id ( R s systemR ( t namet varst typet widtht scale( t self( ( s# /usr/share/dstat/dstat_dstat_cpu.pyt __init__ s c C s� t j t j � } t | j � | j d <t | j � | j d <t | j � t | j � | j d <x8 | j D]- } | j | | j | d t | j | <qk Wt t j k r� | j j | j � n d S( NR R R g @�@( t resourcet getrusaget RUSAGE_SELFt floatt ru_utimet set2t ru_stimeR t set1t elapsedt valt stept opt delayt update( R t resR ( ( s# /usr/share/dstat/dstat_dstat_cpu.pyt extract s #+( t __name__t __module__t __doc__R R ( ( ( s# /usr/share/dstat/dstat_dstat_cpu.pyR s N( t dstatR ( ( ( s# /usr/share/dstat/dstat_dstat_cpu.pyt <module> s