You can find out the Apache webserver uptime by the below commands
===========
httpd fullstatus | grep uptime
--------------------------------------
ps -eo “%U %c %t”|grep httpd |grep -v grep|grep root
===========
Run the below command to see how long the Mysql server is up
===========
mysql> \s
--------------
mysql Ver 14.14 Distrib 5.5.36, for Linux (x86_64) using readline 5.1
Connection id: 1372917
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.5.36-cll MySQL Community Server (GPL)
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /var/lib/mysql/mysql.sock
Uptime: 44 days 14 hours 19 min 25 sec
Threads: 4 Questions: 77643069 Slow queries: 0 Opens: 110654 Flush tables: 1 Open tables: 607 Queries per second avg: 20.150
--------------
===========
And it is easy to get the server uptime details
===========
root@vps [~]# uptime
07:13:56 up 197 days, 15:11, 1 user, load average: 0.00, 0.07, 0.07
===========
===========
httpd fullstatus | grep uptime
--------------------------------------
ps -eo “%U %c %t”|grep httpd |grep -v grep|grep root
===========
Run the below command to see how long the Mysql server is up
===========
mysql> \s
--------------
mysql Ver 14.14 Distrib 5.5.36, for Linux (x86_64) using readline 5.1
Connection id: 1372917
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.5.36-cll MySQL Community Server (GPL)
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /var/lib/mysql/mysql.sock
Uptime: 44 days 14 hours 19 min 25 sec
Threads: 4 Questions: 77643069 Slow queries: 0 Opens: 110654 Flush tables: 1 Open tables: 607 Queries per second avg: 20.150
--------------
===========
And it is easy to get the server uptime details
===========
root@vps [~]# uptime
07:13:56 up 197 days, 15:11, 1 user, load average: 0.00, 0.07, 0.07
===========
Comments
Post a Comment