-
-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log process exit time #214
Comments
Hey @serkan-ozal, What's the actual use case that you'd want to solve with such a feature? Personally, I've never needed such information from Snoopy, because I was able to tell, from the command itself, for how long it has been running - it's either in the order or seconds, or days/weeks. In the past, for the stuff that I needed the execution time (it was a PHP application), I've built those measurements into the PHP itself. TechnicalitiesFirst of all, Snoopy's current approach to operation is kinda hands-off:
Also, in the child process, up to this point, Snoopy does nothing:
Technically (to some extent, according to my quick googling) what you're asking for may be doable with:
Please describe your use case and let's then discuss further. PS: Have you checked alternative solutions for this, things like Linux' implementation of BSD process accounting, Linux's auditd subsystem or maybe even a BPF? |
Hi @bostjan, The use case is that we want to trace processes with their
In addition to snoopy, we have also considered using process accounting, auditd and BPF. However, as far as we experiment, currently only BPF based https://github.com/iovisor/bcc/blob/master/tools/exitsnoop.py does what we want to be able to get process exit time with its exit code. |
Haha, @serkan-ozal, I had more the "why, to what purpose?" question in mind, no the details of what you'd want to be collected to fulfil said purpose. :) (BTW feel free to not share this information, I understand it might be considered private.) That said, and given how Snoopy currently (and since forever) operates, I don't think this feature is a good fit for Snoopy's current internal architecture. Refactoring from |
Ok, thanks for the info 👍 For now, BPF based solution seems the best way for us to go. |
Hi,
Not sure whether this is possible technically but it would be helpful if somehow snoopy could log process exit times to trace the process execution times.
The text was updated successfully, but these errors were encountered: