__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
import os
from twisted.internet.defer import succeed
class Processes:
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
for pid in os.listdir(self._proc_dir):
if not pid.isdigit():
continue
status_path = os.path.join(self._proc_dir, pid, "stat")
try:
with open(status_path, "rb") as fd:
data = fd.read()
except IOError:
continue
num_processes += 1
if b"Z" == data.split(b" ", 3)[2]:
num_zombies += 1
if num_zombies:
if num_zombies == 1:
msg = "There is 1 zombie process."
else:
msg = f"There are {num_zombies:d} zombie processes."
self._sysinfo.add_note(msg)
self._sysinfo.add_header("Processes", str(num_processes))
return succeed(None)
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| __pycache__ | Folder | 0755 |
|
|
| __init__.py | File | 0 B | 0644 |
|
| deployment.py | File | 5.2 KB | 0644 |
|
| disk.py | File | 2.6 KB | 0644 |
|
| landscapelink.py | File | 337 B | 0644 |
|
| load.py | File | 300 B | 0644 |
|
| loggedinusers.py | File | 489 B | 0644 |
|
| memory.py | File | 609 B | 0644 |
|
| network.py | File | 1.77 KB | 0644 |
|
| processes.py | File | 1.04 KB | 0644 |
|
| sysinfo.py | File | 9.74 KB | 0644 |
|
| temperature.py | File | 792 B | 0644 |
|
| testplugin.py | File | 532 B | 0644 |
|