Get rid of pid display in stat and add more useful stat instead

This commit is contained in:
Babak Farrokhi 2019-05-07 15:59:30 +02:00
parent 12101674d5
commit 680c81fcd2
Signed by: farrokhi
GPG Key ID: 6B267AD85D632E9A

View File

@ -26,8 +26,8 @@ func main() {
if err == nil {
cpuUsage, _ := p.CPUPercent()
fmt.Printf("%d %s pid: %d cpu: %0.2f%%\t user: %0.2f\t system: %0.2f\n",
time.Now().Unix(), name, *flagPID, cpuUsage, v.User, v.System)
fmt.Printf("%d %s cpu: %3.2f%% user: %-3.2f system: %0.2f iowait: %0.2f irq: %0.2f softirq: %0.2f\n",
time.Now().Unix(), name, cpuUsage, v.User, v.System, v.Iowait, v.Irq, v.Softirq)
} else {
fmt.Println(err)
}