|
Server : Apache System : Linux ecngx264.inmotionhosting.com 4.18.0-553.77.1.lve.el8.x86_64 #1 SMP Wed Oct 8 14:21:00 UTC 2025 x86_64 User : lonias5 ( 3576) PHP Version : 7.3.33 Disable Function : NONE Directory : /proc/self/root/proc/thread-self/root/opt/sharedrads/guds_modules/ |
Upload File : |
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"))