SILENT KILLERPanel

Current Path: > > opt > cloudlinux > venv > lib > > python3.11 > > site-packages > cllimits > lib


Operation   : Linux host59.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Software     : Apache
Server IP    : 198.54.126.42 | Your IP: 216.73.216.135
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //opt/cloudlinux/venv/lib//python3.11//site-packages/cllimits/lib

NameTypeSizeLast ModifiedActions
__pycache__ Directory - -
__init__.py File 1015 bytes June 05 2025 10:38:47.
arg_parsers.py File 16204 bytes June 05 2025 10:38:47.
limits.py File 50365 bytes June 05 2025 10:38:47.
utils.py File 4262 bytes June 05 2025 10:38:47.

Reading File: //opt/cloudlinux/venv/lib//python3.11//site-packages/cllimits/lib/__init__.py

# -*- coding: utf-8 -*-

# Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2019 All Rights Reserved
#
# Licensed under CLOUD LINUX LICENSE AGREEMENT
# http://cloudlinux.com/docs/LICENSE.TXT

import subprocess


def exec_utility(util_path, params, stderr=False):
    """
    Executes supplied utility with supplied parameters
    :param util_path: string with path to callable utility
    :param params: utility parameters
    :param stderr: trigger to return stderr or not
    :return: Cortege (ret_code, cagefsctl_stdout) if stderr is False
             Cortege (ret_code, cagefsctl_stdout, cagefsctl_stderr) otherwise
    """
    args = []
    args.append(util_path)
    args.extend(params)
    with subprocess.Popen(
        args,
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,
        text=True,
    ) as proc:
        out, err = proc.communicate()
        retcode = proc.returncode
    if stderr:
        return retcode, out.strip(), err.strip()
    return retcode, out.strip()

SILENT KILLER Tool