Procs started by cron

Problem

Sometimes you want to list all processes that have been initiated by cron.



Solution

To do this you first need to know the Process ID (PID) of the cron process, then to list all children of that process.

Luckily Solaris has ptree and pgrep, so it is simple.



Example



ptree `pgrep cron`

Looks like Linux also has pgrep and pstree:


pstree -p `pgrep cron`



Reference

[tags]Process commands, Unix Coding School[/tags]



Previous Post

Leave a Reply

Your email address will not be published. Required fields are marked *