MMCT TEAM
Server IP : 103.53.40.154  /  Your IP : 18.219.18.238
Web Server : Apache
System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : ppcad7no ( 715)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/locale/sal/../tmh/../ur/../az/../crh/../ty/../mos/../../dstat/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/locale/sal/../tmh/../ur/../az/../crh/../ty/../mos/../../dstat/dstat_dstat_mem.py
### 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'] = long(l[0]) * pagesize / 1024
        self.val['resident'] = long(l[1]) * pagesize / 1024
        self.val['shared'] = long(l[2]) * pagesize / 1024
#        self.val['text'] = long(l[3]) * pagesize / 1024
#        self.val['library'] = long(l[4]) * pagesize / 1024
        self.val['data'] = long(l[5]) * pagesize / 1024

# vim:ts=4:sw=4:et

MMCT - 2023