1
0
mirror of https://github.com/google/gops.git synced 2024-11-27 08:31:17 +02:00
Commit Graph

248 Commits

Author SHA1 Message Date
Yash Ladha
036f72c5be Fix exit code if a valid cmd is passed (#91) 2019-03-27 10:35:05 -07:00
Pavlos Ratis
954ead6c72 add support for elapsed time (etime) (#80) 2019-03-20 14:59:55 -07:00
Bernerd Schaefer
05b5a27491 agent: include newlines in warning log messages (#87)
The warnings that agent prints to os.Stderr did not previously include
newlines causing program output to get jumbled up when an error occurs.
We see this most often when calling `Close()`, which causes the listener
to print `gops: accept tcp 127.0.0.1:9999: use of closed network
connection` which breaks whatever is logged next.
2019-03-20 11:58:46 -07:00
JBD
9fda3b87c7 Add Go modules and missing vendored file 2019-01-25 10:45:53 -08:00
Tanabe Ken-ichi
f341a40f99 Add gitignore to ignore gops and remove the binary (#85) 2018-09-03 00:25:10 -07:00
JBD
89672dbe3c fix out of bounds panic 2018-07-11 12:15:44 -07:00
Michal Rostecki
60aa68d3cc cmd: Check error returned by GetPort (#83)
Before this change, error returned by internal.GetPort was
assigned to err variable, but this assignment was ineffectual
and error was ignored.
2018-07-11 10:12:00 -07:00
Shi Han
e4108e7e73 address breaking changes from xlab/treeprint (#84)
A PR of xlab/treeprint (https://github.com/xlab/treeprint/pull/6)
which was merged might break gops in the future.
The PR removed treeprint.EdgeTypeStart. To set the root node,
we can now use SetValue(value Value) instead.

In this commit,

    dep ensure -update github.com/xlab/treeprint

was executed to update the library and then fix is applied.
2018-07-11 10:08:06 -07:00
Michal Rostecki
62b4d22266 vendor: dep ensure -update github.com/shirou/gopsutil (#79)
gopsutil library is licensed under BSD, but the previous version
contained some GPL-licensed code which is a violation of GPL
license. The updated version doesn't contain GPL-licensed code
anymore.

https://github.com/shirou/gopsutil/issues/518
2018-04-29 22:11:38 -07:00
Pavlos Ratis
3bb2ff8d85 Update README with the latest changes (#67) 2018-04-23 16:44:40 -07:00
Jack Mordaunt
160b358b10 Fixed data race. (#68) 2018-03-10 21:24:15 -08:00
Pavlos Ratis
48c083dd34 add command to display a process tree (#72)
Implemented a command, where users can list all running Go
processes in a tree-like format (like pstree).

Example:

$ gops tree
...
├── 13744
│   └── 71746 (gops) {go1.10}
├── 1
│   └── 13962 (gocode) {go1.9}
└── 557
    └── 635 (com.docker.supervisor) {go1.9.2}
        └── 638 (com.docker.driver.amd64-linux) {go1.9.2}
2018-03-10 19:43:39 -08:00
Suhas Karanth
0e2aa5d22e dep ensure -update github.com/go-ole/go-ole (#70) 2018-03-03 12:00:58 -08:00
JBD
09ff00a4dd
Add process info (#59)
Example output:

$ gops <pid>
parent PID:	5985
threads:	27
memory usage:	0.199%
cpu usage:	0.139%
username:	jbd
cmd+args:	/Applications/Splice.app/Contents/Resources/Splice Helper.app/Contents/MacOS/Splice Helper -pid 5985
local/remote:	127.0.0.1:56765 <-> :0 (LISTEN)
local/remote:	127.0.0.1:56765 <-> 127.0.0.1:50955 (ESTABLISHED)
local/remote:	100.76.175.164:52353 <-> 54.241.191.232:443 (ESTABLISHED)

Fixes #58.
2018-02-27 19:41:44 -08:00
ferhat elmas
e09130d898 test: remove unused type (#66) 2017-12-21 19:26:21 -07:00
ferhat elmas
f4d96179f3 cmd: Use strings.Contains (#65)
- instead strings.Index check
2017-12-02 20:39:23 -07:00
Nazri Ramliy
2209de1300 Add usage synopsis in help message (#64) 2017-11-23 18:41:11 -07:00
Rambone
390a41310a Report more Stack info, as stack-mspan-inuse、stack-mspan-sys etc. (#63) 2017-11-20 10:28:44 -08:00
Rambone
dcc978d6e8 make ConfigDir configurable (#61)
make ConfigDir configurable

* internal: retrieve ConfigDir from GOPS_CONFIG_DIR environment variable

* make code graceful

* code optimize
2017-11-13 00:52:04 -07:00
JBD
ce0552a598 README: document setgc (#57) 2017-10-08 12:11:38 -06:00
Daniel Fireman
ed4f1f24a6 Introducing support to debug.SetGCPercent. (#56)
* Introducing support to debug.SetGCPercent.

 Fixes #8

On my I needed to augment a little bit the communication
protocol to add support to optional parameters.
2017-10-06 17:50:40 -06:00
Pieter Louw
3f15b6d2b6 README: replace agent.Listen nil param with empty Options (#55) 2017-10-04 00:22:55 -06:00
JBD
25312cafb9 add missing license headers (#54) 2017-09-21 00:33:28 -06:00
JBD
61651220bb README: godoc should link to the top-level package (#53) 2017-09-18 19:21:51 -06:00
Rene Zbinden
6865b1eab5 keep trace and profile files when go tool chain is not available (#52) 2017-09-15 15:03:29 -07:00
Pavlos Ratis
f6c95cf224 Update gops snippets to match the new output (#50)
* update README snippets to reflect the new output

Updated the sample output in the README to match the
properly tabulated output when actually running the program.
2017-09-13 16:09:42 -06:00
JBD
1a41b817e5 agent: don't close on interrupt by default (#49) 2017-09-11 19:50:16 -07:00
JBD
d38055cdcb internal, vendor: remove unused code (#48)
internal object packages are no longer required
given gops depends on rsc.io/goversion/version now.

Also running dep prune to remove the packages
gops doesn't depend from the vendor directory.
2017-09-06 12:15:36 -06:00
Jaana Burcu Dogan
57e77c5c37 agent indicator should be postfix 2017-09-04 23:05:17 -07:00
Jaana Burcu Dogan
a1c72eeaa8 shorthen devel build version string 2017-09-04 20:08:19 -07:00
Jaana Burcu Dogan
f0a29dc244 add PPID to the output 2017-09-04 18:49:17 -07:00
Jaana Burcu Dogan
08cb2394b4 vendor: dep ensure again 2017-09-04 11:54:34 -07:00
Emmanuel T Odeke
d858829db9 goversion: use rsc.io/goversion/version instead of internal package (#47)
Follow up of
112843115d (commitcomment-23936637)

Solves the problem of us having to manually watch
upstream and pull in bug fixes and updates, if our
internal copy goes stale.

Fixes #22.
2017-09-04 11:53:45 -07:00
Jaana Burcu Dogan
bfd379ce45 goprocess: report info about a single process 2017-09-04 11:45:49 -07:00
Jaana Burcu Dogan
a5b317229c README: add build status badge 2017-09-04 11:23:37 -07:00
Jaana Burcu Dogan
8d0aff5e37 switch to Circle CI 2017-09-04 10:09:16 -07:00
Jaana Burcu Dogan
2a9a4ad991 README: move badges to the next line 2017-09-04 09:45:22 -07:00
JBD
414c940baf output better aligned results (#46)
Before the change, the output looked:
43819	gops	go1.9	/Users/jbd/bin/gops
20160	corp-ssh-helper	go1.8.1.typealias	/usr/local/bin/corp-ssh-helper
30492	dlv	go1.9	/Users/jbd/bin/dlv
31212	godoc	devel +990dac2723 Fri Jun 30 18:24:58 2017 +0000	/Users/jbd/bin/godoc
18579	mnp_logger	go1.7.1	/usr/local/bin/mnp_logger

After the change, it looks:
48071  gops            go1.9                                            /Users/jbd/bin/gops
31212  godoc           devel +990dac2723 Fri Jun 30 18:24:58 2017 +0000 /Users/jbd/bin/godoc
18579  mnp_logger      go1.7.1                                          /usr/local/bin/mnp_logger
20160  corp-ssh-helper go1.8.1.typealias                                /usr/local/bin/corp-ssh-helper
30492  dlv             go1.9                                            /Users/jbd/bin/dlv
44512  gocode          devel +990dac2723 Fri Jun 30 18:24:58 2017 +0000 /Users/jbd/bin/gocode
2017-09-01 18:43:29 -06:00
Jaana Burcu Dogan
208dc6473d support only 1.8 and 1.9 2017-08-29 14:09:23 -07:00
Jaana Burcu Dogan
5c0015f27d Export Go process reporting section as a package. 2017-08-28 19:33:06 -07:00
Jaana Burcu Dogan
112843115d report go build version 2017-08-26 14:47:02 -07:00
Jaana Burcu Dogan
806455e841 all: run dep init again 2017-07-28 14:45:08 -07:00
Cezar Sá Espinola
51dfb48038 Print filenames on client for pprof and trace dumps (#38) 2017-07-27 00:54:08 -07:00
Jaana Burcu Dogan
ccfb39d854 Do not checkin the vendor directory. 2017-05-12 17:01:12 -07:00
Jaana Burcu Dogan
0ac75a2ac5 Vendor all dependencies. 2017-05-12 16:49:31 -07:00
Jaana Burcu Dogan
467d918128 examples/hello: simplify the minimal example 2017-05-10 14:38:11 -07:00
Jaana Burcu Dogan
62f833fc9f remove dependencies to github.com/pkg/errors 2017-03-18 17:29:43 -07:00
Shawn Smith
b0c5c02b30 agent: fix godoc typo (#34) 2017-03-08 21:06:37 -08:00
Shawn Smith
07a10154a6 add Go 1.8 to travis.yml (#35) 2017-03-08 21:05:54 -08:00
Jaana Burcu Dogan
e1d2345403 doc: fix title on README 2017-03-02 11:52:43 -08:00