straceback

package
v0.0.0-...-37aef56 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

generated by ./scripts/get_syscall_table.sh

Index

Constants

This section is empty.

Variables

View Source
var (
	OffsetNsproxy uint64
	OffsetUtsns   uint64
	OffsetIno     uint64
)

Functions

func Asset

func Asset(name string) ([]byte, error)

Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetDir

func AssetDir(name string) ([]string, error)

AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:

data/
  foo.txt
  img/
    a.png
    b.png

then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.

func AssetInfo

func AssetInfo(name string) (os.FileInfo, error)

AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetNames

func AssetNames() []string

AssetNames returns the names of the assets.

func GetCgroupID

func GetCgroupID(path string) (uint64, error)

func MustAsset

func MustAsset(name string) []byte

MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.

func RestoreAsset

func RestoreAsset(dir, name string) error

RestoreAsset restores an asset under the given directory

func RestoreAssets

func RestoreAssets(dir, name string) error

RestoreAssets restores an asset under the given directory recursively

Types

type Event

type Event struct {
	Timestamp uint64    // Monotonic timestamp
	Typ       int       // Event type: enter=0, exit=1, cont=2
	ContNr    int       // How many continuation messages after
	CPU       int       // CPU index
	Pid       uint64    // Process ID, who triggered the event
	ID        int       // Syscall NR
	Comm      string    // The process command (as in /proc/$pid/comm)
	Args      [6]uint64 // Syscall args
	Ret       uint64    // Return value
	Caps      uint64    // Capability bitfield
	Param     string    // One string parameter
	ParamIdx  int       // Parameter index
}

func (Event) String

func (e Event) String() string

type Param

type Param struct {
	Position int
	Name     string
}

type StraceBack

type StraceBack struct {
	// contains filtered or unexported fields
}

func NewTracer

func NewTracer(withPodDiscovery bool, withProcInformer bool, withAnnotationPublisher bool) (*StraceBack, error)

func (*StraceBack) AddProg

func (sb *StraceBack) AddProg(cgroupPath string, description string) (uint32, error)

func (*StraceBack) CloseProg

func (sb *StraceBack) CloseProg(id uint32) (err error)

func (*StraceBack) CloseProgByName

func (sb *StraceBack) CloseProgByName(name string) (err error)

func (*StraceBack) DumpAll

func (sb *StraceBack) DumpAll() (out string, err error)

func (*StraceBack) DumpPod

func (sb *StraceBack) DumpPod(namespace, podname string, containerIndex int) (out string, err error)

func (*StraceBack) DumpProg

func (sb *StraceBack) DumpProg(id uint32) (out string, err error)

func (*StraceBack) DumpProgByCgroup

func (sb *StraceBack) DumpProgByCgroup(cgroupPath string) (out string, err error)

func (*StraceBack) DumpProgByName

func (sb *StraceBack) DumpProgByName(name string) (out string, err error)

func (*StraceBack) DumpProgByTraceid

func (sb *StraceBack) DumpProgByTraceid(traceid string) (out string, err error)

func (*StraceBack) DumpProgWithQueue

func (sb *StraceBack) DumpProgWithQueue(id uint32) (err error)

func (*StraceBack) GetCgroupPath

func (sb *StraceBack) GetCgroupPath(id uint32) (out string, err error)

func (*StraceBack) List

func (sb *StraceBack) List() (out string)

func (*StraceBack) Stop

func (sb *StraceBack) Stop()

type Syscall

type Syscall struct {
	Name   string
	Params []Param
}

type Tracelet

type Tracelet struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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