OXIESEC PANEL
- Current Dir:
/
/
lib
/
python3.9
/
site-packages
/
iotop
Server IP: 2a02:4780:11:1594:0:ef5:22d7:a
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
10/22/2025 07:58:12 AM
rwxr-xr-x
📄
__init__.py
0 bytes
05/26/2013 10:44:18 PM
rw-r--r--
📁
__pycache__
-
05/14/2024 03:07:27 PM
rwxr-xr-x
📄
data.py
14.79 KB
10/15/2022 09:47:02 AM
rw-r--r--
📄
genetlink.py
2 KB
05/26/2013 10:44:18 PM
rw-r--r--
📄
ioprio.py
5.37 KB
05/26/2013 10:44:18 PM
rw-r--r--
📄
netlink.py
7.71 KB
05/26/2013 10:44:18 PM
rw-r--r--
📄
ui.py
24.67 KB
10/15/2022 09:47:02 AM
rw-r--r--
📄
version.py
16 bytes
05/26/2013 10:44:18 PM
rw-r--r--
📄
vmstat.py
1.52 KB
05/26/2013 10:44:18 PM
rw-r--r--
Editing: vmstat.py
Close
# 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 <guichaz@gmail.com> 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