In today’s article, we will learn how long the Database software and Server have been running with the help of the uptime command.
We can find out how long the database software has been running with the following command.
1 2 3 4 5 6 7 8 9 10 |
SQL> SELECT INST_ID, TO_CHAR(STARTUP_TIME,'DD-MON-YYYY HH24:MI:SS') AS "DB Startup Time" FROM GV$INSTANCE; DB Startup Time ----------------------------- INST_ID DB Startup Time ---------- -------------------- 3 06-JUL-2017 13:08:09 2 06-JUL-2017 13:10:02 1 06-JUL-2017 13:12:01 |
If we want to check how long the server has been running.
1 2 |
# uptime 15:06:12 up 40 days, 4:34, 6 users, load average: 6.16, 7.29, 7.49 |
Or
1 |
top -c -M |