PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /proc/thread-self/root/proc/self/root/proc/self/root/opt/sharedrads/guds_modules/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : //proc/thread-self/root/proc/self/root/proc/self/root/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"))