diff --git a/host/host_linux.go b/host/host_linux.go index d7fe992..11c8a4e 100644 --- a/host/host_linux.go +++ b/host/host_linux.go @@ -26,6 +26,9 @@ type LSB struct { Description string } +// from utmp.h +const USER_PROCESS = 7 + func HostInfo() (*HostInfoStat, error) { ret := &HostInfoStat{ OS: runtime.GOOS, @@ -120,6 +123,9 @@ func Users() ([]UserStat, error) { if err != nil { continue } + if u.Type != USER_PROCESS { + continue + } user := UserStat{ User: common.IntToString(u.User[:]), Terminal: common.IntToString(u.Line[:]),