cancel
Showing results for 
Search instead for 
Did you mean: 

How to know scratch count in library currently

Bharani_B
Level 3

Hello Experts,

Is there any way we can know the scratch count currently only in library. I dont want the count that is in offsite (or not in library). 

is it possible from Opscenter free tool (Not analytics).

Thanks,

Suresh.

2 REPLIES 2

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified

Here is the query

 

select count (*) from nom_nbmedia
where nom_nbmedia.volumepoolname ='Scratch'
and nom_nbmedia.robotname not in ('NONE')

 

Maybe you can run this directly from the cli by making your own script. I've not tried as my opscenter is licensed for analytics.

 

#!/bin/bash

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:\opt/SYMCOpsCenterServer/db/lib

machinename=`hostname`

DBACCESSSERVER="OPSCENTER_$machinename"

INSTALLATIONDIR=/opt/SYMCOpsCenterServer

EXECDBACCESS=$INSTALLATIONDIR/db/bin

DBACCESSPORT=13786

DBACCESSUSER=DBA

DBACCESSPWD=SQL

DBACCESSNAME=vxpmdb

QUERYFILENAME=/opscenter/scripts/query/scratch_tapes.sql

$EXECDBACCESS/dbisqlc -q -c "ENG=$DBACCESSSERVER;DBN=$DBACCESSNAME;LINKS=all;UID=$DBACCESSUSER;PWD=$DBACCESSPWD" $QUERYFILENAME

areznik
Level 5

Check this article for how to connect to the OpsCenter DB remotely: https://support.symantec.com/en_US/article.TECH141827.html

Then you can run Riaan's query above if you want to know the overall scratch right now or take a look at this post if you want to chart scratch trends by library and date.