-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add process info #59
Add process info #59
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the work @rakyll! I've left some minor changes. Also perhaps could we also update the README.md file?
main.go
Outdated
) | ||
|
||
const helpText = `Usage: gops is a tool to list and diagnose Go processes. | ||
|
||
go [cmd] ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/go /gops /
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
main.go
Outdated
) | ||
|
||
const helpText = `Usage: gops is a tool to list and diagnose Go processes. | ||
|
||
go [cmd] ... | ||
go <pid> # displays process info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto about s/go /gops /
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
main.go
Outdated
@@ -46,12 +50,17 @@ func main() { | |||
} | |||
|
|||
cmd := os.Args[1] | |||
|
|||
// see it is a PID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: see if it is a PID
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
ceed334
to
92413e6
Compare
PTAL, all addressed. |
Example output: $ gops <pid> threads: 14 memory usage: 0.090% cpu usage: 0.088% username: jbd cmd+args: /Users/jbd/bin/gocode -s -sock unix -addr 127.0.0.1:37373 Fixes google#58.
Example output:
$ gops $PID
threads: 14
memory usage: 0.090%
cpu usage: 0.088%
username: jbd
cmd+args: /Users/jbd/bin/gocode -s -sock unix -addr 127.0.0.1:37373
Fixes #58.