package sys
import "github.com/containerd/containerd/sys"
Index ¶
- Constants
- Variables
- func AdjustOOMScore(pid, score int) error
- func CreateUnixSocket(path string) (net.Listener, error)
- func FMountat(dirfd uintptr, source, target, fstype string, flags uintptr, data string) error
- func ForceRemoveAll(path string) error
- func GetLocalListener(path string, uid, gid int) (net.Listener, error)
- func GetOOMScoreAdj(pid int) (int, error)
- func GetOpenFds(pid int) (int, error)
- func MkdirAllWithACL(path string, perm os.FileMode) error
- func SetOOMScore(pid, score int) error
- func StatATimeAsTime(st *syscall.Stat_t) time.Time
- func StatAtime(st *syscall.Stat_t) syscall.Timespec
- func StatCtime(st *syscall.Stat_t) syscall.Timespec
- func StatMtime(st *syscall.Stat_t) syscall.Timespec
Constants ¶
const ( // OOMScoreAdjMin is from OOM_SCORE_ADJ_MIN https://github.com/torvalds/linux/blob/v5.10/include/uapi/linux/oom.h#L9 OOMScoreAdjMin = -1000 // OOMScoreAdjMax is from OOM_SCORE_ADJ_MAX https://github.com/torvalds/linux/blob/v5.10/include/uapi/linux/oom.h#L10 OOMScoreAdjMax = 1000 )
Variables ¶
var EpollCreate1 = unix.EpollCreate1
EpollCreate1 is an alias for unix.EpollCreate1 Deprecated: use golang.org/x/sys/unix.EpollCreate1
EpollCtl is an alias for unix.EpollCtl Deprecated: use golang.org/x/sys/unix.EpollCtl
EpollWait is an alias for unix.EpollWait Deprecated: use golang.org/x/sys/unix.EpollWait
var RunningInUserNS = userns.RunningInUserNS
RunningInUserNS detects whether we are currently running in a user namespace. Deprecated: use github.com/containerd/containerd/pkg/userns.RunningInUserNS instead.
Functions ¶
func AdjustOOMScore ¶
AdjustOOMScore sets the oom score for the provided pid. If the provided score is out of range (-1000 - 1000), it is clipped to the min/max value.
func CreateUnixSocket ¶
CreateUnixSocket creates a unix socket and returns the listener
func FMountat ¶
FMountat performs mount from the provided directory.
func ForceRemoveAll ¶
ForceRemoveAll on unix is just a wrapper for os.RemoveAll
func GetLocalListener ¶
GetLocalListener returns a listener out of a unix socket.
func GetOOMScoreAdj ¶
GetOOMScoreAdj gets the oom score for a process. It returns 0 (zero) if either no oom score is set, or a sore is set to 0.
func GetOpenFds ¶
GetOpenFds returns the number of open fds for the process provided by pid
func MkdirAllWithACL ¶
MkdirAllWithACL is a wrapper for os.MkdirAll on Unix systems.
func SetOOMScore ¶
SetOOMScore sets the oom score for the provided pid
func StatATimeAsTime ¶
StatATimeAsTime returns st.Atim as a time.Time
func StatAtime ¶
StatAtime returns the Atim
func StatCtime ¶
StatCtime returns the Ctim
func StatMtime ¶
StatMtime returns the Mtim
Source Files ¶
epoll.go fds.go filesys_unix.go mount_linux.go oom_linux.go socket_unix.go stat_unix.go subprocess_unsafe_linux.go userns_deprecated.go
Directories ¶
Path | Synopsis |
---|---|
sys/reaper |
- Version
- v1.5.4
- Published
- Jul 19, 2021
- Platform
- linux/amd64
- Imports
- 15 packages
- Last checked
- 34 minutes ago –
Tools for package owners.