Skip to content

Commit

Permalink
add mem/disk info back in more detail
Browse files Browse the repository at this point in the history
  • Loading branch information
camw0 committed Jan 26, 2024
1 parent ae4c2d5 commit aa0deea
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,23 @@ func setupRouter(config *Config) *gin.Engine {
"info": cpuInfo,
},
"memory": gin.H{
"total": memInfo.Total,
"used": memInfo.Used,
"free": memInfo.Free,
"percent": memInfo.UsedPercent,
"total": memInfo.Total,
"used": memInfo.Used,
"free": memInfo.Free,
"percent": memInfo.UsedPercent,
"cached": memInfo.Cached,
"buffered": memInfo.Buffers,
"available": memInfo.Available,
},
"disk": gin.H{
"total": diskInfo.Total,
"used": diskInfo.Used,
"free": diskInfo.Free,
"percent": diskInfo.UsedPercent,
"total": diskInfo.Total,
"used": diskInfo.Used,
"free": diskInfo.Free,
"percent": diskInfo.UsedPercent,
"inodes_total": diskInfo.InodesTotal,
"inodes_used": diskInfo.InodesUsed,
"inodes_free": diskInfo.InodesFree,
"inodes_percent": diskInfo.InodesUsedPercent,
},
"network": gin.H{
"sent": netInfo[0].BytesSent,
Expand Down

0 comments on commit aa0deea

Please sign in to comment.