Package util

import "github.com/chaos-mesh/chaos-mesh/pkg/chaosdaemon/util"

Overview ▾

func EncodeOutputToError

func EncodeOutputToError(output []byte, err error) error

func GetChildProcesses

func GetChildProcesses(ppid uint32, logger logr.Logger) ([]uint32, error)

GetChildProcesses will return all child processes's pid. Include all generations. Only return error when `/proc` cannot be read.

func ReadCommName

func ReadCommName(pid int) (string, error)

ReadCommName returns the command name of process