02-24-2014 04:15 AM
Is any command in netbackup which give me drive name (If multiple Tap library is configured) with current runing backup and all queued client for backup ?
Solved! Go to Solution.
02-26-2014 11:17 AM
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
02-24-2014 04:28 AM
vmoprcmd is the command to list the drives
activity moniter in GUI or bpdbjobs command is the one which will list the queued jobs.
02-24-2014 04:32 AM
Thanks for your response.
But i want to know current running backup in which drive using command...
02-24-2014 04:47 AM
nbrbutil -dump | grep <jobid>
will give you the Drive name for current running jobs.
02-24-2014 04:57 AM
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.
02-24-2014 05:50 AM
Thanks this is helpfull...
Can you just tell me how can i grep only job ID and Drive name.
02-24-2014 07:06 AM
02-24-2014 07:06 AM
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.
02-24-2014 07:32 AM
Hi Nagalla,
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.
02-24-2014 07:53 AM
but i still do not understand your requirement is...
if you let us know what you are trying to achieve with this, may be we could give you more appropriate solution or suggest for that..
02-24-2014 09:23 AM
Why do you want to know the tape drive based on the client backup? There is no command to do that.
02-24-2014 11:09 PM
I have created a customise dashborad which is showing all client backup details date wise and on same dashborad i want to display current running backup tape library drive wise.
02-24-2014 11:51 PM
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.
02-25-2014 01:13 AM
i can see only Storage unit from that i can identify only tape library unit but not tap drive.
02-25-2014 01:57 AM
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
02-25-2014 02:36 AM
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.
I
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, ,
02-25-2014 02:37 PM
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.
02-25-2014 09:42 PM
Sounds like you need Opscenter
02-25-2014 11:06 PM
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
02-26-2014 07:26 AM
Please find output in txt file.