Method 1:
Using command line
root@linuxforfreshers.com:~$mysqladmin version | grep Uptime
Uptime: 30 sec
Method 2:
root@linuxforfreshers.com:~$mysqladmin status
Uptime: 121 Threads: 1 Questions: 116 Slow queries: 0 Opens: 46 Flush tables: 1 Open tables: 41 Queries per second avg: 0.958
Method 3:
Show MySQL server uptime using a query
root@linuxforfreshers.com:~$ mysql –u username –p password
mysql> SHOW GLOBAL STATUS LIKE 'Uptime';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Uptime | 223 |
+---------------+-------+
(The uptime is given in seconds)
No comments:
Post a Comment