bcicen / ctop Goto Github PK
View Code? Open in Web Editor NEWTop-like interface for container metrics
Home Page: https://ctop.sh
License: MIT License
Top-like interface for container metrics
Home Page: https://ctop.sh
License: MIT License
Not sure if this is intentional, but ctop doesn't respond to ctrl+c, which was the first thing I'd naturally try to exit a new command-line application.
On first use, I ended up killing my terminal session, before getting to the end of the README for the list of commands.
similar to top -b:
-b :Batch-mode operation
Starts top in 'Batch' mode, which could be useful for sending output from top to other programs or to a file. In this mode, top will not accept input and runs
until the iterations limit you've set with the '-n' command-line option or until killed.
Hey, great job! Very handy! A few opinions on keyboard commands:
Just my two cents. Feel free to close if you've got other plans 😄
Scott
Would be nice if this could be installed through brew :)
Hi guys,
Could you build a dockerized version of ctop? Maybe using Alpine Linux or something to make it very lean ? It would be great to have a version that needs no installation
According to README I tried to build ctop in Windows 10 and got following:
SYSTEM@DESKTOP-90SRLRU C:\tools\go\src\github.com\bcicen\ctop
> git clone https://github.com/bcicen/ctop.git %GOPATH%/src/github.com/bcicen/ctop
Cloning into 'C:\Users\joel\go/src/github.com/bcicen/ctop'...
remote: Counting objects: 1293, done.
remote: Compressing objects: 100% (116/116), done.
remote: Total 1293 (delta 48), reused 0 (delta 0), pack-reused 1176
Receiving objects: 100% (1293/1293), 2.95 MiB | 4.32 MiB/s, done.
Resolving deltas: 100% (729/729), done.
SYSTEM@DESKTOP-90SRLRU C:\tools\go\src\github.com\bcicen\ctop
> cd %GOPATH%/src/github.com/bcicen/ctop
SYSTEM@DESKTOP-90SRLRU C:\Users\joel\go\src\github.com\bcicen\ctop
> glide install
[WARN] The name listed in the config file (github.com/bcicen/ctop) does not match the current location (.)
[INFO] Downloading dependencies. Please wait...
[INFO] --> Fetching golang.org/x/sys
[INFO] --> Fetching github.com/Azure/go-ansiterm
[INFO] --> Fetching github.com/mitchellh/go-wordwrap
[INFO] --> Fetching github.com/nu7hatch/gouuid
[INFO] --> Fetching github.com/mattn/go-runewidth
[INFO] --> Fetching github.com/Microsoft/go-winio
[INFO] --> Fetching github.com/Sirupsen/logrus
[INFO] --> Fetching github.com/nsf/termbox-go
[INFO] --> Fetching github.com/gizak/termui
[INFO] --> Fetching github.com/fsouza/go-dockerclient
[INFO] --> Fetching github.com/docker/go-connections
[INFO] --> Fetching github.com/opencontainers/runc
[INFO] --> Fetching github.com/maruel/panicparse
[INFO] --> Fetching github.com/jgautheron/codename-generator
[INFO] --> Fetching golang.org/x/net
[INFO] --> Fetching github.com/op/go-logging
[INFO] --> Fetching github.com/docker/go-units
[INFO] --> Fetching github.com/docker/docker
[INFO] --> Fetching github.com/hashicorp/go-cleanhttp
[INFO] Setting references.
[INFO] --> Setting version for github.com/gizak/termui to ea10e6ccee219e572ffad0ac1909f1a17f6db7d6.
[INFO] --> Setting version for github.com/docker/go-units to 0dadbb0345b35ec7ef35e228dabb8de89a65bf52.
[INFO] --> Setting version for github.com/docker/go-connections to a2afab9802043837035592f1c24827fb70766de9.
[INFO] --> Setting version for github.com/docker/docker to ce07fb6b0f1b8765b92022e45f96bd4349812e06.
[INFO] --> Setting version for github.com/Azure/go-ansiterm to fa152c58bc15761d0200cb75fe958b89a9d4888e.
[INFO] --> Setting version for github.com/op/go-logging to b2cb9fa56473e98db8caba80237377e83fe44db5.
[INFO] --> Setting version for github.com/fsouza/go-dockerclient to 318513eb1ab27495afbc67f671ba1080513d8aa0.
[INFO] --> Setting version for github.com/nsf/termbox-go to 91bae1bb5fa9ee504905ecbe7043fa30e92feaa3.
[INFO] --> Setting version for github.com/Sirupsen/logrus to 1deb2db2a6fff8a35532079061b903c3a25eed52.
[INFO] --> Setting version for github.com/opencontainers/runc to 31980a53ae7887b2c8f8715d13c3eb486c27b6cf.
[INFO] --> Setting version for github.com/hashicorp/go-cleanhttp to 3573b8b52aa7b37b9358d966a898feb387f62437.
[INFO] --> Setting version for golang.org/x/net to a6577fac2d73be281a500b310739095313165611.
[INFO] --> Setting version for golang.org/x/sys to 99f16d856c9836c42d24e7ab64ea72916925fa97.
[INFO] --> Setting version for github.com/jgautheron/codename-generator to 16d037c7cc3c9b552fe4af9828b7338d752dbaf9.
[INFO] --> Setting version for github.com/maruel/panicparse to 25bcac0d793cf4109483505a0d66e066a3a90a80.
[INFO] --> Setting version for github.com/Microsoft/go-winio to fff283ad5116362ca252298cfc9b95828956d85d.
[INFO] --> Setting version for github.com/mattn/go-runewidth to 14207d285c6c197daabb5c9793d63e7af9ab2d50.
[INFO] --> Setting version for github.com/nu7hatch/gouuid to 179d4d0c4d8d407a32af483c2354df1d2c91e6c3.
[INFO] --> Setting version for github.com/mitchellh/go-wordwrap to ad45545899c7b13c020ea92b2072220eefad42b8.
[INFO] Exporting resolved dependencies...
[INFO] --> Exporting github.com/Azure/go-ansiterm
[INFO] --> Exporting github.com/docker/go-connections
[INFO] --> Exporting github.com/gizak/termui
[INFO] --> Exporting github.com/docker/go-units
[INFO] --> Exporting github.com/nsf/termbox-go
[INFO] --> Exporting github.com/docker/docker
[INFO] --> Exporting github.com/Sirupsen/logrus
[INFO] --> Exporting github.com/Microsoft/go-winio
[INFO] --> Exporting github.com/fsouza/go-dockerclient
[INFO] --> Exporting github.com/mattn/go-runewidth
[INFO] --> Exporting github.com/maruel/panicparse
[INFO] --> Exporting golang.org/x/net
[INFO] --> Exporting github.com/hashicorp/go-cleanhttp
[INFO] --> Exporting github.com/mitchellh/go-wordwrap
[INFO] --> Exporting github.com/op/go-logging
[INFO] --> Exporting github.com/jgautheron/codename-generator
[INFO] --> Exporting github.com/opencontainers/runc
[INFO] --> Exporting golang.org/x/sys
[INFO] --> Exporting github.com/nu7hatch/gouuid
[INFO] Replacing existing vendor dependencies
SYSTEM@DESKTOP-90SRLRU C:\Users\joel\go\src\github.com\bcicen\ctop
> go build
unexpected directory layout:
import path: github.com/jgautheron/codename-generator
root: C:\Users\joel\go\src
dir: C:\Users\joel\go\src\github.com\bcicen\ctop\vendor\github.com\jgautheron\codename-generator
expand root: C:\Users\joel\go\src
expand dir: C:\Users\joel\go\src\github.com\bcicen\ctop\vendor\github.com\jgautheron\codename-generator
separator: \
My environment:
SYSTEM@DESKTOP-90SRLRU C:\Users\joel\go\src\github.com\bcicen\ctop
> ver
Microsoft Windows [Version 10.0.14393]
SYSTEM@DESKTOP-90SRLRU C:\Users\joel\go\src\github.com\bcicen\ctop
> go version
go version go1.8 windows/amd64
SYSTEM@DESKTOP-90SRLRU C:\Users\joel\go\src\github.com\bcicen\ctop
> echo %GOPATH%
C:\Users\joel\go
On current master branch @ddce54f991517838e1b42a27ebcfdce1c04afc72
go build
returns:
# github.com/bcicen/ctop/cwidgets/expanded
ctop/cwidgets/expanded/info.go:19: p.Seperator undefined (type *termui.Table has no field or method Seperator)
ctop/cwidgets/expanded/mem.go:73: mbar.NumFmt undefined (type *termui.MBarChart has no field or method NumFmt)
First error is a simple spelling mistake p.Seperator
should be p.Separator
, pull request submitted (#15)
For the 2nd error, NumFmt doesn't exist. Not sure how to fix.
We have setup automation via Puppet to download the latest linux-amd64 release of ctop. However, your latest release doesn't contain binaries, so the automation fails. I humbly request that you either use a separate label for "latest binaries' or ensure that the "latest" label contains them (by, perhaps, releasing the -deps, then another version with the binaries.)
Thanks
Steps:
f
to filtersdjkfhljkghlksdfh
)Enter
to save the filterEnter
againIf there's no containers listed it can't go into the container-specific view.
It would be nice to add support for changing the update interval. Like top
, a key (d
and/or s
?) could be used to change the refresh interval from the default value to another value.
Also, if that feature is added, perhaps the default refresh interval can be increase to 3.0 seconds, like top?
If that sounds like something that would add value to the project, I can start working on it.
Can a connector for Kubernetes be defined in the code ?
I like this,it's so good.
I want to know will support Web UI ?
Installed ctop via brew yesterday on Mac os. On some machines it works, on others it displays the ctop information table and then crashed with a segmentation fault. I dont know if it matters but this happened on swarm nodes:
manuel@Manuels-MBP ~ $ ctop -v
ctop version dev-build, build none
: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x1283014]
goroutine 1110 [running]:
github.com/bcicen/ctop/cwidgets/compact.(*CompactGrid).Align(0xc42045f950)
/private/tmp/ctop-20170315-2262-1ohr1sm/ctop-0.5/src/github.com/bcicen/ctop/cwidgets/compact/grid.go:30 +0x1f4
main.RedrawRows(0xc420417900)
/private/tmp/ctop-20170315-2262-1ohr1sm/ctop-0.5/src/github.com/bcicen/ctop/grid.go:33 +0x18c
main.RefreshDisplay()
/private/tmp/ctop-20170315-2262-1ohr1sm/ctop-0.5/src/github.com/bcicen/ctop/grid.go:65 +0x3a
main.Display.func9(0x1359ee7, 0x5, 0xc420155202, 0x9, 0x1359ee7, 0x5, 0x0, 0x0, 0x1309ec0, 0xc420155210, ...)
/private/tmp/ctop-20170315-2262-1ohr1sm/ctop-0.5/src/github.com/bcicen/ctop/grid.go:116 +0x20
github.com/bcicen/ctop/vendor/github.com/gizak/termui.(*EvtStream).Loop.func1(0xc420016640, 0x1359ee7, 0x5, 0xc420155202, 0x9, 0x1359ee7, 0x5, 0x0, 0x0, 0x1309ec0, ...)
/private/tmp/ctop-20170315-2262-1ohr1sm/ctop-0.5/src/github.com/bcicen/ctop/vendor/github.com/gizak/termui/events.go:251 +0xff
created by github.com/bcicen/ctop/vendor/github.com/gizak/termui.(*EvtStream).Loop
/private/tmp/ctop-20170315-2262-1ohr1sm/ctop-0.5/src/github.com/bcicen/ctop/vendor/github.com/gizak/termui/events.go:253 +0x167
It will be nice if the example how to run ctop in container (and what and where to mount) is provided.
Especially for us, CoreOS users.
Possible capabilities:
Any support for swarm mode? Prefer pre-1.12 swarm mode support.
-f <filter>
to specify a filter to start with, so I don't need to use that filter every time for my docker-compose stack-a
active only? hide offline containers-s <sort>
open with a specific sort-r
reverse the sortWould be helpful to specify certain options immediately on startup instead of having to change the state once it's running.
There appears to be a drawing bug, and I'm fairly certain it's in the underlying termui package.
When a containers hits >100% CPU usage, the bar will go red, but when it drops below 100% again, there's one red "pixel" stuck on the right. From a cursory glance at termui, I'd say that percentage should have an extra check for "if it's >100, cap it at 100".
Is this something that should be bumped up to termui, or is it something that can be caught in ctop itself?
Very nice tool!
I have some features that would be nice if you can build that in your tool.
docker logs -f [--tail=x] <container>
docker exec -ti <container> bash
There seems to be no way to specify certificate and key to access remote docker engine via TLS protected connection.
Setting DOCKER_HOST to:
export DOCKER_HOST=tcp://address:port DOCKER_TLS_VERIFY=1
forced ctop to https/tls mode, but there is no way to specify key needed to authenticated with remote demon.
Details can be found here: https://docs.docker.com/engine/security/https/
Hey,
it seems there is no support for the musl libc / alpine environment.
Maybe it's easy to fix that, projects like caddy supporting musl as well. :)
Regards, Zaolin
Hi,
Great tool thanks. Works fine natively on my mac fine.
However when installed on an ESX VM running docker containers the CPU, NET and ID are all reported, but the Memory column displays 0B / 0B and the PIDS column displays 0
My ESX VM:
Any idea why the memory and PIDS are not reported?
Thanks.
This isn't immediately obvious to me, ESC
, CTRL+C
, etc don't work. Maybe those should work.
Edit: Seems to also eat CTRL+Z
so I can't bg it and kill it... hmm.
Edit2: Oh, found it, hitting Enter
saves the filter.
Looks like you need to vendor/
your deps
$ go get -v -u github.com/bcicen/ctop
github.com/bcicen/ctop (download)
github.com/op/go-logging (download)
github.com/fsouza/go-dockerclient (download)
github.com/docker/docker (download)
github.com/docker/go-units (download)
github.com/hashicorp/go-cleanhttp (download)
Fetching https://golang.org/x/net/context?go-get=1
Parsing meta tags from https://golang.org/x/net/context?go-get=1 (status code 200)
get "golang.org/x/net/context": found meta tag main.metaImport{Prefix:"golang.org/x/net", VCS:"git", RepoRoot:"https://go.googlesource.com/net"} at https://golang.org/x/net/context?go-get=1
get "golang.org/x/net/context": verifying non-authoritative meta tag
Fetching https://golang.org/x/net?go-get=1
Parsing meta tags from https://golang.org/x/net?go-get=1 (status code 200)
golang.org/x/net (download)
Fetching https://golang.org/x/net/context/ctxhttp?go-get=1
Parsing meta tags from https://golang.org/x/net/context/ctxhttp?go-get=1 (status code 200)
get "golang.org/x/net/context/ctxhttp": found meta tag main.metaImport{Prefix:"golang.org/x/net", VCS:"git", RepoRoot:"https://go.googlesource.com/net"} at https://golang.org/x/net/context/ctxhttp?go-get=1
get "golang.org/x/net/context/ctxhttp": verifying non-authoritative meta tag
github.com/gizak/termui (download)
github.com/maruel/panicparse (download)
github.com/mattn/go-runewidth (download)
github.com/mitchellh/go-wordwrap (download)
github.com/nsf/termbox-go (download)
github.com/jgautheron/codename-generator (download)
github.com/nu7hatch/gouuid (download)
github.com/docker/docker/api/types/blkiodev
github.com/docker/docker/api/types/mount
github.com/docker/docker/api/types/strslice
github.com/docker/docker/vendor/github.com/docker/go-connections/nat
github.com/docker/docker/vendor/github.com/docker/go-units
github.com/docker/docker/api/types/versions
github.com/docker/docker/api/types/network
github.com/docker/docker/api/types/filters
github.com/docker/docker/api/types/registry
github.com/docker/docker/vendor/github.com/Sirupsen/logrus
github.com/docker/docker/api/types/container
github.com/docker/docker/pkg/system
github.com/docker/docker/vendor/github.com/opencontainers/runc/libcontainer/user
github.com/docker/docker/vendor/golang.org/x/net/context
github.com/docker/docker/api/types/swarm
github.com/docker/docker/pkg/ioutils
github.com/docker/docker/api/types
github.com/docker/docker/pkg/idtools
github.com/docker/docker/pkg/promise
github.com/docker/docker/pkg/pools
github.com/docker/docker/pkg/fileutils
github.com/docker/docker/vendor/github.com/opencontainers/runc/libcontainer/system
github.com/docker/docker/pkg/homedir
github.com/docker/docker/vendor/github.com/Nvveen/Gotty
github.com/docker/docker/pkg/jsonlog
github.com/docker/docker/opts
github.com/docker/docker/pkg/archive
github.com/docker/docker/pkg/term
github.com/docker/docker/pkg/stdcopy
github.com/docker/go-units
github.com/hashicorp/go-cleanhttp
github.com/docker/docker/pkg/jsonmessage
golang.org/x/net/context
github.com/maruel/panicparse/stack
golang.org/x/net/context/ctxhttp
github.com/mattn/go-runewidth
github.com/nsf/termbox-go
github.com/fsouza/go-dockerclient
github.com/gizak/termui
github.com/bcicen/ctop/widgets
github.com/bcicen/ctop/widgets/menu
github.com/bcicen/ctop/metrics
github.com/bcicen/ctop/cwidgets
github.com/bcicen/ctop/cwidgets/compact
github.com/bcicen/ctop/cwidgets/expanded
# github.com/bcicen/ctop/cwidgets/expanded
Code/Go/src/github.com/bcicen/ctop/cwidgets/expanded/info.go:19: p.Seperator undefined (type *termui.Table has no field or method Seperator)
Code/Go/src/github.com/bcicen/ctop/cwidgets/expanded/mem.go:73: mbar.NumFmt undefined (type *termui.MBarChart has no field or method NumFmt)
Hi,
I have a dedicated server at OVH, and the current release of CTOP seems to not work on it:
I can see my one container, but there's no mem/cpu/rx-tx working it seems, even though I'm using the container and top sees activity.
Uname -a:
Linux xxxx 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2+deb8u3 (2016-07-02) x86_64 GNU/Linux
Processor is (there's 4 of them):
cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 54
model name : Intel(R) Atom(TM) CPU N2800 @ 1.86GHz
stepping : 1
microcode : 0x10d
cpu MHz : 798.000
cache size : 512 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts nopl nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm arat dtherm
bogomips : 3733.22
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
ctop version is:
wget https://github.com/bcicen/ctop/releases/download/v0.4/ctop-0.4-linux-amd64 -O ctop
If you need extra info, ask away.
Also, I didn't try compiling on premises, I used the release.
Much like (h)top you would want to stop a container, and even delete stopped containers.
Running ctop version 0.5, build a87bdce on Debian 8.7. It doesn't show the memory usage and PIDs for me, even when running as root.
Nice tool!
We're running hundreds of containers and it's kind of exhausting to scroll through. Supporting Page up and Page down would really help!
Thanks!
Would be neat to see support for monitoring of nspawn/machinectl containers. Currently 'systemd-cgtop' gives you some of this information, but ctop is much cleaner. Docker is the current market standard, but this systemd tool has a promising future. Cheers.
$ go get github.com/bcicen/ctop
../../github.com/bcicen/ctop/cwidgets/expanded/mem.go:73: mbar.NumFmt undefined (type *termui.MBarChart has no field or method NumFmt)
It would be nice to monitor containers across all Swarm Mode cluster.
Hello,
First of all, it an amazing tool, so congratulations!
Second, I am not a programmer, but I am a SysAdm and If i can i would like to make one suggestion to improve the ctop.
You can implement at the top, one bar that shows the summarize of cpu,memory and net usage and take the same from the System SO and then compare both, one against other.
With this, you will have in the same "top", the system behavior and the Docker ;)
Regards,
Hi,
I'm try to build ctop and I have a problem with error:
cwidgets/expanded/mem.go:73: mbar.NumFmt undefined (type *termui.MBarChart has no field or method NumFmt)
Code listing from cwidgets/expanded/mem.go:
63 func newMemChart() *ui.MBarChart {
64 mbar := ui.NewMBarChart()
65 mbar.X = 1
66 mbar.Border = false
67 mbar.BarGap = 1
68 mbar.BarWidth = 6
69
70 mbar.BarColor[1] = ui.ColorBlack
71 mbar.NumColor[1] = ui.ColorBlack
72
73 mbar.NumFmt = cwidgets.ByteFormatInt <- PROBLEMATIC LINE
74 //mbar.ShowScale = true
75 return mbar
76 }
According to source of "mbarchart" (https://github.com/gizak/termui/blob/master/mbarchart.go), there is no such variable.
type MBarChart struct {
Block
BarColor [NumberofColors]Attribute
TextColor Attribute
NumColor [NumberofColors]Attribute
Data [NumberofColors][]int
DataLabels []string
BarWidth int
BarGap int
labels [][]rune
dataNum [NumberofColors][][]rune
numBar int
scale float64
max int
minDataLen int
numStack int
ShowScale bool
maxScale []rune
}
Thanks!
Daniel
Nice Tool. When can we expect the support of lxc/lxd?
Hi,
Thanks for the works it look promising!
Following the readme install and usage instruction I got the above.
$ wget https://github.com/bcicen/ctop/releases/download/v0.4/ctop-0.4-linux-amd64 -O ctop
--2017-03-09 22:27:52-- https://github.com/bcicen/ctop/releases/download/v0.4/ctop-0.4-linux-amd64
Resolving github.com (github.com)... 192.30.253.112, 192.30.253.113
Connecting to github.com (github.com)|192.30.253.112|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-cloud.s3.amazonaws.com/releases/77419377/5889ef20-04f8-11e7-85fd-10eb7cd49c8e.4-linux-amd64?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20170309%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170309T212753Z&X-Amz-Expires=300&X-Amz-Signature=7fc18aae45dd5a221706d321741686805799b250d46e6d032b77bfa142ca2d83&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dctop-0.4-linux-amd64&response-content-type=application%2Foctet-stream [following]
--2017-03-09 22:27:53-- https://github-cloud.s3.amazonaws.com/releases/77419377/5889ef20-04f8-11e7-85fd-10eb7cd49c8e.4-linux-amd64?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20170309%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170309T212753Z&X-Amz-Expires=300&X-Amz-Signature=7fc18aae45dd5a221706d321741686805799b250d46e6d032b77bfa142ca2d83&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dctop-0.4-linux-amd64&response-content-type=application%2Foctet-stream
Resolving github-cloud.s3.amazonaws.com (github-cloud.s3.amazonaws.com)... 52.216.80.208
Connecting to github-cloud.s3.amazonaws.com (github-cloud.s3.amazonaws.com)|52.216.80.208|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4878976 (4,7M) [application/octet-stream]
Saving to: ‘ctop’
ctop
100%[=====================================================================================================================>] 4,65M 703KB/s in 8,4s
2017-03-09 22:28:02 (564 KB/s) - ‘ctop’ saved [4878976/4878976]
$ sudo mv ctop /usr/local/bin/
$ sudo chmod +x /usr/local/bin/ctop
Usage:
$ export DOCKER_HOST=tcp://127.0.0.1:4243
$ ctop
panic: cannot connect to Docker endpoint
Great Tool!
I made a package in the Arch User Repository. Feel free to mention it in the installation section (or not).
This requires some level of terminal support for fonts. It'd be nice if these were listed somewhere
Homebrew requires compiler software (not download bin)
Homebrew/homebrew-core#10846
build log
$ brew install --build-from-source Formula/ctop.rb
==> Downloading https://github.com/bcicen/ctop/archive/v0.4.1.tar.gz
Already downloaded: /Users/avelino/Library/Caches/Homebrew/ctop-0.4.1.tar.gz
==> go build -o ctop
Last 15 lines from /Users/avelino/Library/Logs/Homebrew/ctop/01.go:
src/github.com/bcicen/ctop/metrics/docker.go:4:2: cannot find package "github.com/fsouza/go-dockerclient" in any of:
/usr/local/Cellar/go/1.8/libexec/src/github.com/fsouza/go-dockerclient (from $GOROOT)
/private/tmp/ctop-20170311-49891-16gthmb/ctop-0.4.1/src/github.com/fsouza/go-dockerclient (from $GOPATH)
src/github.com/bcicen/ctop/cwidgets/compact/gauge.go:4:2: cannot find package "github.com/gizak/termui" in any of:
/usr/local/Cellar/go/1.8/libexec/src/github.com/gizak/termui (from $GOROOT)
/private/tmp/ctop-20170311-49891-16gthmb/ctop-0.4.1/src/github.com/gizak/termui (from $GOPATH)
mocksource.go:12:2: cannot find package "github.com/jgautheron/codename-generator" in any of:
/usr/local/Cellar/go/1.8/libexec/src/github.com/jgautheron/codename-generator (from $GOROOT)
/private/tmp/ctop-20170311-49891-16gthmb/ctop-0.4.1/src/github.com/jgautheron/codename-generator (from $GOPATH)
mocksource.go:13:2: cannot find package "github.com/nu7hatch/gouuid" in any of:
/usr/local/Cellar/go/1.8/libexec/src/github.com/nu7hatch/gouuid (from $GOROOT)
/private/tmp/ctop-20170311-49891-16gthmb/ctop-0.4.1/src/github.com/nu7hatch/gouuid (from $GOPATH)
src/github.com/bcicen/ctop/logging/main.go:6:2: cannot find package "github.com/op/go-logging" in any of:
/usr/local/Cellar/go/1.8/libexec/src/github.com/op/go-logging (from $GOROOT)
/private/tmp/ctop-20170311-49891-16gthmb/ctop-0.4.1/src/github.com/op/go-logging (from $GOPATH)
Do not report this issue to Homebrew/brew or Homebrew/core!
These open issues may also help:
initial ctop formula https://github.com/Homebrew/homebrew-core/pull/10846
One thing I enjoy seeing from the docker stats themselves is the PID counts. I would love to have that in this tool.
If that's not too tricky (I'd expect it isn't), I'd be willing to tackle it.
I have encountered this panic one time. Below the complete stack trace.
After this panic, the terminal is not usable anymore (cannot type in it).
fatal error: concurrent map read and map write
goroutine 27 [running]:
runtime.throw(0x73bc06, 0x21)
/usr/lib/go/src/runtime/panic.go:596 +0x95 fp=0xc420162ec8 sp=0xc420162ea8
runtime.mapaccess2_faststr(0x6ce980, 0xc42015c0c0, 0xc420156300, 0x40, 0xc420162f80, 0x4063f5)
/usr/lib/go/src/runtime/hashmap_fast.go:326 +0x50a fp=0xc420162f28 sp=0xc420162ec8
main.(*DockerContainerSource).MustGet(0xc420168180, 0xc420156300, 0x40, 0x1)
/home/bradley/repos/bcicen/ctop/dockersource.go:109 +0x53 fp=0xc420162f90 sp=0xc420162f28
main.(*DockerContainerSource).Loop(0xc420168180)
/home/bradley/repos/bcicen/ctop/dockersource.go:102 +0x9d fp=0xc420162fd8 sp=0xc420162f90
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:2197 +0x1 fp=0xc420162fe0 sp=0xc420162fd8
created by main.NewDockerContainerSource
/home/bradley/repos/bcicen/ctop/dockersource.go:34 +0x148
would be nice to have keys to stop, start and remove container (this could bring some modal 'are you sure' window)
like docker stats
.
Great tool btw.
Many container engines are today built on runC. A few notable examples:
Wonder if we could make ctop work with runC? It would have to be on the host that's running runC containers but that's probably not too much to ask.
WDYT?
Environment OSX Sierra 10.12.1
Docker setup: docker-machine (vm)
So I installed ctop the way that your README instructed, and I set my docker host env variable (in my ~/.bash_profile) and when I run ctop, I get the following error
panic: Get http://192.168.99.100:2376/containers/json?all=1: malformed HTTP response "\x15\x03\x01\x00\x02\x02"
Hi,
having support for cgroups would enable this tool to support other containerized platforms like https://github.com/flynn/flynn :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.