mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-15 20:25:23 +02:00
fix: update CPU usage calculation to use a one-second interval
This commit is contained in:
@@ -117,7 +117,7 @@ func getRealOS() string {
|
||||
|
||||
func GetServerMetrics() database.ServerMetric {
|
||||
v, _ := mem.VirtualMemory()
|
||||
c, _ := cpu.Percent(0, false)
|
||||
c, _ := cpu.Percent(time.Second, false)
|
||||
cpuInfo, _ := cpu.Info()
|
||||
diskInfo, _ := disk.Usage("/")
|
||||
netInfo, _ := net.IOCounters(false)
|
||||
|
||||
Reference in New Issue
Block a user