Files
CN_Tool_client/build/diagnose-startup.bat
2026-04-13 17:32:58 +08:00

70 lines
1.5 KiB
Batchfile
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
chcp 65001 >nul
echo ========================================
echo CN_Tool 启动诊断工具
echo ========================================
echo.
echo [1] 检查运行中的进程...
echo.
echo CN_Tool 进程:
tasklist | findstr /i "CN_Tool.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 18093 端口:
netstat -ano | findstr ":18093" | findstr "LISTENING"
if %errorlevel% neq 0 echo 未占用
echo.
echo 7778 端口:
netstat -ano | findstr ":7778" | findstr "LISTENING"
if %errorlevel% neq 0 echo 未占用
echo.
echo [3] 查看最新日志...
echo.
set LOGDIR=%~dp0..\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"
) else (
echo 尚未检测到 mysql\my.ini可能应用还未完整启动
)
echo.
echo ========================================
echo 诊断完成
echo ========================================
pause