403Webshell
Server IP : 159.223.102.202  /  Your IP : 216.73.216.195
Web Server : nginx/1.26.0
System : Linux Gen1-cloudpanel2ubuntu2404-1vcpu-1gb-nyc1-01 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64
User : albasshbotta ( 1021)
PHP Version : 8.2.19
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/thread-self/root/lib/python3/dist-packages/landscape/sysinfo/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

from landscape.lib.sysstats import MemoryStats


class Memory:
    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",
            f"{int(memstats.used_memory_percentage):d}%",
        )
        self._sysinfo.add_header(
            "Swap usage",
            f"{int(memstats.used_swap_percentage):d}%",
        )
        return succeed(None)

Youez - 2016 - github.com/yon3zu
LinuXploit