✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ premium290.web-hosting.com ​🇻​♯➤ 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2025

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 63.250.38.37 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.105
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /lib/python3.6/site-packages/up2date_client//statistics.py
import os
from subprocess import PIPE, Popen


def get_users_count_from_cllib():
    """
    Get user count using the common CloudLinux library.
    This number is more accurate for systems
    with a control panel installed.
    """
    if not os.path.exists('/opt/cloudlinux/venv/bin'):
        raise ValueError("CloudLinux virtual environment not found")

    cmd = '/opt/cloudlinux/venv/bin/python3 -c "from clcommon.cpapi import cpusers; print(cpusers())"'
    process = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE)
    output, errors = [result.decode().strip() for result in process.communicate()]

    if errors:
        raise ValueError(f"Failed to get users from CloudLinux library: {errors}")

    return len(output[1:-1].split(', '))


def get_users_count_generic():
    """
    Fallback method to get the user count
    by looking into the /etc/passwd file.
    """
    from up2date_client.clpwd import ClPwd
    pwd = ClPwd()
    return len(pwd.get_uid_dict())


def count_server_users():
    """
    Get the total count of users on the server.
    Tries the CloudLinux library first, falls back to generic method if it fails.
    """
    try:
        users_count = get_users_count_from_cllib()
    except Exception:
        users_count = get_users_count_generic()
    return users_count


Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
9 Jun 2026 7.04 AM
root / root
0755
__pycache__
--
19 Jun 2026 7.00 AM
root / root
0755
__init__.py
0 KB
11 Jun 2026 10.58 AM
root / root
0644
clpwd.py
3.558 KB
11 Jun 2026 10.58 AM
root / root
0644
config.py
13.259 KB
11 Jun 2026 10.58 AM
root / root
0644
hardware.py
5.094 KB
11 Jun 2026 10.58 AM
root / root
0644
pkgplatform.py
0.302 KB
11 Jun 2026 11.31 AM
root / root
0644
rhncli.py
7.461 KB
11 Jun 2026 10.58 AM
root / root
0644
rhnreg.py
10.517 KB
11 Jun 2026 10.58 AM
root / root
0644
rhnserver.py
8.536 KB
11 Jun 2026 10.58 AM
root / root
0644
rpcServer.py
11.544 KB
11 Jun 2026 10.58 AM
root / root
0644
statistics.py
1.274 KB
11 Jun 2026 10.58 AM
root / root
0644
up2dateAuth.py
10.492 KB
11 Jun 2026 10.58 AM
root / root
0644
up2dateErrors.py
7.986 KB
11 Jun 2026 10.58 AM
root / root
0644
up2dateLog.py
2.059 KB
11 Jun 2026 10.58 AM
root / root
0644
up2dateUtils.py
1.729 KB
11 Jun 2026 11.31 AM
root / root
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF