From 680c81fcd25b7caaada90fe927dee4ba036ec17c Mon Sep 17 00:00:00 2001 From: Babak Farrokhi Date: Tue, 7 May 2019 15:59:30 +0200 Subject: [PATCH] Get rid of pid display in stat and add more useful stat instead --- goprocstat.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/goprocstat.go b/goprocstat.go index 860cd36..c66abf7 100644 --- a/goprocstat.go +++ b/goprocstat.go @@ -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) }