GBase 8a
运维管理
文章
GBase 8a 查看服务运行时间和启动时间
GBase社区管理员发表于2021-11-29 08:45:1534次浏览0个评论
GBase 8a数据库集群启动后,记录了运行的秒数uptime,根据该时间,可以反推开机时间。
运行时间uptime
单位是秒
gbase> show status like 'uptime';
+---------------+--------+
| Variable_name | Value |
+---------------+--------+
| Uptime | 312886 |
+---------------+--------+
1 row in set (Elapsed: 00:00:00.00)
开机时间
根据当前时间和运行时间,反算开机时间。 获得当前的时间戳(单位秒),减去运行时间,再转换成时间即可。
gbase> select from_unixtime(unix_timestamp(now())-312886);
+---------------------------------------------+
| from_unixtime(unix_timestamp(now())-312886) |
+---------------------------------------------+
| 2021-11-25 17:47:36 |
+---------------------------------------------+
1 row in set (Elapsed: 00:00:00.00)
说明
记录和对比各个节点服务的运行时间,gclusterd和gnode,可以查看是节点服务是否重启。
评论已关闭
热门帖子
- 12025-12-01浏览数:182759
- 22023-05-09浏览数:25044
- 42023-09-25浏览数:18519
- 52020-05-11浏览数:17526