go-what
A Golang conversion of mit-pdos/what
What?
go-what is an improved version of the w tool. It finds all processes
associated with a TTY (not just those registered in wtmp), and reports
all users that are running anything. In particular, unlike w, go-what
will also show things running in detached screens/tmuxen.
Build
Working on Linux (and systems that provide a Linux-compatible procfs,
same as the original Python implementation):
env GOTOOLCHAIN="$(grep '^go .*$' go.mod | tr -cd 'go0-9.\n')+auto" \
GOFLAGS="-ldflags=-s -w" CGO_ENABLED=0 go build -v -trimpath