Tape drive utilization

influx

Active Newcomer
Joined
Jun 5, 2007
Messages
258
Reaction score
0
Points
0
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.
 
None that is built in TSM.

You can write a UNIX ksh script that queries for drive mounts. Something like:

#!/bin/ksh
DATE=`date +%b-%d`
TIME=`date +%H%M`
TIMEA=`date +%H:%M`
STAT=stat.csv
USERID=user
PASSWD=user_password
COMD="dsmadmc -id=$USERID -password=$PASSWD -dataonly=yes -noconfirm"

DRIVE1=`$COMD "q mount" | grep <drive_name1> | grep -v grep | wc -l`
DRIVE2=`$COMD "q mount" | grep <drive_name2> | grep -v grep | wc -l`
DRIVE3=`$COMD "q mount" | grep <drive_name3> | grep -v grep | wc -l`
DRIVE4=`$COMD "q mount" | grep <drive_name4> | grep -v grep | wc -l`

if [ "$TIME" -eq "2355" ]
then
echo "$TIMEA,$DRIVE1,$DRIVE2,$DRIVE3,$DRIVE4" >> $STAT
mv -f $STAT stat$DATE.csv
else
echo "$TIMEA,$DRIVE1,$DRIVE2,$DRIVE3,$DRIVE4" >> $STAT
fi

exit 0

Run this every 5 minutes and the resulting CSV files can be used to create a graph.
 
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.

Hi!

Not being associated with that company I'd like to recommend TSMManager (www.tsmmanager.com) which gives you an excellent analysis of the drive usage even across all your TSM servers (especially helpful in a shared library environment).

Regards,
Michael
 
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?
 
I use the TSM management console, that generates daily reports for me, and one of the reports is tape load summary, session load, and lots more information. TSM is on a AIX box, and I've installed the console on a windows box, 32 bit. I dont think the latest version of the console is supported on 64 bit machines any longer.
 
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?

Cheers for that TSMTODD; almost what I'm looking for...
Does anyone know if you can use a 'like' with a 'group by' within a statement (I'm guessing not but is there a workaround??) so that I can alter Todd's statement to show llibrary utilisation every hour?

Something like;
select -
decimal(cast(sum((end_time-start_time) minutes) as decimal (6,2)) /60*100,6,2) as "% of last hour", -
drive_name as "Drive" -
from -
summary -
where -
activity='TAPE MOUNT' -
and start_time>(current_timestamp - 1 hours) -
and drive_name like 'LIBR1DRIVE%' -
group by -
drive_name

What I ideally want is for all the drives within the library 'LIBR1' to have their hourly mount % averaged so I can plot a line graph which will hopefully show me when utilisation is at its lowest so I can schedule backups with a bit more thought.
 
select sum(A.drvutil)/14 from (select cast (sum((end_time-start_time) minutes) * 100.0 / (7*1440.0) as decimal (6,2)) as drvutil from summary where activity='TAPE MOUNT' and days(current_timestamp)-days(start_time)<=7 group by drive_name) A
 
We need to justify the release of the budget for the purchase of new drives, with that, we need to demonstrate a use of the drives closer to the real one. I used the example posted here to generate usage in the last 30 days, however, it is exceeding 100%. Any ideas on how to more accurately seek the actual use of the drives? thanks.

Code:
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)
 
Back
Top