Commit f870d01 1 parent 48d3575 commit f870d01 Copy full SHA for f870d01
File tree 2 files changed +13
-15
lines changed
2 files changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -79,23 +79,21 @@ The output displays:
79
79
80
80
Note that processes running the agent are marked with ` * ` next to the PID (e.g. ` 4132* ` ).
81
81
82
- #### $ gops \< pid\> [ seconds ]
82
+ #### $ gops \< pid\>
83
83
84
- To report more information about a process, run ` gops ` following by a PID:
85
- > If set the seconds arg, the percent of the CPU time this process uses within given time duration will be reported.
84
+ To report more information about a process, run ` gops ` followed by a PID:
86
85
87
86
``` sh
88
87
$ gops < pid>
89
- parent PID: 5985
90
- threads: 27
91
- memory usage: 0.199%
92
- cpu usage(all): 0.139%
93
- cpu usage(1s): 19.5% # if seconds provided
94
- username: jbd
95
- cmd+args: /Applications/Splice.app/Contents/Resources/Splice Helper.app/Contents/MacOS/Splice Helper -pid 5985
96
- local/remote: 127.0.0.1:56765 < -> :0 (LISTEN)
97
- local/remote: 127.0.0.1:56765 < -> 127.0.0.1:50955 (ESTABLISHED)
98
- local/remote: 100.76.175.164:52353 < -> 54.241.191.232:443 (ESTABLISHED)
88
+ parent PID: 5985
89
+ threads: 27
90
+ memory usage: 0.199%
91
+ cpu usage: 0.139%
92
+ username: jbd
93
+ cmd+args: /Applications/Splice.app/Contents/Resources/Splice Helper.app/Contents/MacOS/Splice Helper -pid 5985
94
+ local/remote: 127.0.0.1:56765 < -> :0 (LISTEN)
95
+ local/remote: 127.0.0.1:56765 < -> 127.0.0.1:50955 (ESTABLISHED)
96
+ local/remote: 100.76.175.164:52353 < -> 54.241.191.232:443 (ESTABLISHED)
99
97
```
100
98
101
99
#### $ gops tree
Original file line number Diff line number Diff line change @@ -146,11 +146,11 @@ func processInfo(pid, interval int) {
146
146
fmt .Printf ("memory usage:\t %.3f%%\n " , v )
147
147
}
148
148
if v , err := p .CPUPercent (); err == nil {
149
- fmt .Printf ("cpu usage(all) :\t %.3f%%\n " , v )
149
+ fmt .Printf ("cpu usage:\t %.3f%%\n " , v )
150
150
}
151
151
if interval > 0 {
152
152
if v , err := cpuPercentWithinTime (p , time .Second * time .Duration (interval )); err == nil {
153
- fmt .Printf ("cpu usage(%ds):\t %.3f%%\n " , interval , v )
153
+ fmt .Printf ("cpu usage (%ds):\t %.3f%%\n " , interval , v )
154
154
}
155
155
}
156
156
if v , err := p .Username (); err == nil {
You can’t perform that action at this time.
0 commit comments