Skip to content

Commit

Permalink
example: uniform unit for host memory
Browse files Browse the repository at this point in the history
Signed-off-by: CuiHaozhi <cuihaozhi@chinacloud.com.cn>
  • Loading branch information
sak0 committed May 27, 2018
1 parent ae91c0e commit 1f9e19f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/hosts/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func main() {
fmt.Fprintf(tw, "%d\t", hs.Summary.QuickStats.OverallCpuUsage)
fmt.Fprintf(tw, "%d\t", totalCPU)
fmt.Fprintf(tw, "%d\t", freeCPU)
fmt.Fprintf(tw, "%s\t", units.ByteSize(hs.Summary.QuickStats.OverallMemoryUsage))
fmt.Fprintf(tw, "%s\t", (units.ByteSize(hs.Summary.QuickStats.OverallMemoryUsage))*1024*1024)
fmt.Fprintf(tw, "%s\t", units.ByteSize(hs.Summary.Hardware.MemorySize))
fmt.Fprintf(tw, "%d\t", freeMemory)
fmt.Fprintf(tw, "\n")
Expand Down

0 comments on commit 1f9e19f

Please sign in to comment.