func CollectProcessInfoWithChildren(pid int32) []Composer {
	var results []Composer
	parent, err := process.NewProcess(pid)
	if err != nil {
		return results
	}
	parentMsg := &ProcessInfo{}
	parentMsg.loggable = true
	parentMsg.populate(parent)
	results = append(results, parentMsg)
	for _, child := range getChildrenRecursively(parent) {
		cm := &ProcessInfo{}
		cm.loggable = true
		cm.populate(child)
		results = append(results, cm)
	}
	return results
}
CollectProcessInfoWithChildren returns a slice of populated
ProcessInfo message.Composer instances for the process with the
specified pid and all children processes for that process.
package message
import (
	"fmt"
	"os"
	"sync"
	"github.com/mongodb/grip/level"
	"github.com/shirou/gopsutil/net"
	"github.com/shirou/gopsutil/process"
)
type ProcessInfo struct {
	Message        string                   `json:"message" bson:"message"`
	Pid            int32                    `json:"pid" bson:"pid"`
	Parent         int32                    `json:"parentPid" bson:"parentPid"`
	Threads        int                      `json:"numThreads" bson:"numThreads"`
	Command        string                   `json:"command" bson:"command"`
	CPU            StatCPUTimes             `json:"cpu" bson:"cpu"`
	IoStat         process.IOCountersStat   `json:"io" bson:"io"`
	NetStat        []net.IOCountersStat     `json:"net" bson:"net"`
	Memory         process.MemoryInfoStat   `json:"mem" bson:"mem"`
	MemoryPlatform process.MemoryInfoExStat `json:"memExtra" bson:"memExtra"`
	Errors         []string                 `json:"errors" bson:"errors"`
	Base           `json:"metadata,omitempty" bson:"metadata,omitempty"`
	loggable       bool
	rendered       string
}
func CollectProcessInfo(pid int32) Composer {
	return NewProcessInfo(level.Trace, pid, "")
}
func CollectProcessInfoSelf() Composer {
	return NewProcessInfo(level.Trace, int32(os.Getpid()), "")
}
func CollectProcessInfoSelfWithChildren() []Composer {
	return CollectProcessInfoWithChildren(int32(os.Getpid()))
}