cancel
Showing results for 
Search instead for 
Did you mean: 

Command to list Drive name and current running backup

Rama_Singh
Level 3

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 ?

1 ACCEPTED SOLUTION

Accepted Solutions

Mark_Solutions
Level 6
Partner Accredited Certified

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

View solution in original post

22 REPLIES 22

RamNagalla
Moderator
Moderator
Partner    VIP    Certified

vmoprcmd is the command to list the drives

activity moniter in GUI or bpdbjobs command is the one which will list the queued jobs.

Rama_Singh
Level 3

Thanks for your response.

But i want to know current running backup in which drive using command...

RamNagalla
Moderator
Moderator
Partner    VIP    Certified

nbrbutil -dump | grep <jobid> 

will give you the Drive name for current running jobs.

mph999
Level 6
Employee Accredited

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.

Rama_Singh
Level 3

Thanks this is helpfull...

Can you just tell me how can i grep only job ID and Drive name.

RamNagalla
Moderator
Moderator
Partner    VIP    Certified
below is the command and output that i got in my system for duplication job... now sure if its help you or not
 
you probably needs to chage the Print value for backup job, i have not testes that...
 
root# nbrbutil -dump | grep 309038 | grep "DriveName" | awk '{print$10,$18}'
firstuserid="jobid=309038" DriveName=
firstuserid="jobid=309038" DriveName=Drive1
 
besides, may i know why you are looking for this.. what is your actual requirement?

revarooo
Level 6
Employee

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.

 

 

Rama_Singh
Level 3

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.

RamNagalla
Moderator
Moderator
Partner    VIP    Certified

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..

revarooo
Level 6
Employee

Why do you want to know the tape drive based on the client backup? There is no command to do that.

 

Rama_Singh
Level 3

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.

Marianne
Level 6
Partner    VIP    Accredited Certified

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.

Rama_Singh
Level 3

i can see only Storage unit from that i can identify only tape library unit but not tap  drive.

 

Marianne
Level 6
Partner    VIP    Accredited Certified

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

Rama_Singh
Level 3

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, ,
 

 

sdo
Moderator
Moderator
Partner    VIP    Certified

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.

Scott_Austin
Level 3
Employee Certified

Sounds like you need Opscenter

Marianne
Level 6
Partner    VIP    Accredited Certified

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

Rama_Singh
Level 3

Please find output in txt file.