http://qs321.pair.com?node_id=783592


in reply to Linux Process Start Time

$ctime{$PID} = (stat "/proc/$PID/stat")[10];

This gives you the creation time of the process in seconds since the start of the epoch. While there can be concerns about portability across different OSes, you specified linux, and you wouldn't want to use /proc if you wanted to port this anywhere else anyway ...

(Yes, I know, it's technically the time since the file was last changed, but the stat file is special that way.)


The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. — Cyrus H. Gordon