http://www.perlmonks.org?node_id=572892


in reply to Detecting idle time on Mac

man getloadavg
may help
Boris