Comm returns the command name of a process.
()
| 163 | |
| 164 | // Comm returns the command name of a process. |
| 165 | func (p Proc) Comm() (string, error) { |
| 166 | data, err := parsers.ReadFileNoStat(p.path("comm")) |
| 167 | if err != nil { |
| 168 | return "", err |
| 169 | } |
| 170 | |
| 171 | return strings.TrimSpace(string(data)), nil |
| 172 | } |
| 173 | |
| 174 | // Executable returns the absolute path of the executable command of a process. |
| 175 | func (p Proc) Executable() (string, error) { |