discovery

package
v0.0.0-...-391d3f3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActiveUsers

func ActiveUsers() []*user.User

ActiveUsers returns

func CurrentUser

func CurrentUser() ([]map[string]string, error)

CurrentUser returns the current user

func GetCPUmodel

func GetCPUmodel() (string, error)

GetCPUmodel returns the target system's CPU model

func GetCPUname

func GetCPUname() (string, error)

GetCPUname returns the target system's CPU name

func GetDrives

func GetDrives() ([]disk.PartitionStat, error)

GetDrives iterates through the alphabet to return a list of mounted drives

func GetTCPConnections

func GetTCPConnections() ([]netstat.SockTabEntry, error)

GetTCPConnections returns a slice describing TCP connections

func GetUDPConnections

func GetUDPConnections() ([]netstat.SockTabEntry, error)

GetUDPConnections returns a slice describing UDP connections

func PrintProcDetails

func PrintProcDetails(procs [][]string)

PrintProcDetails provides detailed process information in a list

func PrintProcSummary

func PrintProcSummary(procs [][]string)

PrintProcSummary provides summarized process information in a table

func PrintProcessTree

func PrintProcessTree()

PrintProcessTree displays each process in a tree

func Procs

func Procs() ([][]string, error)

Procs returns a slice of process objects Look at "PrintProcSummary()" and "PrintProcDetails()" for examples on displaying the process info

Types

type OSinfo

type OSinfo struct {
	ProductName      string
	ReleaseID        string
	CurrentBuild     string
	InstallationType string
	RegisteredOwner  string
	InstallDate      uint64
	InstallTime      uint64
	ProductID        string
}

OSinfo provides basic information about the target operating system

func GetOSinfo

func GetOSinfo() (OSinfo, error)

GetOSinfo returns information about the target system OS

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL