HEX
Server: Apache
System: Linux ecres233.servconfig.com 4.18.0-553.94.1.lve.el8.x86_64 #1 SMP Thu Jan 22 12:37:22 UTC 2026 x86_64
User: gonnelllaw (9952)
PHP: 7.2.34
Disabled: NONE
Upload Files
File: //opt/sharedrads/guds_modules/aux.py
import platform
from pathlib import Path
from tabulate import tabulate
from guds_modules.base import ModuleBase


def run_aux():
    """Show size of common directories and logs"""
    dir_list = [
        '/var/lib/mlocate',
        '/etc/apache2/logs',
        '/etc/apache2/domlogs',
        '/home/moveuser',
        '/var/log/slowqueries',
        f'/var/lib/mysql/{platform.node()}.err',
    ]

    table = []
    headers = ['Path', 'Size']

    for path in dir_list:
        table.append((path, ModuleBase.get_size(Path(path))))

    print(tabulate(table, headers, tablefmt="fancy_grid"))