@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] 检查 MySQL 服务... sc query mysql9100 >nul 2>&1 if %errorlevel% equ 0 ( echo MySQL 服务存在 sc query mysql9100 | findstr "STATE" ) else ( echo MySQL 服务不存在 ) echo. echo ======================================== echo 诊断完成 echo ======================================== pause