diff --git a/host/host.go b/host/host.go index 7c53e20..3558626 100644 --- a/host/host.go +++ b/host/host.go @@ -36,6 +36,8 @@ type UserStat struct { Terminal string `json:"terminal"` Host string `json:"host"` Started int `json:"started"` + Type int `json:"type"` + Pid int `json:"pid"` } type TemperatureStat struct { diff --git a/host/host_darwin.go b/host/host_darwin.go index 2f20fc6..f3e6acf 100644 --- a/host/host_darwin.go +++ b/host/host_darwin.go @@ -84,6 +84,8 @@ func UsersWithContext(ctx context.Context) ([]UserStat, error) { Terminal: common.IntToString(u.Line[:]), Host: common.IntToString(u.Host[:]), Started: int(u.Tv.Sec), + Type: int(u.Type), + Pid: int(u.Pid), } ret = append(ret, user) } diff --git a/host/host_freebsd.go b/host/host_freebsd.go index 2c9aa9d..a4482a6 100644 --- a/host/host_freebsd.go +++ b/host/host_freebsd.go @@ -76,6 +76,8 @@ func UsersWithContext(ctx context.Context) ([]UserStat, error) { Terminal: common.IntToString(u.Line[:]), Host: common.IntToString(u.Host[:]), Started: int(sec), + Type: int(u.Type), + Pid: int(u.Pid), } ret = append(ret, user) diff --git a/host/host_linux.go b/host/host_linux.go index 162f312..77cd10f 100644 --- a/host/host_linux.go +++ b/host/host_linux.go @@ -116,6 +116,8 @@ func UsersWithContext(ctx context.Context) ([]UserStat, error) { Terminal: common.IntToString(u.Line[:]), Host: common.IntToString(u.Host[:]), Started: int(u.Tv.Sec), + Type: int(u.Type), + Pid: int(u.Pid), } ret = append(ret, user) } diff --git a/host/host_openbsd.go b/host/host_openbsd.go index 569de4a..6fedb9c 100644 --- a/host/host_openbsd.go +++ b/host/host_openbsd.go @@ -87,6 +87,8 @@ func UsersWithContext(ctx context.Context) ([]UserStat, error) { Terminal: common.IntToString(u.Line[:]), Host: common.IntToString(u.Host[:]), Started: int(u.Time), + Type: int(u.Type), + Pid: int(u.Pid), } ret = append(ret, user)