Versions in this module Expand all Collapse all v0 v0.21.0 Jul 3, 2024 v0.20.0 Jul 3, 2024 Changes in this version + const AllPIDs + const COMM_LEN + const DefaultProcessCacheSize + const DefaultThreadCacheSize + const MaxPathLen + type DataSource struct + func NewDataSource(processTree *ProcessTree) *DataSource + func (ptds *DataSource) Get(key interface{}) (map[string]interface{}, error) + func (ptds *DataSource) ID() string + func (ptds *DataSource) Keys() []string + func (ptds *DataSource) Namespace() string + func (ptds *DataSource) Schema() string + func (ptds *DataSource) Version() uint + type ExecFeed struct + CmdPath string + Ctime uint64 + Dev uint32 + Inode uint64 + InodeMode uint16 + Interp string + InterpreterCtime uint64 + InterpreterDev uint32 + InterpreterInode uint64 + InterpreterPath string + InvokedFromKernel int32 + LeaderHash uint32 + ParentHash uint32 + PathName string + StdinPath string + StdinType uint16 + TaskHash uint32 + TimeStamp uint64 + type ExitFeed struct + ExitCode int64 + Group bool + LeaderHash uint32 + ParentHash uint32 + TaskHash uint32 + TimeStamp uint64 + type FileInfo struct + func NewFileInfo(maxLogSize int) *FileInfo + func NewFileInfoFeed(maxLogSize int, feed FileInfoFeed) *FileInfo + func (fi *FileInfo) GetCtime() int + func (fi *FileInfo) GetCtimeAt(targetTime time.Time) int + func (fi *FileInfo) GetDev() int + func (fi *FileInfo) GetDevAt(targetTime time.Time) int + func (fi *FileInfo) GetFeed() FileInfoFeed + func (fi *FileInfo) GetFeedAt(targetTime time.Time) FileInfoFeed + func (fi *FileInfo) GetInode() int + func (fi *FileInfo) GetInodeAt(targetTime time.Time) int + func (fi *FileInfo) GetInodeMode() int + func (fi *FileInfo) GetInodeModeAt(targetTime time.Time) int + func (fi *FileInfo) GetPath() string + func (fi *FileInfo) GetPathAt(targetTime time.Time) string + func (fi *FileInfo) SetCtime(ctime int) + func (fi *FileInfo) SetCtimeAt(ctime int, targetTime time.Time) + func (fi *FileInfo) SetDev(dev int) + func (fi *FileInfo) SetDevAt(dev int, targetTime time.Time) + func (fi *FileInfo) SetFeed(feed FileInfoFeed) + func (fi *FileInfo) SetFeedAt(feed FileInfoFeed, targetTime time.Time) + func (fi *FileInfo) SetInode(inode int) + func (fi *FileInfo) SetInodeAt(inode int, targetTime time.Time) + func (fi *FileInfo) SetInodeMode(inodeMode int) + func (fi *FileInfo) SetInodeModeAt(inodeMode int, targetTime time.Time) + func (fi *FileInfo) SetPath(path string) + func (fi *FileInfo) SetPathAt(path string, targetTime time.Time) + type FileInfoFeed struct + Ctime int + Dev int + Inode int + InodeMode int + Path string + type ForkFeed struct + ChildHash uint32 + ChildNsPid int32 + ChildNsTid int32 + ChildPid int32 + ChildStartTime uint64 + ChildTid int32 + LeaderHash uint32 + LeaderNsPid int32 + LeaderNsTid int32 + LeaderPid int32 + LeaderStartTime uint64 + LeaderTid int32 + ParentHash uint32 + ParentNsPid int32 + ParentNsTid int32 + ParentPid int32 + ParentStartTime uint64 + ParentTid int32 + TimeStamp uint64 + type ProcTreeConfig struct + ProcessCacheSize int + ProcfsInitialization bool + ProcfsQuerying bool + Source SourceType + ThreadCacheSize int + type Process struct + func NewProcess(hash uint32) *Process + func NewProcessWithInfo(hash uint32, info *TaskInfo) *Process + func (p *Process) AddChild(childHash uint32) + func (p *Process) AddThread(threadHash uint32) + func (p *Process) DelChild(childHash uint32) + func (p *Process) DelThread(threadHash uint32) + func (p *Process) GetChildren() []uint32 + func (p *Process) GetExecutable() *FileInfo + func (p *Process) GetHash() uint32 + func (p *Process) GetInfo() *TaskInfo + func (p *Process) GetInterp() *FileInfo + func (p *Process) GetInterpreter() *FileInfo + func (p *Process) GetParentHash() uint32 + func (p *Process) GetThreads() []uint32 + func (p *Process) SetParentHash(parentHash uint32) + type ProcessTree struct + func NewProcessTree(ctx context.Context, config ProcTreeConfig) (*ProcessTree, error) + func (pt *ProcessTree) FeedFromExec(feed ExecFeed) error + func (pt *ProcessTree) FeedFromExit(feed ExitFeed) error + func (pt *ProcessTree) FeedFromFork(feed ForkFeed) error + func (pt *ProcessTree) FeedFromProcFS(givenPid int) error + func (pt *ProcessTree) FeedFromProcFSAsync(givenPid int) + func (pt *ProcessTree) GetOrCreateProcessByHash(hash uint32) *Process + func (pt *ProcessTree) GetOrCreateThreadByHash(hash uint32) *Thread + func (pt *ProcessTree) GetProcessByHash(hash uint32) (*Process, bool) + func (pt *ProcessTree) GetThreadByHash(hash uint32) (*Thread, bool) + func (pt *ProcessTree) String() string + type SourceType int + const SourceBoth + const SourceEvents + const SourceNone + const SourceSignals + func (s SourceType) String() string + type TaskInfo struct + func NewTaskInfo() *TaskInfo + func NewTaskInfoFromFeed(feed TaskInfoFeed) *TaskInfo + func (ti *TaskInfo) GetExitTime() time.Time + func (ti *TaskInfo) GetExitTimeNS() uint64 + func (ti *TaskInfo) GetFeed() TaskInfoFeed + func (ti *TaskInfo) GetFeedAt(targetTime time.Time) TaskInfoFeed + func (ti *TaskInfo) GetGid() int + func (ti *TaskInfo) GetGidAt(targetTime time.Time) int + func (ti *TaskInfo) GetName() string + func (ti *TaskInfo) GetNameAt(targetTime time.Time) string + func (ti *TaskInfo) GetNsPPid() int + func (ti *TaskInfo) GetNsPPidAt(targetTime time.Time) int + func (ti *TaskInfo) GetNsPid() int + func (ti *TaskInfo) GetNsTid() int + func (ti *TaskInfo) GetPPid() int + func (ti *TaskInfo) GetPPidAt(targetTime time.Time) int + func (ti *TaskInfo) GetPid() int + func (ti *TaskInfo) GetStartTime() time.Time + func (ti *TaskInfo) GetStartTimeNS() uint64 + func (ti *TaskInfo) GetTid() int + func (ti *TaskInfo) GetUid() int + func (ti *TaskInfo) GetUidAt(targetTime time.Time) int + func (ti *TaskInfo) IsAlive() bool + func (ti *TaskInfo) IsAliveAt(targetTime time.Time) bool + func (ti *TaskInfo) SetExitTime(exitTime uint64) + func (ti *TaskInfo) SetFeed(feed TaskInfoFeed) + func (ti *TaskInfo) SetFeedAt(feed TaskInfoFeed, targetTime time.Time) + func (ti *TaskInfo) SetGid(gid int) + func (ti *TaskInfo) SetGidAt(gid int, targetTime time.Time) + func (ti *TaskInfo) SetName(name string) + func (ti *TaskInfo) SetNameAt(name string, targetTime time.Time) + func (ti *TaskInfo) SetNsPPid(nsPPid int) + func (ti *TaskInfo) SetNsPPidAt(nsPPid int, targetTime time.Time) + func (ti *TaskInfo) SetNsPid(nsPid int) + func (ti *TaskInfo) SetNsTid(nsTid int) + func (ti *TaskInfo) SetPPid(pPid int) + func (ti *TaskInfo) SetPPidAt(pPid int, targetTime time.Time) + func (ti *TaskInfo) SetPid(pid int) + func (ti *TaskInfo) SetStartTimeNS(startTimeNS uint64) + func (ti *TaskInfo) SetTid(tid int) + func (ti *TaskInfo) SetUid(uid int) + func (ti *TaskInfo) SetUidAt(uid int, targetTime time.Time) + type TaskInfoFeed struct + ExitTimeNS uint64 + Gid int + Name string + NsPPid int + NsPid int + NsTid int + PPid int + Pid int + StartTimeNS uint64 + Tid int + Uid int + type Thread struct + func NewThread(hash uint32) *Thread + func NewThreadWithInfo(hash uint32, info *TaskInfo) *Thread + func (t *Thread) GetHash() uint32 + func (t *Thread) GetInfo() *TaskInfo + func (t *Thread) GetLeaderHash() uint32 + func (t *Thread) GetParentHash() uint32 + func (t *Thread) SetLeaderHash(leaderHash uint32) + func (t *Thread) SetParentHash(parentHash uint32)