You are not logged in.

#1 2016-09-14 12:29:26

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Auditing systemctl to see which service started a pid [SOLVED]

I found an instance of /usr/bin/sleep running by my root user.  Through some detective work, I found that one of my systemd service units calls a script which therein runs /usr/bin/sleep.  Is there systemctl function I can use to track a pid back to the unit that initiated it?

Last edited by graysky (2016-09-14 15:38:57)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2016-09-14 13:48:10

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,774

Re: Auditing systemctl to see which service started a pid [SOLVED]

Moved, by request


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2016-09-14 15:35:17

pdc
Member
Registered: 2015-05-30
Posts: 33

Re: Auditing systemctl to see which service started a pid [SOLVED]

graysky wrote:

I found an instance of /usr/bin/sleep running by my root user.  Through some detective work, I found that one of my systemd service units calls a script which therein runs /usr/bin/sleep.  Is there systemctl function I can use to track a pid back to the unit that initiated it?

systemctl status <pid>

Offline

#4 2016-09-14 15:38:48

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: Auditing systemctl to see which service started a pid [SOLVED]

@pdc - Worked like a charm, thank you.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB