goss-org / goss

Quick and Easy server testing/validation
https://goss.rocks
Apache License 2.0
5.59k stars 471 forks source link

extend process: #283

Open erkules opened 7 years ago

erkules commented 7 years ago

Hi, I would like to get the (E)UID/GID from a process. As I understand the manual I'm just able to check if a process is running.

elliotweiser commented 7 years ago

As a temporary workaround, you can probably use the command module and then check the stdout of this command:

ps -o user,uid,group,command

Unless someone beats me to it, I'll see if I can get to it later this week(end).

erkules commented 7 years ago

Thx!

aelsabbahy commented 7 years ago

@elliotweiser for what it's worth, I think I didn't use https://github.com/shirou/gopsutil when I first wrote goss because it depended on the lsof command to be present, but it seems that has changed since I last looked at it:

https://github.com/shirou/gopsutil/commit/c903f141890869a1a862deae4ad75413c7180107#diff-8156a78b15e6b6beeef36a24fbd61ca0