Last active
March 1, 2017 09:12
-
-
Save laszlomiklosik/4b561832a5183c2be15b to your computer and use it in GitHub Desktop.
Linux see how long a process has been running - uptime
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example command for checking how long a Java process was running (etime = elapsed time) | |
ps -eo pid,comm,cmd,start,etime | grep java | |
# It will return something like: | |
# 21443 java /opt/jdk8/bin/java -Djava.u Feb 25 3-12:46:12 | |
# and this means an uptime of 3 Days, 12 Hours, 46 Minutes and 12 Seconds | |
# More alternatives & explanations here: http://linuxcommando.blogspot.ro/2008/09/how-to-get-process-start-date-and-time.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment