-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest_Servers.bat
More file actions
126 lines (111 loc) · 4.69 KB
/
Copy pathTest_Servers.bat
File metadata and controls
126 lines (111 loc) · 4.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
@echo off
title XNPCVoiceControl - Server Health Check
color 07
cd /d "%~dp0"
echo.
echo ==========================================
echo XNPCVoiceControl Server Health Check
echo ==========================================
echo.
echo Run this from the deployed mod folder:
echo C:\...\7 Days To Die\Mods\1-XNPCVoiceControl\
echo.
REM --- Check server executables exist ---
set LlamaExe=MISSING
set SherpaExe=MISSING
set SupertonicExe=MISSING
set WhisperExe=MISSING
if exist "bin\LlamaServer\llama-server.exe" set LlamaExe=FOUND
if exist "bin\SherpaServer\sherpa-server.exe" set SherpaExe=FOUND
if exist "bin\SupertonicServer\supertonic-server.exe" set SupertonicExe=FOUND
if exist "bin\WhisperServer\whisper-server.exe" set WhisperExe=FOUND
REM --- Check embed model exists ---
set EmbedModel=MISSING
for /r "Resources\Models\Embed" %%f in (*.gguf) do set EmbedModel=FOUND
REM --- Check ports are listening ---
set LlamaPort=NOT LISTENING
set EmbedPort=NOT LISTENING
set SherpaPort=NOT LISTENING
set SupertonicPort=NOT LISTENING
set WhisperPort=NOT LISTENING
:: Pipe through two findstr filters to avoid the space-as-OR trap
for /f "tokens=5" %%a in ('netstat -ano ^| findstr ":8080 " ^| findstr "LISTENING"') do if not "%%a"=="" set LlamaPort=LISTENING
for /f "tokens=5" %%a in ('netstat -ano ^| findstr ":8081 " ^| findstr "LISTENING"') do if not "%%a"=="" set EmbedPort=LISTENING
for /f "tokens=5" %%a in ('netstat -ano ^| findstr ":5053 " ^| findstr "LISTENING"') do if not "%%a"=="" set SherpaPort=LISTENING
for /f "tokens=5" %%a in ('netstat -ano ^| findstr ":5054 " ^| findstr "LISTENING"') do if not "%%a"=="" set SupertonicPort=LISTENING
for /f "tokens=5" %%a in ('netstat -ano ^| findstr ":5052 " ^| findstr "LISTENING"') do if not "%%a"=="" set WhisperPort=LISTENING
REM --- Check .NET runtime (needed by sherpa-server ASP.NET host) ---
dotnet --version >nul 2>&1
if errorlevel 9009 (
set DotNetStatus=NOT FOUND
) else (
for /f "tokens=* usebackq" %%v in (`dotnet --version`) do set DotNetStatus=%%v
)
REM --- Summary Report ---
echo ==========================================
echo SERVER HEALTH REPORT
echo ==========================================
echo.
echo .NET Runtime: %DotNetStatus%
echo.
if "%LlamaExe%"=="FOUND" (
if "%LlamaPort%"=="LISTENING" (
echo [PASS] llama-server - Exe found, port 8080 listening
) else (
echo [FAIL] llama-server - Exe found, port 8080 NOT responding
echo Run bin\LlamaServer\Start_Llama_Debug.bat to test manually
)
) else (
echo [MISS] llama-server - Exe not found in bin\LlamaServer\
)
if "%EmbedModel%"=="FOUND" (
if "%EmbedPort%"=="LISTENING" (
echo [PASS] embed-server - Model found, port 8081 listening
) else (
echo [FAIL] embed-server - Model found, port 8081 NOT responding
echo Check Player.log for embed-server startup errors
)
) else (
echo [MISS] embed-server - No .gguf found in Resources\Models\Embed\
echo Place nomic-embed-text-v1.5.Q8_0.gguf there
)
if "%SherpaExe%"=="FOUND" (
if "%SherpaPort%"=="LISTENING" (
echo [PASS] sherpa-server - Exe found, port 5053 listening
) else (
echo [FAIL] sherpa-server - Exe found, port 5053 NOT responding
echo Run bin\SherpaServer\Start_Sherpa_Debug.bat to test manually
)
) else (
echo [MISS] sherpa-server - Exe not found in bin\SherpaServer\
)
if "%SupertonicExe%"=="FOUND" (
if "%SupertonicPort%"=="LISTENING" (
echo [PASS] supertonic-server - Exe found, port 5054 listening
) else (
echo [FAIL] supertonic-server - Exe found, port 5054 NOT responding
echo Run bin\SupertonicServer\Start_Supertonic_Debug.bat to test manually
)
) else (
echo [MISS] supertonic-server - Exe not found in bin\SupertonicServer\
)
if "%WhisperExe%"=="FOUND" (
if "%WhisperPort%"=="LISTENING" (
echo [PASS] whisper-server - Exe found, port 5052 listening
) else (
echo [FAIL] whisper-server - Exe found, port 5052 NOT responding
echo Run bin\WhisperServer\Start_Whisper_Debug.bat to test manually
)
) else (
echo [MISS] whisper-server - Exe not found in bin\WhisperServer\
)
echo.
echo ==========================================
echo How to use:
echo 1. Launch the game first -^> ServerManager starts servers automatically
echo 2. Run this script from another CMD window to check status
echo 3. For any [FAIL], run the suggested debug .bat for that server
echo (it keeps the window open so you can read errors)
echo ==========================================
echo.
pause