There is a nice lib for Perl for working with processes in Linux. And it could be used to get PIDs of processes that have been working more than some amount of time. #!/usr/bin/perl -w use strict; use Proc::ProcessTable; my $period = time-(2*60*60); # in this case it’s two hours my $t = new Proc::ProcessTable;…