Find the Uptime of a Linux Service

Simply put, when was the MySQL Service started on [servername]?


ps -eo pid,comm,lstart,etime,time,args

Will list you all the given services that are running.

What is ps?

ps – report a snapshot of the current processes.” – Informative command to describe details about current processes.

  • The “o” adds a Sort Order
  • The “e” flag┬áShows the environment after the command

Then thereafter the `pid,comm,lstart,etime,time,args` adds the Columns to report for.