cancel
Showing results for 
Search instead for 
Did you mean: 

Script for drive utilization

cs3472
Level 4

Hi All,

I need a script to check the drive utilization for Netbackup 7.0 in Solaris 10. We do not have NOM to check nor SL console of the SL500 tape library. 

Is there any way to get the drive utilization percentage? 

Please help.

Thanks in advance. 

 

12 REPLIES 12

Nicolai
Moderator
Moderator
Partner    VIP   

SL console won't report drive utilization.

Install Symantec Opscentre - it has pre-built report for drive utilization. In the long term that the best option rather than maintaining a script. You get all the other goodies from OpbsCenter as well and come free of charge when you have Netbackup.

mph999
Level 6
Employee Accredited

Not easily - you could script it I guess - should be enough inforamtion in bptm to do it, though it wouldn't be particularly easy.  OpsCenter is the better way.

cs3472
Level 4

Yes, Ops center is the best tool to get these informations.

But at this point of time we need to get it with help of some script. 

sri_vani
Level 6
Partner

Earlier we used to gather drive utilization details by verifying tpclean -L command.tpclean command will show us the mount time of drives since the last drive clean up..

The procedure we  followed :
During the month starting we used to initiate the cleaning of Tape drive using tpclean -M and again in the month end we pulled the drive utilization using tpclean -L.

 

As our experts said Ops Center is the good option for this kind of reporting..

#edit#

Will_Restore
Level 6

>> But at this point of time we need to get it with help of some script. 

 

You could have installed OpsCenter by now (it's really easy).  Then click

Reports > Disk & Tape Device Activity > Drive Utilization

... done!

 

Jim-90
Level 6

OpsCenter is not as good as people claim on this. 

See https://www-secure.symantec.com/connect/forums/opscenter-tape-drive-throughput-report-accurate

 

 

 

Will_Restore
Level 6

Oracle slconsole any better?  If so then use that.

 

 

 

 

Mark_Solutions
Level 6
Partner Accredited Certified

All the info will be in \NetBackup\db\error\log_1398812400 (so log_unixtime)

It logs all write operations and the throughput values in the format:

successfully wrote backup id servername_1398802560, copy 1, fragment 26, 5000192 Kbytes at 14213.934 Kbytes/sec

It seems to start a new log at 2300hrs each day so you can work out the next log file name to analyse (so tonight it will create one named log_1398898800) but you will still need to get a script that digs into the log deep enough to isolate against each drive - especially as it logs all writes to disk too.

My votes goes to OpsCenter to be honest!

Jim-90
Level 6

This script will give you what is exactly happening on all your tape drives when run.  If you run it at regualr intervals (like every 15 mins for 24x7) you get a more complete picture.   Output can be inputted into a spreadsheet (space delimited). It is a very old script I tested it on NBU 7.6/ RHE it still works.

#!/bin/ksh 
# Jim McDonald, Sydney
# Run this periodically to get as picture of the drive usage, suggest every 15 mins by cron.

# Output is modified from /usr/openv/volmgr/bin/vmoprcmd -h $MEDIA_SERVER -dp ad
#    column 1 = Date
#    column 2 = Time
#    column 3 = Drive Number
#    column 4 = External Media ID
#    column 5 = Media server name (may be abbreviated)
#    column 6 = Is the drive shared [ Yes/No ]

nbu_master=short_hostname_of_master

rpt_dir=/data/stats/tape_drives
log=$rpt_dir/nbu_drive_usage

list_drives(){
media_server_list=$(/usr/openv/netbackup/bin/admincmd/bpstulist | awk ' {print $3 }' | sort -u )
for media_server in $media_server_list  ; do
   /usr/openv/volmgr/bin/vmoprcmd -h $media_server -dp ad 2> /dev/null | \
          grep -v "DRIVE STATUS" | grep -v "Drv DriveName            RecMID"  | \
          awk ' NF > 7  { printf"%s %s %s %s\n",$1,$3,$7,$8 }'
done
}
list_drives | grep -v $nbu_master | sort -u | \
      awk -v now="$(date +%R)" -v today="$(date +%D)" '{ printf"%s %s %s \n", today,now,$0 }' >> $log
# END

SLconsole will not give you much.  Suggest StorageTek Tape Analytics  see https://blogs.oracle.com/eSTEP/entry/announcing_storagetek_tape_analytics_2

It will cost you roughly about the same as a tape drive.

 

 

 

 

jim_dalton
Level 6

Good news is the latest sl500 console gives you this. With luck you can see the image I attached.

Jim

Will_Restore
Level 6

Cool!  175.1% utilization!  laugh

jim_dalton
Level 6

Very very busy, wr.

Not confidence inspiring then!

The longer term figures look more sensible but Ive got drives with zero mounts and 100% utilized. That cant be right but it might be as right as it gets.

Jim