Documentation ¶
Index ¶
- func ClearBit(n *uint64, offset uint)
- func ClearBits(n *uint64, mask uint64)
- func ClockTicksToNsSinceBootTime(ticks int64) uint64
- func CopyRegularFileByPath(src, dst string) error
- func CopyRegularFileByRelativePath(srcName string, dstDir *os.File, dstName string) error
- func CreateAt(dir *os.File, relativePath string) (*os.File, error)
- func Dup(file *os.File) (*os.File, error)
- func GenerateRandomDuration(min, max int) time.Duration
- func GetBootTime() time.Time
- func GetBootTimeNS() int64
- func GetStartTimeNS() int64
- func GetSystemHZ() int
- func GetUserHZ() int64
- func HasBit(n uint64, offset uint) bool
- func HashTaskID(arg1 uint32, arg2 uint64) uint32
- func HashU32AndU64(arg1 uint32, arg2 uint64) uint32
- func IsDirEmpty(pathname string) (bool, error)
- func Max(x, y uint64) uint64
- func Min(x, y uint64) uint64
- func MkdirAt(dir *os.File, relativePath string, perm fs.FileMode) error
- func MkdirAtExist(dir *os.File, relativePath string, perm fs.FileMode) error
- func Murmur32(key []byte) uint32
- func NsSinceBootTimeToTime(ns uint64) time.Time
- func OpenAt(dir *os.File, relativePath string, flags int, perm fs.FileMode) (*os.File, error)
- func OpenExistingDir(p string) (*os.File, error)
- func ParseSymbol(address uint64, table *helpers.KernelSymbolTable) helpers.KernelSymbol
- func RemoveAt(dir *os.File, relativePath string, flags int) error
- func RenameAt(olddir *os.File, oldpath string, newdir *os.File, newpath string) error
- func RoundToClosestN(val int, n int) int
- func SetBit(n *uint64, offset uint)
- type Cloner
- type Iterator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClockTicksToNsSinceBootTime ¶ added in v0.18.0
ClockTicksToNsSinceBootTime converts kernel clock ticks to nanoseconds.
func CopyRegularFileByPath ¶ added in v0.8.2
CopyRegularFileByPath copies a file from src to dst
func CopyRegularFileByRelativePath ¶ added in v0.8.2
CopyRegularFileByRelativePath copies a file from src to dst, where destination is relative to a given directory. This function needs needed capabilities to be set before it is called.
func CreateAt ¶ added in v0.8.2
CreateAt implements the same logic as os.Create using directory FD and relative path.
func GenerateRandomDuration ¶ added in v0.18.0
GenerateRandomDuration returns a random duration between min and max, inclusive
func GetBootTime ¶ added in v0.18.0
GetBootTime returns the boot time of the system in time.Time format.
func GetBootTimeNS ¶ added in v0.18.0
func GetBootTimeNS() int64
GetBootTimeNS returns the boot time of the system in nanoseconds.
func GetStartTimeNS ¶ added in v0.18.0
func GetStartTimeNS() int64
GetStartTimeNS returns the system start time in nanoseconds (using CLOCK_MONOTONIC).
func GetSystemHZ ¶ added in v0.18.0
func GetSystemHZ() int
GetSystemHZ returns an approximation of CONFIG_HZ (the kernel timer interrupt).
func GetUserHZ ¶ added in v0.18.0
func GetUserHZ() int64
GetUserHZ returns USER_HZ (the user-space timer interrupt), the system clock tick rate.
func HashTaskID ¶ added in v0.18.0
func HashU32AndU64 ¶ added in v0.18.0
HashU32AndU64 is a wrapper around Murmur32 making sure network byte order is used.
func IsDirEmpty ¶ added in v0.10.0
IsDirEmpty returns true if directory contains no files
func MkdirAt ¶ added in v0.8.2
MkdirAt is a wrapper function to the `mkdirat` syscall using golang types.
func MkdirAtExist ¶ added in v0.8.2
MkdirAtExist is a wrapper function to the `mkdirat` syscall using golang types, ignoring EEXIST error.
func NsSinceBootTimeToTime ¶ added in v0.18.0
NsSinceBootTimeToTime converts nanoseconds timestamp (since boot) to a time.Time object.
func OpenAt ¶ added in v0.8.2
OpenAt is a wrapper function to the `openat` syscall using golang types.
func OpenExistingDir ¶ added in v0.8.2
OpenExistingDir open a directory with given path, and return the os.File of it.
func ParseSymbol ¶
func ParseSymbol(address uint64, table *helpers.KernelSymbolTable) helpers.KernelSymbol
func RemoveAt ¶ added in v0.14.1
RemoveAt is a wrapper function to the `unlinkat` syscall using golang types.
func RenameAt ¶ added in v0.8.2
RenameAt is a wrapper function to the `renameat` syscall using golang types.
func RoundToClosestN ¶ added in v0.18.0
RoundToClosestN rounds a number to the closest multiple of n.