SHOW STATUS

功能描述

SHOW STATUS 显示系统当前统计状态所有值的数据。 该语句不需要任何特权。它仅需要连接到服务器的能力。

注意事项

N/A

语法格式

  1. SHOW [GLOBAL | SESSION] STATUS
  2. [LIKE 'pattern' | WHERE expr]

示例

  1. openGauss=# show status;
  2. Variable_name | Value
  3. --------------------------------------+-------------------------------
  4. apply_counter | 0
  5. apply_total_dur | 0
  6. avgiotim | 11
  7. bg_commit_counter | 14
  8. bg_resp_avg | 2380520
  9. bg_resp_max | 7032370
  10. bg_resp_min | 160
  11. bg_resp_total | 33327281
  12. bg_rollback_counter | 0
  13. blk_read_time | 0
  14. blks_hit | 475019
  15. blks_read | 1296
  16. blk_write_time | 0
  17. buffers_alloc | 0
  18. buffers_backend | 0
  19. buffers_backend_fsync | 0
  20. buffers_checkpoint | 0
  21. buffers_clean | 0
  22. checkpoints_req | 4
  23. checkpoints_timed | 27
  24. checkpoint_sync_time | 6376
  25. checkpoint_write_time | 5
  26. ckpt_clog_flush_num | 0
  27. ckpt_csnlog_flush_num | 0
  28. ckpt_multixact_flush_num | 0
  29. ckpt_predicate_flush_num | 0
  30. ckpt_redo_point | 0/28DDB58
  31. ckpt_twophase_flush_num | 0
  32. commit_counter | 5
  33. confl_bufferpin | 0
  34. confl_deadlock | 0
  35. conflicts | 0
  36. confl_lock | 0
  37. confl_snapshot | 0
  38. confl_tablespace | 0
  39. curr_dwn | 0
  40. current_xlog_insert_lsn | 0/28DDF28
  41. curr_start_page | 1661
  42. curr_time | 1
  43. datid | 16384
  44. datname | tt
  45. dcl_count | 0
  46. ddl_count | 0
  47. deadlocks | 0
  48. delete_count | 0
  49. dml_count | 8
  50. file_id | 0
  51. file_reset_num | 0
  52. file_trunc_num | 0
  53. global_instance_time_count | 10
  54. high_threshold_pages | 0
  55. high_threshold_writes | 0
  56. insert_count | 0
  57. last_replayed_read_ptr | 0
  58. local_max_ptr | 0
  59. locks_count | 43
  60. login_counter | 3
  61. logout_counter | 2
  62. low_threshold_pages | 17
  63. low_threshold_writes | 2
  64. lstiotim | 10
  65. maxiowtm | 32
  66. maxwritten_clean | 0
  67. miniotim | 3
  68. min_recovery_point | 0
  69. node_name | single_node1
  70. numbackends | 1
  71. os_runtime_count | 19
  72. os_threads_count | 23
  73. p80 | 0
  74. p95 | 0
  75. pgwr_actual_flush_total_num | 7
  76. pgwr_last_flush_num | 7
  77. phyblkrd | 501
  78. phyblkwrt | 7
  79. phyblkwrt | 6
  80. phyrds | 501
  81. phywrts | 6
  82. phywrts | 7
  83. primary_flush_ptr | 42852136
  84. process_pending_counter | 0
  85. process_pending_total_dur | 0
  86. queue_head_page_rec_lsn | 0/28DDB58
  87. queue_rec_lsn | 0/28DDB58
  88. read_data_io_counter | 0
  89. read_data_io_total_dur | 0
  90. read_ptr | 42851160
  91. read_xlog_io_counter | 2
  92. read_xlog_io_total_dur | 471
  93. recovery_done_ptr | 0
  94. redo_done_time | 0
  95. redo_start_ptr | 42851160
  96. redo_start_time | 732333220674305
  97. remain_dirty_page_num | 3
  98. resp_avg | 8090
  99. resp_max | 35491
  100. resp_min | 140
  101. resp_total | 40449
  102. rollback_counter | 0
  103. select_count | 5
  104. single_node1-backend_used_memory | 1
  105. single_node1-cstore_used_memory | 0
  106. single_node1-dynamic_peak_memory | 562
  107. single_node1-dynamic_peak_shrctx | 180
  108. single_node1-dynamic_used_memory | 561
  109. single_node1-dynamic_used_shrctx | 180
  110. single_node1-gpu_dynamic_peak_memory | 0
  111. single_node1-gpu_dynamic_used_memory | 0
  112. single_node1-gpu_max_dynamic_memory | 0
  113. single_node1-max_backend_memory | 348
  114. single_node1-max_cstore_memory | 512
  115. single_node1-max_dynamic_memory | 8142
  116. single_node1-max_process_memory | 12288
  117. single_node1-max_sctpcomm_memory | 0
  118. single_node1-max_shared_memory | 3285
  119. single_node1-other_used_memory | 0
  120. single_node1-pooler_conn_memory | 0
  121. single_node1-pooler_freeconn_memory | 0
  122. single_node1-process_used_memory | 800
  123. single_node1-sctpcomm_peak_memory | 0
  124. single_node1-sctpcomm_used_memory | 0
  125. single_node1-shared_used_memory | 215
  126. single_node1-storage_compress_memory | 0
  127. single_node1-udf_reserved_memory | 0
  128. speed | 0
  129. stats_reset | 2023-03-16 17:34:43.424584+08
  130. stats_reset | 2023-03-16 17:34:25.277803+08
  131. summary_file_iostat_count | 62
  132. temp_bytes | 0
  133. temp_files | 0
  134. total_pages | 17
  135. total_writes | 2
  136. tup_deleted | 61
  137. tup_fetched | 64396
  138. tup_inserted | 9906
  139. tup_returned | 55952
  140. tup_updated | 305
  141. update_count | 0
  142. user_id | 10
  143. user_name | hlv
  144. wait_events_count | 401
  145. worker_info | no redo worker
  146. workload | default_pool
  147. write_data_io_counter | 0
  148. write_data_io_total_dur | 0
  149. writetim | 75
  150. xact_commit | 1235
  151. xact_rollback | 28
  152. (148 rows)
  153. openGauss=# show global status;
  154. Variable_name | Value
  155. --------------------------------------+-------------------------------
  156. apply_counter | 0
  157. apply_total_dur | 0
  158. avgiotim | 10
  159. bg_commit_counter | 168
  160. bg_resp_avg | 53200083
  161. bg_resp_max | 122185319
  162. bg_resp_min | 79
  163. bg_resp_total | 8937613869
  164. bg_rollback_counter | 2
  165. blk_read_time | 0
  166. blks_hit | 504050
  167. blks_read | 1444
  168. blk_write_time | 0
  169. buffers_alloc | 0
  170. buffers_backend | 0
  171. buffers_backend_fsync | 0
  172. buffers_checkpoint | 0
  173. buffers_clean | 0
  174. checkpoints_req | 4
  175. checkpoints_timed | 29
  176. checkpoint_sync_time | 6794
  177. checkpoint_write_time | 5
  178. ckpt_clog_flush_num | 1
  179. ckpt_csnlog_flush_num | 0
  180. ckpt_multixact_flush_num | 1
  181. ckpt_predicate_flush_num | 0
  182. ckpt_redo_point | 0/28DE060
  183. ckpt_twophase_flush_num | 0
  184. commit_counter | 10
  185. confl_bufferpin | 0
  186. confl_deadlock | 0
  187. conflicts | 0
  188. confl_lock | 0
  189. confl_snapshot | 0
  190. confl_tablespace | 0
  191. curr_dwn | 0
  192. current_xlog_insert_lsn | 0/28DE180
  193. curr_start_page | 1684
  194. curr_time | 1
  195. datid | 16384
  196. datname | tt
  197. dcl_count | 0
  198. ddl_count | 0
  199. deadlocks | 0
  200. delete_count | 0
  201. dml_count | 21
  202. file_id | 0
  203. file_reset_num | 0
  204. file_trunc_num | 2
  205. global_instance_time_count | 10
  206. high_threshold_pages | 0
  207. high_threshold_writes | 0
  208. insert_count | 0
  209. last_replayed_read_ptr | 0
  210. local_max_ptr | 0
  211. locks_count | 44
  212. login_counter | 9
  213. logout_counter | 8
  214. low_threshold_pages | 27
  215. low_threshold_writes | 4
  216. lstiotim | 8
  217. maxiowtm | 32
  218. maxwritten_clean | 0
  219. miniotim | 3
  220. min_recovery_point | 0
  221. node_name | single_node1
  222. numbackends | 1
  223. os_runtime_count | 19
  224. os_threads_count | 23
  225. p80 | 0
  226. p95 | 0
  227. pgwr_actual_flush_total_num | 10
  228. pgwr_last_flush_num | 3
  229. phyblkrd | 520
  230. phyblkwrt | 10
  231. phyblkwrt | 8
  232. phyrds | 520
  233. phywrts | 8
  234. phywrts | 9
  235. primary_flush_ptr | 42852736
  236. process_pending_counter | 0
  237. process_pending_total_dur | 0
  238. queue_head_page_rec_lsn | 0/0
  239. queue_rec_lsn | 0/28DE060
  240. read_data_io_counter | 0
  241. read_data_io_total_dur | 0
  242. read_ptr | 42851160
  243. read_xlog_io_counter | 2
  244. read_xlog_io_total_dur | 471
  245. recovery_done_ptr | 0
  246. redo_done_time | 0
  247. redo_start_ptr | 42851160
  248. redo_start_time | 732333220674305
  249. remain_dirty_page_num | 0
  250. resp_avg | 47907
  251. resp_max | 254914
  252. resp_min | 116
  253. resp_total | 479066
  254. rollback_counter | 0
  255. select_count | 15
  256. single_node1-backend_used_memory | 1
  257. single_node1-cstore_used_memory | 0
  258. single_node1-dynamic_peak_memory | 571
  259. single_node1-dynamic_peak_shrctx | 181
  260. single_node1-dynamic_used_memory | 558
  261. single_node1-dynamic_used_shrctx | 181
  262. single_node1-gpu_dynamic_peak_memory | 0
  263. single_node1-gpu_dynamic_used_memory | 0
  264. single_node1-gpu_max_dynamic_memory | 0
  265. single_node1-max_backend_memory | 348
  266. single_node1-max_cstore_memory | 512
  267. single_node1-max_dynamic_memory | 8142
  268. single_node1-max_process_memory | 12288
  269. single_node1-max_sctpcomm_memory | 0
  270. single_node1-max_shared_memory | 3285
  271. single_node1-other_used_memory | 0
  272. single_node1-pooler_conn_memory | 0
  273. single_node1-pooler_freeconn_memory | 0
  274. single_node1-process_used_memory | 806
  275. single_node1-sctpcomm_peak_memory | 0
  276. single_node1-sctpcomm_used_memory | 0
  277. single_node1-shared_used_memory | 220
  278. single_node1-storage_compress_memory | 0
  279. single_node1-udf_reserved_memory | 0
  280. speed | 0
  281. stats_reset | 2023-03-16 17:34:25.277803+08
  282. stats_reset | 2023-03-16 17:34:43.424584+08
  283. summary_file_iostat_count | 65
  284. temp_bytes | 0
  285. temp_files | 0
  286. total_pages | 27
  287. total_writes | 4
  288. tup_deleted | 61
  289. tup_fetched | 68794
  290. tup_inserted | 9906
  291. tup_returned | 59299
  292. tup_updated | 305
  293. update_count | 0
  294. user_id | 10
  295. user_name | hlv
  296. wait_events_count | 401
  297. worker_info | no redo worker
  298. workload | default_pool
  299. write_data_io_counter | 0
  300. write_data_io_total_dur | 0
  301. writetim | 93
  302. xact_commit | 1324
  303. xact_rollback | 30
  304. (148 rows)
  305. openGauss=# show session status;
  306. Variable_name | Value
  307. --------------------------------------+-------------------------------
  308. apply_counter | 0
  309. apply_total_dur | 0
  310. avgiotim | 10
  311. bg_commit_counter | 168
  312. bg_resp_avg | 53200083
  313. bg_resp_max | 122185319
  314. bg_resp_min | 79
  315. bg_resp_total | 8937613869
  316. bg_rollback_counter | 2
  317. blk_read_time | 0
  318. blks_hit | 504050
  319. blks_read | 1444
  320. blk_write_time | 0
  321. buffers_alloc | 0
  322. buffers_backend | 0
  323. buffers_backend_fsync | 0
  324. buffers_checkpoint | 0
  325. buffers_clean | 0
  326. checkpoints_req | 4
  327. checkpoints_timed | 29
  328. checkpoint_sync_time | 6794
  329. checkpoint_write_time | 5
  330. ckpt_clog_flush_num | 1
  331. ckpt_csnlog_flush_num | 0
  332. ckpt_multixact_flush_num | 1
  333. ckpt_predicate_flush_num | 0
  334. ckpt_redo_point | 0/28DE060
  335. ckpt_twophase_flush_num | 0
  336. commit_counter | 10
  337. confl_bufferpin | 0
  338. confl_deadlock | 0
  339. conflicts | 0
  340. confl_lock | 0
  341. confl_snapshot | 0
  342. confl_tablespace | 0
  343. curr_dwn | 0
  344. current_xlog_insert_lsn | 0/28DE180
  345. curr_start_page | 1684
  346. curr_time | 1
  347. datid | 16384
  348. datname | tt
  349. dcl_count | 0
  350. ddl_count | 0
  351. deadlocks | 0
  352. delete_count | 0
  353. dml_count | 21
  354. file_id | 0
  355. file_reset_num | 0
  356. file_trunc_num | 2
  357. global_instance_time_count | 10
  358. high_threshold_pages | 0
  359. high_threshold_writes | 0
  360. insert_count | 0
  361. last_replayed_read_ptr | 0
  362. local_max_ptr | 0
  363. locks_count | 44
  364. login_counter | 9
  365. logout_counter | 8
  366. low_threshold_pages | 27
  367. low_threshold_writes | 4
  368. lstiotim | 8
  369. maxiowtm | 32
  370. maxwritten_clean | 0
  371. miniotim | 3
  372. min_recovery_point | 0
  373. node_name | single_node1
  374. numbackends | 1
  375. os_runtime_count | 19
  376. os_threads_count | 23
  377. p80 | 0
  378. p95 | 0
  379. pgwr_actual_flush_total_num | 10
  380. pgwr_last_flush_num | 3
  381. phyblkrd | 520
  382. phyblkwrt | 10
  383. phyblkwrt | 8
  384. phyrds | 520
  385. phywrts | 8
  386. phywrts | 9
  387. primary_flush_ptr | 42852736
  388. process_pending_counter | 0
  389. process_pending_total_dur | 0
  390. queue_head_page_rec_lsn | 0/0
  391. queue_rec_lsn | 0/28DE060
  392. read_data_io_counter | 0
  393. read_data_io_total_dur | 0
  394. read_ptr | 42851160
  395. read_xlog_io_counter | 2
  396. read_xlog_io_total_dur | 471
  397. recovery_done_ptr | 0
  398. redo_done_time | 0
  399. redo_start_ptr | 42851160
  400. redo_start_time | 732333220674305
  401. remain_dirty_page_num | 0
  402. resp_avg | 47907
  403. resp_max | 254914
  404. resp_min | 116
  405. resp_total | 479066
  406. rollback_counter | 0
  407. select_count | 15
  408. single_node1-backend_used_memory | 1
  409. single_node1-cstore_used_memory | 0
  410. single_node1-dynamic_peak_memory | 571
  411. single_node1-dynamic_peak_shrctx | 181
  412. single_node1-dynamic_used_memory | 558
  413. single_node1-dynamic_used_shrctx | 181
  414. single_node1-gpu_dynamic_peak_memory | 0
  415. single_node1-gpu_dynamic_used_memory | 0
  416. single_node1-gpu_max_dynamic_memory | 0
  417. single_node1-max_backend_memory | 348
  418. single_node1-max_cstore_memory | 512
  419. single_node1-max_dynamic_memory | 8142
  420. single_node1-max_process_memory | 12288
  421. single_node1-max_sctpcomm_memory | 0
  422. single_node1-max_shared_memory | 3285
  423. single_node1-other_used_memory | 0
  424. single_node1-pooler_conn_memory | 0
  425. single_node1-pooler_freeconn_memory | 0
  426. single_node1-process_used_memory | 806
  427. single_node1-sctpcomm_peak_memory | 0
  428. single_node1-sctpcomm_used_memory | 0
  429. single_node1-shared_used_memory | 220
  430. single_node1-storage_compress_memory | 0
  431. single_node1-udf_reserved_memory | 0
  432. speed | 0
  433. stats_reset | 2023-03-16 17:34:25.277803+08
  434. stats_reset | 2023-03-16 17:34:43.424584+08
  435. summary_file_iostat_count | 65
  436. temp_bytes | 0
  437. temp_files | 0
  438. total_pages | 27
  439. total_writes | 4
  440. tup_deleted | 61
  441. tup_fetched | 68794
  442. tup_inserted | 9906
  443. tup_returned | 59299
  444. tup_updated | 305
  445. update_count | 0
  446. user_id | 10
  447. user_name | hlv
  448. wait_events_count | 401
  449. worker_info | no redo worker
  450. workload | default_pool
  451. write_data_io_counter | 0
  452. write_data_io_total_dur | 0
  453. writetim | 93
  454. xact_commit | 1324
  455. xact_rollback | 30
  456. (148 rows)
  457. openGauss=# show status like 'xact%';
  458. Variable_name | Value
  459. ---------------+-------
  460. xact_commit | 1390
  461. xact_rollback | 31
  462. (2 rows)
  463. openGauss=# show status where variable_name = 'ckpt_redo_point';
  464. Variable_name | Value
  465. -----------------+-----------
  466. ckpt_redo_point | 0/28DE2A0
  467. (1 row)