↑ ↓ select, Enter open, Esc close

Show start time and runtime of a process

Adjust the values, the command updates live
user@server
ps -o pid,user,lstart,etime,cmd -p 1234

lstart prints the exact start time, etime the elapsed time in the format [[days-]hours:]minutes:seconds. This tells whether a PHP or backup process belongs to a current run or has been hanging for days. Multiple PIDs are separated by commas.

Note: ps -eo pid,etimes,cmd --sort=-etimes | head shows all processes sorted by runtime.

Also searched as

  • since when is this process running
  • how long has the process been running
  • process start time linux
  • is the script hanging for long

Related one-liners

All in Processes

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.