Files
pqs-9100_client/build/diagnose-startup.bat

70 lines
1.6 KiB
Batchfile
Raw Normal View History

2025-11-27 20:50:59 +08:00
@echo off
chcp 65001 >nul
echo ========================================
echo NPQS9100 启动诊断工具
echo ========================================
echo.
echo [1] 检查运行中的进程...
echo.
echo NPQS9100 进程:
tasklist | findstr /i "NPQS9100.exe"
if %errorlevel% neq 0 echo 未找到
echo.
echo MySQL 进程:
tasklist | findstr /i "mysqld.exe"
if %errorlevel% neq 0 echo 未找到
echo.
echo Java 进程:
tasklist | findstr /i "java.exe"
if %errorlevel% neq 0 echo 未找到
echo.
echo [2] 检查端口占用...
echo.
echo 3306 端口:
netstat -ano | findstr ":3306" | findstr "LISTENING"
if %errorlevel% neq 0 echo 未占用
echo.
echo 18092 端口:
netstat -ano | findstr ":18092" | findstr "LISTENING"
if %errorlevel% neq 0 echo 未占用
echo.
echo 7777 端口:
netstat -ano | findstr ":7777" | findstr "LISTENING"
if %errorlevel% neq 0 echo 未占用
echo.
echo [3] 查看最新日志...
echo.
set LOGDIR=%APPDATA%\NQPS9100\logs
echo 日志目录: %LOGDIR%
if exist "%LOGDIR%" (
echo.
echo 最新日志文件:
dir /b /o-d "%LOGDIR%\*.log" 2>nul
echo.
) else (
echo 日志目录不存在
)
echo.
echo [4] 检查当前运行模式...
echo 当前版本为绿色包进程模式,不使用 MySQL Windows 服务
if exist "mysql\my.ini" (
echo 检测到 MySQL 配置文件:
findstr /i "^port=" "mysql\my.ini"
2025-11-27 20:50:59 +08:00
) else (
echo 尚未检测到 mysql\my.ini可能应用还未完整启动
2025-11-27 20:50:59 +08:00
)
echo.
echo ========================================
echo 诊断完成
echo ========================================
pause