$23 GRAYBYTE WORDPRESS FILE MANAGER $28

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/usr/lib/python3.6/site-packages/iotop/

HOME
Current File : /usr/lib/python3.6/site-packages/iotop//vmstat.py
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Library General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
#
# See the COPYING file for license information.
#
# Copyright (c) 2007 Guillaume Chazarain <[email protected]>

class VmStat(object):
    def __init__(self):
        self.vmstat_file = open('/proc/vmstat')
        self.vmstat = self.read()

    def read(self):
        def extract(line):
            return int(line.split()[1]) * 1024

        for line in self.vmstat_file:
            if line.startswith('pgpgin '):
                pgpgin = extract(line)
                break

        for line in self.vmstat_file:
            if line.startswith('pgpgout '):
                pgpgout = extract(line)
                break

        self.vmstat_file.seek(0)
        return pgpgin, pgpgout

    def delta(self):
        now = self.read()
        delta = now[0] - self.vmstat[0], now[1] - self.vmstat[1]
        self.vmstat = now
        return delta



Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
2 Apr 2026 3.01 PM
root / root
0755
__pycache__
--
9 Jun 2024 8.36 AM
root / root
0755
__init__.py
0 KB
26 May 2013 10.44 PM
root / root
0644
data.py
15.088 KB
6 Apr 2024 2.56 PM
root / root
0644
genetlink.py
1.996 KB
26 May 2013 10.44 PM
root / root
0644
ioprio.py
5.366 KB
26 May 2013 10.44 PM
root / root
0644
netlink.py
7.706 KB
26 May 2013 10.44 PM
root / root
0644
ui.py
24.673 KB
6 Apr 2024 2.56 PM
root / root
0644
version.py
0.016 KB
26 May 2013 10.44 PM
root / root
0644
vmstat.py
1.522 KB
26 May 2013 10.44 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF