2026-03-12 20:23:15

This commit is contained in:
root
2026-03-12 21:23:47 +01:00
parent eab4b36eca
commit 93039b8489
3332 changed files with 699614 additions and 0 deletions

38
vdh/pgastat.sql Normal file
View File

@@ -0,0 +1,38 @@
column name format a40
column value_h format 9G999G999G999G999G999D99
break on name skip 1
select
name,
inst_id,
case
when unit = 'bytes' then
case
when value >= 1099511627776 then value/1024/1024/1024/1024
when value >= 1073741824 then value/1024/1024/1024
when value >= 1048576 then value/1024/1024
when value >= 1024 then value/1024
else value
end
else
value
end as value_h,
case
when unit = 'bytes' then
case
when value >= 1099511627776 then 'TB'
when value >= 1073741824 then 'GB'
when value >= 1048576 then 'MB'
when value >= 1024 then 'KB'
else 'B'
end
else
unit
end as unit_h
from
gv$pgastat
order by
name,
inst_id
;