I need a script.

fcvasco

ADSM.ORG Member
Joined
Mar 19, 2003
Messages
12
Reaction score
0
Points
0
Website
Visit site
Hi!!



I need a script like this:



if ( (select count(*) from libvolumes where status='Scratch') < 10) then

echo "Insert scratch tapes in the library"

fi



Can anybody help me?



Thanks in advance.
 
Hi,



I would rather do it through query than select, here's my piece which works good enough for me.



if [ `/usr/bin/dsmadmc -id=<your ID> -password=<your password> q libvol | grep -ci scratch` -gt 10 ]

then

echo "I am happy with what I have"

else

echo "I need more! I need more!"

fi



Hope it helps.

Regards.. .
 
Hi Mohit!



Thank you. The script help me a lot. Please, send me or post here, more scripts about TSM administration, if you have them.



Thanks.
 
Back
Top