summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean E. Russell <ser@ser1.net>2020-05-31 10:29:14 -0500
committerSean E. Russell <ser@ser1.net>2020-05-31 10:29:14 -0500
commite8727c7c201f629126b968373e59183325915be5 (patch)
treec7a286ff59d5d7e17c7bd93af9eb8dfc1b6cad9e
parent7b09b909366ed45736a4230986aa5fe687cc0170 (diff)
parent299b4397d17ad90bf6da5abb1fcf45a18eb37fa7 (diff)
Merge branch 'master' into v4.0
-rw-r--r--CHANGELOG.md13
-rw-r--r--README.md8
-rw-r--r--devices/temp_freebsd.go18
-rw-r--r--go.mod4
-rw-r--r--go.sum3
-rw-r--r--logging/logging_arm64.go2
-rw-r--r--logging/logging_other.go3
7 files changed, 41 insertions, 10 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 384d7f4..53b5a2c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -59,6 +59,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Temperatures on Darwin were all over the place, and wrong (#48)
- Config file loading from `~/.config/gotop` wasn't working
- There were a number of minor issues with the config file that have been cleaned up.
+- Compile errors on FreeBSD due to golang.org/x/sys API breakages
+- Key bindings now work in FreeBSD (#95)
+
+## [3.5.3] - 2020-05-30
+
+The FreeBSD bugfix release. While there are non-FreeBSD fixes in here, the focus was getting gotop to work properly on FreeBSD.
+
+### Fixed
+
+- Address FreeBSD compile errors resulting to `golang.org/x/sys` API breakages
+- Key bindings now work in FreeBSD (#95)
+- Eliminate repeated logging about missing sensor data on FreeBSD VMs (#97)
+- Investigated #14, a report about gotop's memory not matching `top`'s numbers, and came to the conclusions that (a) `gotop` is more correct in some cases (swap) than `top`, and (b) that the metric `gotop` is using (`hw.physmem`) is probably correct -- or that there's no obviously superior metric. So no change.
## [3.5.2] - 2020-04-28
diff --git a/README.md b/README.md
index f773c1c..f788221 100644
--- a/README.md
+++ b/README.md
@@ -14,11 +14,10 @@ Join us in [\#gotop:matrix.org](https://riot.im/app/#/room/#gotop:matrix.org) ([
![](https://raw.githubusercontent.com/xxxserxxx/gotop/master/docs/release.svg)
-See the [mini-blog](/xxxserxxx/gotop/wiki/blog) for updates on the build status, and the [change log](/xxxserxxx/gotop/blob/master/CHANGELOG.md) for release updates.
+See the [mini-blog](/xxxserxxx/gotop/wiki/Micro-Blog) for updates on the build status, and the [change log](/xxxserxxx/gotop/blob/master/CHANGELOG.md) for release updates.
<img src="./assets/screenshots/demo.gif" />
-<img src="./assets/screenshots/kitchensink.gif" />
</div>
@@ -219,6 +218,9 @@ Run `gotop -h` to see the list of all command line options.
## More screen shots
+#### '-l kitchensink' + colorscheme
+<img src="./assets/screenshots/kitchensink.gif" />
+
#### "-l battery"
<img src="./assets/screenshots/battery.png" />
@@ -240,7 +242,7 @@ Run `gotop -h` to see the list of all command line options.
## History
-The original author of gotop started a new tool in Rust, called [ytop](https://github.com/cjbassi/ytop). This repository is a fork of original gotop project with a new maintainer.
+**ca. 2020-01-25** The original author of gotop started a new tool in Rust, called [ytop](https://github.com/cjbassi/ytop), and deprecated his Go version. This repository is a fork of original gotop project with a new maintainer to keep the project alive and growing. An objective of the fork is to maintain a small, focused core while providing a path to extend functionality for less universal use cases; examples of this is sensor support for NVidia graphics cards, and for aggregating data from remote gotop instances.
## Stargazers over time
diff --git a/devices/temp_freebsd.go b/devices/temp_freebsd.go
index 196a6d7..3e659be 100644
--- a/devices/temp_freebsd.go
+++ b/devices/temp_freebsd.go
@@ -3,6 +3,7 @@
package devices
import (
+ "log"
"os/exec"
"strconv"
"strings"
@@ -11,6 +12,10 @@ import (
)
func init() {
+ if len(devs()) == 0 {
+ log.Println("temp: no thermal sensors found")
+ return
+ }
RegisterTemp(update)
RegisterDeviceList(Temperatures, devs, devs)
}
@@ -50,8 +55,19 @@ func update(temps map[string]int) map[string]error {
func devs() []string {
rv := make([]string, 0, len(sensorOIDS))
+ // Check that thermal sensors are really available; they aren't in VMs
+ bs, err := exec.Command("sysctl", "-a").Output()
+ if err != nil {
+ log.Printf("temp: failure to get system information %s", err.Error())
+ return []string{}
+ }
for k, _ := range sensorOIDS {
- rv = append(rv, k)
+ idx := strings.Index(string(bs), k)
+ if idx < 0 {
+ log.Printf("temp: no device %s found", k)
+ } else {
+ rv = append(rv, k)
+ }
}
return rv
}
diff --git a/go.mod b/go.mod
index 07b0ad1..75a8b2c 100644
--- a/go.mod
+++ b/go.mod
@@ -7,14 +7,14 @@ require (
github.com/gizak/termui/v3 v3.1.0
github.com/go-ole/go-ole v1.2.4 // indirect
github.com/mattn/go-runewidth v0.0.4
+ github.com/nsf/termbox-go v0.0.0-20200418040025-38ba6e5628f1
github.com/shibukawa/configdir v0.0.0-20170330084843-e180dbdc8da0
github.com/shirou/gopsutil v2.20.3+incompatible
github.com/stretchr/testify v1.4.0
github.com/xxxserxxx/iSMC v1.0.1
github.com/xxxserxxx/opflag v1.0.5
- golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25 // indirect
+ golang.org/x/sys v0.0.0-20200316230553-a7d97aace0b0
howett.net/plist v0.0.0-20200419221736-3b63eb3a43b5 // indirect
- github.com/nsf/termbox-go v0.0.0-20200418040025-38ba6e5628f1
)
go 1.14
diff --git a/go.sum b/go.sum
index 16e6630..27148da 100644
--- a/go.sum
+++ b/go.sum
@@ -25,7 +25,6 @@ github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 h1:DpOJ2HYzCv8LZP15IdmG+YdwD2luVPHITV96TkirNBM=
github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
-github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d h1:x3S6kxmy49zXVVyhcnrFqxvNVCBPb2KZ9hV2RBdS840=
github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ=
github.com/nsf/termbox-go v0.0.0-20200418040025-38ba6e5628f1 h1:lh3PyZvY+B9nFliSGTn5uFuqQQJGuNrD0MLCokv09ag=
github.com/nsf/termbox-go v0.0.0-20200418040025-38ba6e5628f1/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ=
@@ -49,6 +48,8 @@ github.com/xxxserxxx/iSMC v1.0.1/go.mod h1:TGgNjU7BF2DZSuxiTft+BdzxzcujFJYqFfMCz
github.com/xxxserxxx/opflag v1.0.5 h1:2H4Qtl1qe+dSkEcGt+fBe2mQ8z14MgkWPqcLaoa6k90=
github.com/xxxserxxx/opflag v1.0.5/go.mod h1:GWZtb3/tGGj5W1GE/JTyJAuqgxDxl1+jqDGAGM+P/p4=
golang.org/x/arch v0.0.0-20181203225421-5a4828bb7045/go.mod h1:cYlCBUl1MsqxdiKgmc4uh7TxZfWSFLOGSRR090WDxt8=
+golang.org/x/sys v0.0.0-20200316230553-a7d97aace0b0 h1:4Khi5GeNOkZS5DqSBRn4Sy7BE6GuxwOqARPqfurkdNk=
+golang.org/x/sys v0.0.0-20200316230553-a7d97aace0b0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25 h1:OKbAoGs4fGM5cPLlVQLZGYkFC8OnOfgo6tt0Smf9XhM=
golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
diff --git a/logging/logging_arm64.go b/logging/logging_arm64.go
index 339d108..b88c479 100644
--- a/logging/logging_arm64.go
+++ b/logging/logging_arm64.go
@@ -1,4 +1,4 @@
-// +build linux,arm64
+// +build !freebsd,arm64
package logging
diff --git a/logging/logging_other.go b/logging/logging_other.go
index 792ae1e..e910821 100644
--- a/logging/logging_other.go
+++ b/logging/logging_other.go
@@ -1,5 +1,4 @@
-// +build linux openbsd freebsd darwin
-// +build !linux,arm64
+// +build linux,!arm64 openbsd,!arm64 freebsd darwin,!arm64
package logging