HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux simsoft.ro 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC 2025 x86_64
User: www-data (33)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //usr/local/cyberpanel/scripts/reset_bandwidth.bat
@echo off
REM CyberPanel Bandwidth Reset Script for Windows
REM This script resets bandwidth usage for all domains in CyberPanel

echo CyberPanel Bandwidth Reset Script
echo =================================
echo.

REM Check if running as administrator
net session >nul 2>&1
if %errorLevel% == 0 (
    echo Running with administrator privileges...
) else (
    echo Please run as administrator
    pause
    exit /b 1
)

REM Check if CyberPanel is installed
if not exist "C:\Program Files\CyberPanel\bin\python.exe" (
    echo CyberPanel not found. Please ensure CyberPanel is installed.
    pause
    exit /b 1
)

echo Resetting bandwidth for all domains...
echo.

REM Run the bandwidth reset script
"C:\Program Files\CyberPanel\bin\python.exe" "C:\Program Files\CyberPanel\plogical\bandwidthReset.py" --reset-all

if %errorLevel% == 0 (
    echo.
    echo Bandwidth reset completed successfully!
    echo.
    echo To verify the reset, you can:
    echo 1. Check the CyberPanel logs
    echo 2. Check individual domain bandwidth in CyberPanel web interface
    echo 3. Check bandwidth metadata files
) else (
    echo.
    echo Bandwidth reset failed. Please check the logs for details.
    pause
    exit /b 1
)

echo.
echo Note: This script only resets the displayed bandwidth values.
echo The actual bandwidth calculation will resume from the current access logs.
echo For a complete reset, you may also need to clear access logs if desired.
pause