func Others() ([]*os.Process, error) {
	files, err := ioutil.ReadDir("/proc")
	if err != nil {
		return nil, err
	}
	ps := make([]*os.Process, 0)
	for _, file := range files {
		if !file.IsDir() {
			continue
		}
		pid, err := strconv.Atoi(file.Name())
		if err != nil {
			continue
		}
		if pid == os.Getpid() {
			continue
		}
		proccess, err := os.FindProcess(pid)
		if err != nil {
			return nil, err
		}
		ps = append(ps, proccess)
	}
	if len(ps) == 0 {
		return nil, fmt.Errorf("unable to find any process")
	}
	return ps, nil
}
Others return a list of all other processes running on the system, excluding
the current one.
package proc
import (
	"fmt"
	"io/ioutil"
	"os"
	"strconv"
	"strings"
	"syscall"
)
var (
	WarningSignal = syscall.SIGUSR1
	CriticalSignal = syscall.SIGUSR2
)
func CmdLine(proc *os.Process) (string, error) {
	cmdFile := fmt.Sprintf("/proc/%d/cmdline", proc.Pid)
	cmdAsB, err := ioutil.ReadFile(cmdFile)
	if err != nil {
		return "", err
	}
	cmdAsStr := strings.TrimSuffix(string(cmdAsB), "\n")
	return cmdAsStr, nil
}