linux_processors

package
v0.0.0-...-89257ae Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Empty        = 0x0
	RunLevel     = 0x1
	BootTime     = 0x2
	NewTime      = 0x3
	OldTime      = 0x4
	InitProcess  = 0x5
	LoginProcess = 0x6
	UserProcess  = 0x7
	DeadProcess  = 0x8
	Accounting   = 0x9
)
View Source
const (
	LineSize = 32
	NameSize = 32
	HostSize = 256
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ExitStatus

type ExitStatus struct {
	Termination int16
	Exit        int16
}

type JcConfig

type JcConfig struct {
	Parser string
}

type JcProcessor

type JcProcessor struct {
	BinaryPath string
}

func (*JcProcessor) Configure

func (proc *JcProcessor) Configure() error

func (*JcProcessor) Run

func (proc *JcProcessor) Run(in string, config *processors.Config, out writer.IManager) processors.PError

type SDJournalProcessor

type SDJournalProcessor struct {
}

func (SDJournalProcessor) Configure

func (SDJournalProcessor) Configure() error

func (SDJournalProcessor) Run

type TimeVal

type TimeVal struct {
	Sec  int32
	Usec int32
}

type Utmp

type Utmp struct {
	Type               string
	Pid                int32
	Device             string
	TerminalNameSuffix string
	User               string
	Host               string
	ExitStatus         int16
	TerminationStatus  int16
	Session            int32
	Timestamp          time.Time
	Address            [4]uint32
}

func NewUtmp

func NewUtmp(u UtmpC) *Utmp

type UtmpC

type UtmpC struct {
	Type int16 // ut_type, Type of record

	Pid      int32          // PID of login process
	Device   [LineSize]byte // Device name of tty - "/dev/"
	Id       [4]byte        // Terminal name suffix, or inittab(5) ID
	User     [NameSize]byte // Username
	Host     [HostSize]byte // Hostname for remote login, or kernel version for run-level messages
	Exit     ExitStatus     // Exit status of a process marked as DEAD_PROCESS; not used by Linux init(1)
	Session  int32          // Session ID (getsid(2)), used for windowing
	Time     TimeVal        // Time entry was made
	AddrV6   [16]byte       // Internet address of remote host; IPv4 address uses just ut_addr_v6[0]
	Reserved [20]byte       // Reserved for future use
	// contains filtered or unexported fields
}

type UtmpProcessor

type UtmpProcessor struct {
}

func (UtmpProcessor) Configure

func (UtmpProcessor) Configure() error

func (UtmpProcessor) Run

Jump to

Keyboard shortcuts

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