How do I find the uptime of a given linux process.
ps aux | grep gedit | grep -v grep
gives me a whole lot of information which includes the time at which the process was started.
I am specifically looking for switch which returns the uptime of a process in milliseconds.
Thanks
Best Answer
As "uptime" has several meanings, here is a useful command.
This command lists all processes with several different time-related columns. It has the following columns:
PID
= Process IDfirst
COMMAND
= only the command name without options and without argumentsSTARTED
= the absolute time the process was startedELAPSED
= elapsed time since the process was started (wall clock time), format [[dd-]hh:]mm:ssTIME
= cumulative CPU time, "[dd-]hh:mm:ss" formatsecond
COMMAND
= again the command, this time with all its provided options and arguments