• Please help support our sponsors by considering their products and services.
    Our sponsors enable us to serve you with this high-speed Internet connection and fast webservers you are currently using at ADSM.ORG.
    They support this free flow of information and knowledge exchange service at no cost to you.

    Please welcome our latest sponsor Tectrade . We can show our appreciation by learning more about Tectrade Solutions
  • Community Tip: Please Give Thanks to Those Sharing Their Knowledge.

    If you receive helpful answer on this forum, please show thanks to the poster by clicking "LIKE" link for the answer that you found helpful.

  • Community Tip: Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING)

    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.

Tape drive utilization

influx

Active Newcomer
#1
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.
 

moon-buddy

ADSM.ORG Moderator
#2
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.
 

michaelabel

ADSM.ORG Member
#3
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
 

tsmtodd

ADSM.ORG Member
#4
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?
 

cwilloug

ADSM.ORG Senior Member
#5
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.
 

h8mmer

ADSM.ORG Member
#7
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.
 

unpaired

ADSM.ORG Member
#8
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
 
#9
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)
 

Advertise at ADSM.ORG

If you are reading this, so are your potential customer. Advertise at ADSM.ORG right now.

UpCloud high performance VPS at $5/month

Get started with $25 in credits on Cloud Servers. You must use link below to receive the credit. Use the promo to get upto 5 month of FREE Linux VPS.

The Spectrum Protect TLA (Three-Letter Acronym): ISP or something else?

  • Every product needs a TLA, Let's call it ISP (IBM Spectrum Protect).

    Votes: 18 18.8%
  • Keep using TSM for Spectrum Protect.

    Votes: 58 60.4%
  • Let's be formal and just say Spectrum Protect

    Votes: 12 12.5%
  • Other (please comement)

    Votes: 8 8.3%

Forum statistics

Threads
31,650
Messages
134,879
Members
21,677
Latest member
jmendezcbs
Top