By retrieving the uptime value, we can know the running status and running time of the server.
For ApsaraDB RDS for MySQL and PolarDB for MySQL, we can query the show status statement to obtain the uptime:
SHOW GLOBAL STATUS LIKE 'Uptime';
Obtain uptime of PostgreSQL:
SELECT date_trunc('second', current_timestamp - pg_postmaster_start_time()) as uptime;
Obtain uptime of ApsaraDB for Redis:
redis-cli INFO | grep uptime_in_seconds
Snapshots of obtaining uptime of ApsaraDB RDS for MySQL and PolarDB for MySQL:
Obtain uptime again after ApsaraDB RDS for MySQL and PolarDB for MySQL configure manual primary/secondary switchover:
Snapshot of the uptime value of ApsaraDB RDS for MySQL after the primary/secondary switchover:
Snapshot of the uptime value of PolarDB for MySQL after the primary/secondary switchover:
Obtain uptime again after ApsaraDB RDS for MySQL or PolarDB for MySQL is manually restarted.
Snapshot of the uptime value of ApsaraDB RDS for MySQL after the instance is restarted:
Snapshot of the uptime value of PolarDB for MySQL after the instance is restarted:
Snapshot of obtaining uptime of PostgreSQL:
Snapshot of manual primary/secondary switchover:
Snapshot of obtaining uptime after primary/secondary switchover:
Snapshot of manually restarting an instance:
Obtain uptime again after restarting the instance:
Log on to the ApsaraDB for Redis console from DMS and run the info command to view the snapshot:
Snapshot of obtaining uptime after primary/secondary switchover:
Snapshot of restarting an instance:
Snapshot of obtaining uptime again after the restart:
When ApsaraDB RDS for MySQL, PolarDB for MySQL, and ApsaraDB RDS for PostgreSQL configure primary/secondary switchover, the uptime value continues to increase. The value does not pause or return to zero. If ApsaraDB RDS for MySQL, PolarDB for MySQL, and ApsaraDB RDS for PostgreSQL are restarted, the uptime value is reset to zero and starts again. The uptime value will not be affected and continue to increase if you switch or restart the high-availability version of ApsaraDB for Redis.
In Alibaba Cloud databases, the uptime of ApsaraDB RDS for MySQL and PolarDB for MySQL indicates the overall service duration of an instance, rather than the service duration of a single node. For ApsaraDB for Redis, uptime seems to be a meaningless metric.
Full Compatibility with MySQL! How to Build a RAG System Based on PolarDB
Alibaba Clouder - December 28, 2017
Alibaba Cloud Community - March 4, 2022
Alibaba Developer - August 27, 2018
Alibaba Clouder - January 4, 2019
Data Geek - May 15, 2024
Alibaba Cloud Native - March 1, 2024
An on-demand database hosting service for MySQL with automated monitoring, backup and disaster recovery capabilities
Learn MoreApsaraDB RDS for MariaDB supports multiple storage engines, including MySQL InnoDB to meet different user requirements.
Learn MoreApsaraDB Dedicated Cluster provided by Alibaba Cloud is a dedicated service for managing databases on the cloud.
Learn MoreAn on-demand database hosting service for PostgreSQL with automated monitoring, backup and disaster recovery capabilities
Learn MoreMore Posts by ApsaraDB