cancel
Showing results for 
Search instead for 
Did you mean: 

Command to search scratch tapes in IBM library

Soumyaa
Level 4

Command to search scratch tapes in IBM library

1 ACCEPTED SOLUTION

Accepted Solutions

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

We still don't know if your OS is Unix/Linux or Windows...

If Unix or Linux,

vmquery -rn 0 -bx |grep Scratch |wc -l

View solution in original post

5 REPLIES 5

Nicolai
Moderator
Moderator
Partner    VIP   

See the available_media script. On unix is located in /usr/openv/netbackup/bin/goodies/available_media

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

If you robot number is 0 and your scratch pool name is Scratch and your OS is Unix,

vmquery -rn 0 -bx |grep Scratch

 

If Windows, use  findstr instead of grep.

Soumyaa
Level 4

Thanks Marianne van den Berg

the command you gave me throws the list of scratch tapes. Is there any other way to have only the count of scratches directly instead of whole scratch list?

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

We still don't know if your OS is Unix/Linux or Windows...

If Unix or Linux,

vmquery -rn 0 -bx |grep Scratch |wc -l

Nicolai
Moderator
Moderator
Partner    VIP   

For UNIX :

vmquery -rn 0 -bx |grep Scratch | wc -l

For Windows:

vmquery -rn 0 -bx | findstr "Scratch" | findstr /C "Scratch"

The finstr /C will return the number of lines that matches "Scratch".

Update: Too late