AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/landscape/sysinfo/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

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

from landscape.lib.process import ProcessInformation


class Processes(object):

    def __init__(self, proc_dir="/proc"):
        self._proc_dir = proc_dir

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

    def run(self):
        num_processes = 0
        num_zombies = 0
        info = ProcessInformation(proc_dir=self._proc_dir)
        for process_info in info.get_all_process_info():
            num_processes += 1
            if process_info["state"] == b"Z":
                num_zombies += 1
        if num_zombies:
            if num_zombies == 1:
                msg = "There is 1 zombie process."
            else:
                msg = "There are %d zombie processes." % (num_zombies,)
            self._sysinfo.add_note(msg)
        self._sysinfo.add_header("Processes", str(num_processes))
        return succeed(None)

Anon7 - 2022
AnonSec Team