Click the link above to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This notice will disappear after you have made at least 3 posts.
I'm looking for a query that will show me tape drive utilization. i.e. what % of the 24 hour day are the drives spinning. I'm also looking for efficiencies in for tape drives. thx in advance.
select -
sum((end_time-start_time) minutes) as "Minutes", -
decimal(cast(sum((end_time-start_time) minutes) as decimal (6,2)) /1440*100,6,2) as "% of 24 hour", -
drive_name as "Drive" -
from -
summary -
where -
activity='TAPE MOUNT' -
and days(current_timestamp)-days(start_time)=1 -
group by -
drive_name
Minutes % of 24 hour Drive
---------------- ------------ ------------------
454 31.52 LTO1101
(/dev/lto11011)
665 46.18 LTO1102
(/dev/lto11021)
489 33.95 LTO1103
(/dev/lto11031)
432 30.00 LTO1104
(/dev/lto11041)
I preface this by saying I am not the best at SQL select statements, but I pounded this out today...
Code:select - sum((end_time-start_time) minutes) as "Minutes", - decimal(cast(sum((end_time-start_time) minutes) as decimal (6,2)) /1440*100,6,2) as "% of 24 hour", - drive_name as "Drive" - from - summary - where - activity='TAPE MOUNT' - and days(current_timestamp)-days(start_time)=1 - group by - drive_name
results in...
Code:Minutes % of 24 hour Drive ---------------- ------------ ------------------ 454 31.52 LTO1101 (/dev/lto11011) 665 46.18 LTO1102 (/dev/lto11021) 489 33.95 LTO1103 (/dev/lto11031) 432 30.00 LTO1104 (/dev/lto11041)
Does that look right?
Protect: TSM02>select sum((end_time-start_time) minutes) as "Minutes", decimal(cast(sum((end_time-start_time) minutes) as decimal (6,2))/1440*100,6,2) as "% of 30 days", drive_name as "Drive" from summary where activity='TAPE MOUNT' and days(current_timestamp)-days(start_time)<=30 and drive_name like '%TS4500%' group by drive_name
Minutes % of 30 days Drive
------------ ------------- ----------------------------------------------------------------------------------------------------------
933 64.79 L5F2C3R4 (/dev/lin_tape/by-id/TS4500_L5F2C3R4)
749 52.01 L5F2C4R4 (/dev/lin_tape/by-id/TS4500_L5F2C4R4)
666 46.25 L5F3C3R4 (/dev/lin_tape/by-id/TS4500_L5F3C3R4)
695 48.26 L5F3C4R4 (/dev/lin_tape/by-id/TS4500_L5F3C4R4)
3208 222.77 L7F2C1R2 (/dev/lin_tape/by-id/TS4500_L7F2C1R2)
2988 207.50 L7F2C1R3 (/dev/lin_tape/by-id/TS4500_L7F2C1R3)
2747 190.76 L7F2C1R4 (/dev/lin_tape/by-id/TS4500_L7F2C1R4)
3595 249.65 L7F2C2R1 (/dev/lin_tape/by-id/TS4500_L7F2C2R1)
3697 256.73 L7F2C2R2 (/dev/lin_tape/by-id/TS4500_L7F2C2R2)
3570 247.91 L7F2C2R3 (/dev/lin_tape/by-id/TS4500_L7F2C2R3)
3153 218.95 L7F2C2R4 (/dev/lin_tape/by-id/TS4500_L7F2C2R4)
3184 221.11 L7F2C3R1 (/dev/lin_tape/by-id/TS4500_L7F2C3R1)
3868 268.61 L7F2C3R2 (/dev/lin_tape/by-id/TS4500_L7F2C3R2)
3061 212.56 L7F2C3R3 (/dev/lin_tape/by-id/TS4500_L7F2C3R3)
3500 243.05 L7F2C4R1 (/dev/lin_tape/by-id/TS4500_L7F2C4R1)
3728 258.88 L7F2C4R2 (/dev/lin_tape/by-id/TS4500_L7F2C4R2)
3230 224.30 L7F2C4R3 (/dev/lin_tape/by-id/TS4500_L7F2C4R3)
3815 264.93 L7F3C1R2 (/dev/lin_tape/by-id/TS4500_L7F3C1R2)
5593 388.40 L7F3C1R3 (/dev/lin_tape/by-id/TS4500_L7F3C1R3)
3713 257.84 L7F3C1R4 (/dev/lin_tape/by-id/TS4500_L7F3C1R4)
4390 304.86 L7F3C2R1 (/dev/lin_tape/by-id/TS4500_L7F3C2R1)
3781 262.56 L7F3C2R2 (/dev/lin_tape/by-id/TS4500_L7F3C2R2)
3633 252.29 L7F3C2R3 (/dev/lin_tape/by-id/TS4500_L7F3C2R3)
3315 230.20 L7F3C2R4 (/dev/lin_tape/by-id/TS4500_L7F3C2R4)
4255 295.48 L7F3C3R1 (/dev/lin_tape/by-id/TS4500_L7F3C3R1)
3159 219.37 L7F3C3R2 (/dev/lin_tape/by-id/TS4500_L7F3C3R2)
3753 260.62 L7F3C3R3 (/dev/lin_tape/by-id/TS4500_L7F3C3R3)
2727 189.37 L7F3C4R1 (/dev/lin_tape/by-id/TS4500_L7F3C4R1)
4182 290.41 L7F3C4R2 (/dev/lin_tape/by-id/TS4500_L7F3C4R2)
2571 178.54 L7F3C4R3 (/dev/lin_tape/by-id/TS4500_L7F3C4R3)