The problem is that to get the detail you want you need to dump the bpdbjobs file and then either grep it or use vbs to analyse it and then pipe out the results.
That could take a considerable amount of time which would actually make your results when they finally get to the dashboard rather behind time. How quickly are you looking for this to update?
Nagalla suggested the nbrbutil command and i would like to expand on that to make it much easier...
nbrbutil -listActiveDriveJobs HP.ULTRIUM4-SCSI.00
(is that really your drive name? I expected HP.ULTRIUM4-SCSI.000)
will pipe out a quick nice report on what your tape drive is doing including the job id, whether backup or restore and the tape pool in use.
It should be quick to grab your other details (client etc) from the job id
And just repeat the command against each drive you have.
There should be very little processing time involved with this to keep your dashboard up to date.
Hope this helps
Why not just look in the details in the details tab for the running job in activity monitor - much easier ...
I donlt know of any command that gives the exact output you require, unless one of the reports in OpsCenter can do it, or a customer report created in OpsCenter.
Well you don't know the drivename, so run:
nbrbutil -dump | grep "jobid=111"
In the example above I have used 111 as the jobid. You then need to find the drive name yourself. If you use the same drive names, for example DRV00001, DRV00002 etc then you can run:
nbrbutil -dump | grep "jobid=111" | grep DRV
this will show ONLY lines where both jobid=111 and DRV are on the same line.
I'm writing a script and expecting drive name and client name for current running backup in output without giving any explicit input while running command. In above every time i have to give jobid explicitly. Pease give some command to achive my goal without giving any explicit input.
I have created a customise dashborad which is showing all client backup details
Where are you getting these details from?
Allocated resources (incl drive name and media id) are listed in Details tab of Activity Monitor.
You can use bpdbjobs -most_columns or -all_columns to locate the fields that you need. Then use grep and awk to parse the output.
Please show us all tex in details tab for one of your jobs, and then bpdbjobs -allcolumns output for the same job.
You should be able to see output such as the following in Job Details:
- granted resource master-name.NBU_CLIENT.MAXJOBS.client-name
- granted resource master-name.NBU_POLICY.MAXJOBS.policy-name
- granted resource media-id
- granted resource Drive-name
- granted resource STU-name
Below is output of one job..can you please help me to grep only drive name from below output which i have marked in bold.
79906,0,3,0,blrpwpehlsql02-dbtranslogs,Full,blrpwpehlsql02,blrppnetbkp01,1393246 061,0000000209,1393246270,blrppnetbkp01-hcart-robot-tld-1,1,,730326,290,,100,905 9,root,1,13,0,0,root,blrppnetbkp01,3,2,0,,,1,D:\\LogShipping_eHelplineV40SP1,1,9 059,blrppnetbkp01-hcart-robot-tld-1,blrppnetbkp01,1393246076,0000000194,13932462 70,0,the requested operation was successfully completed,51,02/24/14 12:47:41 - r equesting resource blrppnetbkp01-hcart-robot-tld-1,02/24/14 12:47:41 - requestin g resource blrppnetbkp01.NBU_CLIENT.MAXJOBS.blrpwpehlsql02,02/24/14 12:47:41 - r equesting resource blrppnetbkp01.NBU_POLICY.MAXJOBS.blrpwpehlsql02-dbtranslogs,0 2/24/14 12:47:41 - waiting for resources - No drives are available,02/24/14 12:4 7:55 RB - waiting for Stop Drive Scan,02/24/14 12:47:56 - granted resource blrpp netbkp01.NBU_CLIENT.MAXJOBS.blrpwpehlsql02,02/24/14 12:47:56 - granted resource blrppnetbkp01.NBU_POLICY.MAXJOBS.blrpwpehlsql02-dbtranslogs,02/24/14 12:47:56 - granted resource ADV264,02/24/14 12:47:56 - granted resource HP.ULTRIUM4-SCSI.00 1,02/24/14 12:47:56 - granted resource blrppnetbkp01-hcart-robot-tld-1,02/24/14 12:47:56 - estimated 870775 kbytes needed,02/24/14 12:47:57 - started process bp brm (9059),02/24/14 12:47:58 - connecting,02/24/14 12:47:59 - connected; connect time: 000:00:01,02/24/14 12:48:02 - mounting ADV264,02/24/14 12:47:56 - started ,Status: the requested operation was successfully completed (0),02/24/14 12:48:1 3 - number of files written 1,02/24/14 12:48:13 - writing path /D/LogShipping_eH elplineV40SP1/,02/24/14 12:49:24 - mounted; mount time: 000:01:22,02/24/14 12:49 :24 - positioning ADV264 to file 30,02/24/14 12:50:36 - positioned; position tim e: 000:01:12,02/24/14 12:50:36 - begin writing,02/24/14 12:50:36 - number of fil es written 1,02/24/14 12:50:36 - writing path /D/LogShipping_eHelplineV40SP1/eHe lplineV40SP1_20140221123025.trn,02/24/14 12:50:36 - 40000 KB written - 60975.609 KB/sec,02/24/14 12:50:37 - 40000 KB written - 60286.359 KB/sec,02/24/14 12:50:3 8 - 40000 KB written - 59642.148 KB/sec,02/24/14 12:50:38 - 40000 KB written - 5 8997.051 KB/sec,02/24/14 12:50:39 - 40000 KB written - 58875.477 KB/sec,02/24/14 12:50:40 - 40000 KB written - 58351.566 KB/sec,02/24/14 12:50:41 - 40000 KB wri tten - 58212.059 KB/sec,02/24/14 12:50:41 - 40000 KB written - 58436.816 KB/sec, 02/24/14 12:50:41 - number of files written 123,02/24/14 12:50:41 - writing path /D/LogShipping_eHelplineV40SP1/eHelplineV40SP1_20140222191525.trn,02/24/14 12:5 0:42 - 40000 KB written - 58479.531 KB/sec,02/24/14 12:50:43 - 40000 KB written - 58754.406 KB/sec,02/24/14 12:50:43 - 40000 KB written - 58651.027 KB/sec,02/24 /14 12:50:44 - 40000 KB written - 58701.234 KB/sec,02/24/14 12:50:45 - 40000 KB written - 58730.516 KB/sec,02/24/14 12:50:45 - 40000 KB written - 58589.664 KB/s ec,02/24/14 12:50:46 - 40000 KB written - 58388.477 KB/sec,02/24/14 12:50:46 - n umber of files written 125,02/24/14 12:50:46 - writing path /D/LogShipping_eHelp lineV40SP1/eHelplineV40SP1_20140224023025.trn,02/24/14 12:50:47 - 40000 KB writt en - 58378.180 KB/sec,02/24/14 12:50:47 - 40000 KB written - 58379.121 KB/sec,02 /24/14 12:50:48 - 40000 KB written - 58612.828 KB/sec,02/24/14 12:50:53 - 10326 KB written - 41790.227 KB/sec,02/24/14 12:50:53 - number of files written 40,02/ 24/14 12:50:53 - writing path /D/LogShipping_eHelplineV40SP1/eHelplineV40SP1_201 40224123001.tuf,02/24/14 12:51:07 - end writing; write time: 000:00:31,730326,29 0,79906,41790,,,,,,,,,,ADV264,0,,,1,0,0,blrpwpehlsql02_1393246076,,,,0, ,
Hi Rama - just curious as what language your dashboard script is written in?
I did write an SSO (real (not reel :p) tape) and VTL tape drive RAG (red amber green) status monitor script a long time ago in VBscript embedded inside HTML, aka an HTA script - but all it did was show drive occupancy - green=up red=down amber=lost path blue=active...
But I think you'll have a hard time scripting something to show client names using a drive... Does it also need to handle multiplexing (multiple clients saving to a drive) ?
I guess at the end of the day, there isn't such a command or tool to do what you want because it's not a traditional way of seeing how an environment is running - a tape drive is just a resource that is either up or down - and it is has usually been more important as to whether it is up or down - and how well it is performing - and not so much about which client is using any given tape drive resource.
But good luck anyway - as it sounds like an interesting coding challenge whichever way you look at it.
It is impossible to help with grep and awk from the output that you have posted above.
You can see that your output has all sorts of line breaks where there should not be.
So, if you send the output to a text file, we may be able to provide better assistance.
If all tape drives have ULTRIUM as part of drive name, you can as a start pipe the bpdbjobs command to grep the drive name:
bpdbjobs <...options... > |grep ULTRIUM