Remove configuration files and scripts related to the Resource Monitor Service; implement core service functionality for monitoring system resources including CPU, RAM, GPU, and running processes; add API endpoints for resource usage and process management; integrate NVIDIA Management Library for GPU metrics; establish service as a Windows service with appropriate settings.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
# PowerShell script to create a new inbound rule in Windows Firewall
|
||||
$port = 5000
|
||||
$ruleName = "ResourceMonitorServicePublish"
|
||||
if (Get-NetFirewallRule -DisplayName $ruleName) {
|
||||
Write-Host "Rule already exists, not creating a new one"
|
||||
} else {
|
||||
New-NetFirewallRule -DisplayName $ruleName -Direction Inbound -Protocol TCP -LocalPort $port -Action Allow -Profile Any
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
sc create ResourceMonitorService binPath="%~dp0ResourceMonitorService.exe --windows-service" start= auto
|
||||
sc description ResourceMonitorService "A service that monitors system resource usage and exposes it via a web API."
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"RunAsWindowsService": true,
|
||||
"Kestrel": {
|
||||
"Endpoints": {
|
||||
"Http": {
|
||||
"Url": "http://*:5000"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ApiSettings": {
|
||||
"ApiKey": "b7f3e8a1-4c2d-4d9f-9a6e-2a1c5d7f8e9a"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"RunAsWindowsService": true,
|
||||
"Kestrel": {
|
||||
"Endpoints": {
|
||||
"Http": {
|
||||
"Url": "http://*:5000"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ApiSettings": {
|
||||
"ApiKey": "b7f3e8a1-4c2d-4d9f-9a6e-2a1c5d7f8e9a"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"RunAsWindowsService": true,
|
||||
"Kestrel": {
|
||||
"Endpoints": {
|
||||
"Http": {
|
||||
"Url": "http://*:5000"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ApiSettings": {
|
||||
"ApiKey": "b7f3e8a1-4c2d-4d9f-9a6e-2a1c5d7f8e9a"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user