23 lines
867 B
PowerShell
23 lines
867 B
PowerShell
# 只读:看 Nginx 反代目标与现网进程是否仍在
|
|
$ErrorActionPreference = 'Continue'
|
|
$ai = 'C:\nginx-1.18.0\myconf\ai.conf'
|
|
Write-Output '=== ai.conf proxy targets ==='
|
|
Select-String -Path $ai -Pattern 'proxy_pass|root |listen |server_name|8910|8180|8080|8810|8811|8813' |
|
|
ForEach-Object { $_.Line.Trim() }
|
|
|
|
Write-Output '=== java 8080/8180 cmdline ==='
|
|
Get-CimInstance Win32_Process -Filter "Name='java.exe'" | ForEach-Object {
|
|
if ($_.CommandLine -match '8080|8180|jeecg|inquiry') {
|
|
"pid=$($_.ProcessId) $($_.CommandLine.Substring(0, [Math]::Min(220, $_.CommandLine.Length)))"
|
|
}
|
|
}
|
|
|
|
Write-Output '=== inquiry-new dir ==='
|
|
if (Test-Path 'E:\wwwroot\inquiry-new') {
|
|
Get-ChildItem 'E:\wwwroot\inquiry-new' | ForEach-Object {
|
|
if ($_.PSIsContainer) { "DIR $($_.Name)" } else { "$($_.Name) $($_.Length)" }
|
|
}
|
|
}
|
|
|
|
Write-Output 'NGINX_PROBE_DONE'
|