Your IP : 3.12.146.108
3
B��Q � @ s G d d� de �ZdS )c @ s$ e Zd Zdd� Zdd� Zdd� ZdS )�VmStatc C s t d�| _| j� | _d S )Nz/proc/vmstat)�open�vmstat_file�read�vmstat)�self� r �/usr/lib/python3.6/vmstat.py�__init__ s
zVmStat.__init__c C sd dd� }x"| j D ]}|jd�r||�}P qW x"| j D ]}|jd�r4||�}P q4W | j jd� ||fS )Nc S s t | j� d �d S )N� i )�int�split)�liner r r �extract s zVmStat.read.<locals>.extractzpgpgin zpgpgout � )r �
startswith�seek)r r r
ZpgpginZpgpgoutr r r r s
zVmStat.readc C s6 | j � }|d | jd |d | jd f}|| _|S )Nr r
)r r )r Znow�deltar r r r ) s $zVmStat.deltaN)�__name__�
__module__�__qualname__r r r r r r r r s r N)�objectr r r r r �<module> s