|
@@ -25,7 +25,7 @@ func GetDiskPercent() float64 {
|
|
}
|
|
}
|
|
|
|
|
|
func main() {
|
|
func main() {
|
|
- fmt.Println(GetCpuPercent())
|
|
|
|
- fmt.Println(GetMemPercent())
|
|
|
|
- fmt.Println(GetDiskPercent())
|
|
|
|
|
|
+ fmt.Println("cpu总占用为:", GetCpuPercent())
|
|
|
|
+ fmt.Println("内存总占用为:", GetMemPercent())
|
|
|
|
+ fmt.Println("磁盘总占用为:", GetDiskPercent())
|
|
}
|
|
}
|