| Server IP : 39.108.156.168 / Your IP : 216.73.216.104 Web Server : nginx/1.24.0 System : Linux e2.ksyuki.com 6.11.0-25-generic #25~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 15 17:20:50 UTC 2 x86_64 User : root ( 0) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/dstat/ |
Upload File : |
### Author: Dag Wieers <dag$wieers,com>
class dstat_plugin(dstat):
"""
Provide memory information related to the dstat process.
The various values provide information about the memory usage of the
dstat process. This plugin gives you the possibility to follow memory
usage changes of dstat over time. It may help to vizualise the
performance of Dstat and its selection of plugins.
"""
def __init__(self):
self.name = 'dstat memory usage'
self.vars = ('virtual', 'resident', 'shared', 'data')
self.type = 'd'
self.open('/proc/%s/statm' % ownpid)
def extract(self):
l = self.splitline()
# l = linecache.getline('/proc/%s/schedstat' % self.pid, 1).split()
self.val['virtual'] = int(l[0]) * pagesize / 1024
self.val['resident'] = int(l[1]) * pagesize / 1024
self.val['shared'] = int(l[2]) * pagesize / 1024
# self.val['text'] = int(l[3]) * pagesize / 1024
# self.val['library'] = int(l[4]) * pagesize / 1024
self.val['data'] = int(l[5]) * pagesize / 1024
# vim:ts=4:sw=4:et