select
lu.log_utilization_percent as "used %",
integer(bigint(lu.total_log_used_kb) / 1024) as "used (Mb)",
integer(lu.total_log_used_top_kb / 1024) as "HWM (Mb)",
integer(sdb.total_log_available / 1024 / 1024) as "Available (Mb)",
integer(sdb.log_held_by_dirty_pages /1024 /1024) as "dirty pages (Mb)",
smallint(sdb.sec_logs_allocated) as "Secondary logs",
integer(sdl.first_active_log) as "First Active Log",
integer(sdl.current_active_log) as "Current Active Log",
integer(sdl.last_active_log) as "Last Active Log",
integer(sdb.appl_id_oldest_xact) as "Oldest Transaction"
from
sysibmadm.log_utilization lu
inner join
sysibmadm.snapdb sdb
on lu.db_name = sdb.db_name
and
lu.dbpartitionnum = sdb.dbpartitionnum
inner join
sysibmadm.snapdetaillog sdl
on lu.db_name = sdl.db_name
and lu.dbpartitionnum = sdl.dbpartitionnum
select lu.log_utilization_percent as "used %", integer(bigint(lu.total_log_used_kb) / 1024) as "used (Mb)", integer(lu.total_log_used_top_kb / 1024) as "HWM (Mb)", integer(sdb.total_log_available / 1024 / 1024) as "Available (Mb)", integer(sdb.log_held_by_dirty_pages /1024 /1024) as "dirty pages (Mb)", smallint(sdb.sec_logs_allocated) as "Secondary logs", integer(sdl.first_active_log) as "First Active Log", integer(sdl.current_active_log) as "Current Active Log", integer(sdl.last_active_log) as "Last Active Log", integer(sdb.appl_id_oldest_xact) as "Oldest Transaction" from sysibmadm.log_utilization lu inner join sysibmadm.snapdb sdb on lu.db_name = sdb.db_name and lu.dbpartitionnum = sdb.dbpartitionnum inner join sysibmadm.snapdetaillog sdl on lu.db_name = sdl.db_name and lu.dbpartitionnum = sdl.dbpartitionnum
http://it.toolbox.com/blogs/db2luw/script-to-monitor-log-space-utilization-5956