本文共 1905 字,大约阅读时间需要 6 分钟。
1、版本信息
dbadmin=> SELECT version(); version ------------------------------------ Vertica Analytic Database v7.2.3-7(1 row)
2、license信息
dbadmin=> SELECT DISPLAY_LICENSE(); DISPLAY_LICENSE ------------------------------------------- HPE Vertica2/16/2016Perpetual32 TB(1 row)
3、各节点硬盘使用情况
SELECT /*+label(diag_disk_space_utilization)*/ host_name, ( disk_space_free_mb / 1024 ) AS disk_space_free_gb, ( disk_space_used_mb / 1024 ) AS disk_space_used_gb, ( disk_space_total_mb / 1024 ) AS disk_space_total_gb FROM v_monitor.host_resources;
4、各节点内存使用情况
SELECT /*+label(diag_memory_info)*/ host_name, total_memory_bytes / ( 1024^3 ) AS total_memory_gb, total_memory_free_bytes / ( 1024^3 ) AS total_memory_free_gb, total_swap_memory_bytes / ( 1024^3 ) AS total_swap_memory_gb, total_swap_memory_free_bytes / ( 1024^3 ) AS total_swap_memory_free_gb FROM v_monitor.host_resources;
5、每个scheme 数据使用情况
SELECT /*+label(diag_schema_space_utilization)*/ pj.anchor_table_schema, pj.used_compressed_gb, pj.used_compressed_gb * la.ratio AS raw_estimate_gb FROM (SELECT ps.anchor_table_schema, SUM(used_bytes) / ( 1024^3 ) AS used_compressed_gb FROM v_catalog.projections p JOIN v_monitor.projection_storage ps ON ps.projection_id = p.projection_id WHERE p.is_super_projection = 't' GROUP BY ps.anchor_table_schema) pj CROSS JOIN (SELECT (SELECT database_size_bytes FROM v_catalog.license_audits ORDER BY audit_start_timestamp DESC LIMIT 1) / (SELECT SUM(used_bytes) FROM v_monitor.projection_storage) AS ratio) la ORDER BY pj.used_compressed_gb DESC;
转载地址:http://jtiea.baihongyu.com/