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、各节点内存使用情况
1 2 3 4 5 6 7
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 数据使用情况
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
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' GROUPBY ps.anchor_table_schema) pj CROSSJOIN (SELECT (SELECT database_size_bytes FROM v_catalog.license_audits ORDERBY audit_start_timestamp DESC LIMIT1) / (SELECTSUM(used_bytes) FROM v_monitor.projection_storage) AS ratio) la ORDERBY pj.used_compressed_gb DESC;