09-10-2015 05:56 AM
I checked the below Post but script is not in place.
https://www-secure.symantec.com/connect/forums/report-cleaning-tapes
Martin mentioned:
Script it ...
nbemmcmd -listmedia -mediaid shows a field "Cleanings remaining" ....
Loop through each cleaning tape, pull out the single line containing 'Cleaings'.
vmquery I suspect (don't have a system to hand to check) .... has a cleaning remaining field, and has the option to give a single line output for each tape. This is even easier, as yo can id each line that is a ceaning tape by using the density type, and then just print the two fields that refer to the media id and the cleanings remaining
Need to know how....can you please give me exact command which will shows Cleaning Count.We have 4 libraries.
Looking for help...
Solved! Go to Solution.
09-10-2015 09:39 AM
Line 2 & 3 should be one line like this, remember the | (pipe) sign between "$8}' and mailx
/usr/openv/volmgr/bin/vvmquery -b -rn 0 |awk '{print "tape:"$1, "robot:"$4, "cleanings_Remaining:"$8}' | mailx -s "Cleaning Tapes - uses left" somewhere@.com
The mail address somewhere@.com must be changed to your own email address.
09-10-2015 10:05 AM
Hello Nicolai ,
I tried the above script and ran it.It worked.But its showing all Cleaning Media + All Media which needs Cleaning...I only want output of the command which You and Andy gave me
vmquery -b -p 0 | grep CL |awk '{print "tape:"$1, "robot:"$4, "cleanings_Remaining:"$8}'
Donot know....If i ran above command it show me below output:
tape:CLN001 robot:1 cleanings_Remaining:0
tape:CLN002 robot:1 cleanings_Remaining:23
tape:CLN003 robot:1 cleanings_Remaining:23
tape:CLN004 robot:0 cleanings_Remaining:44
tape:CLN005 robot:0 cleanings_Remaining:45
tape:CLN006 robot:0 cleanings_Remaining:44
tape:CLN007 robot:0 cleanings_Remaining:44
tape:CLNU08 robot:2 cleanings_Remaining:38
tape:CLNU09 robot:2 cleanings_Remaining:39
But when i add the same in script it shows me All Medias and Cleaning Medias whose cleaning is left.
***************************************************
Script Tested:
#!/bin/ksh
/usr/openv/volmgr/bin/vmquery -b -rn 0 |awk '{print "tape:"$1, "robot:"$4, "cleanings_Remaining:"$8}' | mailx -s "Cleaning Tapes - uses left" somewhere@.com
*******************************************************************
I insist i only need output of below command:
vmquery -b -p 0 | grep CL |awk '{print "tape:"$1, "robot:"$4, "cleanings_Remaining:"$8}'
Please help me
09-10-2015 10:17 AM
Thank You Andy,Marianne,StefanosM,Nicolai for helping.
Its working...