feat: Add GPU inspection/monitoring support (#28)

This commit is contained in:
UUBulb
2024-06-23 10:27:18 +08:00
committed by GitHub
parent 968faca950
commit 338f0dabbe
18 changed files with 521 additions and 75 deletions
+4
View File
@@ -26,6 +26,7 @@ type HostState struct {
UdpConnCount uint64
ProcessCount uint64
Temperatures []SensorTemperature
GPU float64
}
func (s *HostState) PB() *pb.State {
@@ -54,6 +55,7 @@ func (s *HostState) PB() *pb.State {
UdpConnCount: s.UdpConnCount,
ProcessCount: s.ProcessCount,
Temperatures: ts,
Gpu: s.GPU,
}
}
@@ -70,6 +72,7 @@ type Host struct {
IP string `json:"-"`
CountryCode string
Version string
GPU []string
}
func (h *Host) PB() *pb.Host {
@@ -86,5 +89,6 @@ func (h *Host) PB() *pb.Host {
Ip: h.IP,
CountryCode: h.CountryCode,
Version: h.Version,
Gpu: h.GPU,
}
}
+1
View File
@@ -11,6 +11,7 @@ type AgentConfig struct {
HardDrivePartitionAllowlist []string
NICAllowlist map[string]bool
DNS []string
GPU bool
v *viper.Viper
}