Merge branch 'master' into v4.0
This commit is contained in:
commit
e8727c7c20
13
CHANGELOG.md
13
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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
4
go.mod
4
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
|
||||
|
|
3
go.sum
3
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=
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build linux,arm64
|
||||
// +build !freebsd,arm64
|
||||
|
||||
package logging
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// +build linux openbsd freebsd darwin
|
||||
// +build !linux,arm64
|
||||
// +build linux,!arm64 openbsd,!arm64 freebsd darwin,!arm64
|
||||
|
||||
package logging
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user