mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-25 13:18:47 +00: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 {
|
func GetServerMetrics() database.ServerMetric {
|
||||||
v, _ := mem.VirtualMemory()
|
v, _ := mem.VirtualMemory()
|
||||||
c, _ := cpu.Percent(0, false)
|
c, _ := cpu.Percent(time.Second, false)
|
||||||
cpuInfo, _ := cpu.Info()
|
cpuInfo, _ := cpu.Info()
|
||||||
diskInfo, _ := disk.Usage("/")
|
diskInfo, _ := disk.Usage("/")
|
||||||
netInfo, _ := net.IOCounters(false)
|
netInfo, _ := net.IOCounters(false)
|
||||||
|
|||||||
Reference in New Issue
Block a user