# Logging processes



## GogoFC (Nov 30, 2021)

Are processes being logged by default or is there a way to do that, actually just a single process not all of them?

I want to find out how long my ssh tunnel was alive for. Is it possible to keep track of it and to see which machine ended it and when.

Or just write a script to periodically check for PID and if non existent record the time. But that still wouldn't tell me if it timed out or if it was ended by initiator, or a reason why.


----------



## SirDice (Nov 30, 2021)

GogoFC said:


> Are processes being logged by default or is there a way to do that, actually just a single process not all of them?


syslog(3), syslogd(8)


GogoFC said:


> I want to find out how long my ssh tunnel was alive for. Is it possible to keep track of it and to see which machine ended it and when.


Look in /var/log/auth.log.


----------

