3 BQ@sGdddeZdS)c@s$eZdZddZddZddZdS)VmStatcCstd|_|j|_dS)Nz /proc/vmstat)open vmstat_filereadvmstat)selfr/usr/lib/python3.6/vmstat.py__init__s zVmStat.__init__cCsddd}x"|jD]}|jdr||}PqWx"|jD]}|jdr4||}Pq4W|jjd||fS)NcSst|jddS)Ni)intsplit)linerrrextractszVmStat.read..extractzpgpgin zpgpgout )r startswithseek)rrr ZpgpginZpgpgoutrrrrs     z VmStat.readcCs6|j}|d|jd|d|jdf}||_|S)Nrr )rr)rZnowdeltarrrr)s$z VmStat.deltaN)__name__ __module__ __qualname__r rrrrrrrsrN)objectrrrrrs