05-23-2012 02:27 PM
I have this requirement that I must be able to run tpconfig -emm_dev_list remotely from another master server and having a hard time finding a way to meet this requirement.
While tpconfig doesn't provide any -h switch (as vmoprcmd does), I found out that the following command almost does the job:
vmoprcmd -h remote_server -devconfig "-emm_dev_list -dl"
I get the exact ouput as if I was running tpconfig -emm_dev_list locally on remote_server. I noticed that the -dl switch must be present though.
However, it doesn't not always work perfectly. On some remote servers (so far, I have seen this on Windows servers), the output I get is in "noverbose" format, i.e. it is the same output I would get if I was calling locally tpconfig -emm_dev_list -noverbose
I am not sure why it is so and how can I circumvent this behavior. I have been playing with NetBackup 7 and 7.5.
The NetBackup documentation doesn't give much information about the "noverbose" format so it's very difficult to parse. Here is an example of a drive line from the "noverbose" output:
TPC_DEV65 DRIVE STK.T10000B.000 3 8 0 4 - -1 -1 -1 -1 renbu-master /dev/nst7 XYZZY_B4 - 1073741824 2 -1 -1 -1 -1 0 0 0 0 - 0 - - STK~~~~T10000B~~~~~~~~0102 - 0 0 0
I can guess what some of the fields are, but not all of them. In particular, I would be interested to see the "Current EVSN" and "Current RVSN" values. They are likely to be one of the dashes on the lines, but I'm not sure which one. My current test environment doesn't allow me to easily run tests to find out where those fields are in the noverbose output.
My questions are:
- Is there a way to guarantee that vmoprcmd -h remote_server -devconfig "-emm_dev_list -dl" always return a detailed output and not the "noverbose" output ?
- Is there a document available describing what are the various fields in the "noverbose" format?
Thanks!
Laurent.
Solved! Go to Solution.
05-25-2012 09:44 AM
Conclusion
In the end, my requirements are met by calling a combination of two commands:
vmoprcmd -h remote_server -devconfig -l
and
vmoprcmd -h remote_server -dp ad
and "joining" the output on the drive index.
Thanks to all who offered suggestions.
Laurent.
05-24-2012 12:16 AM
No document are available for noverbose output.We need to write your own script for this.
05-24-2012 01:17 AM
What exactly do you need from remote servers?
If you just need device config info, what about:
vmoprcmd -h remote_server -devconfig -l ?
05-24-2012 01:21 AM
Definitely no documentation on those fields.
05-24-2012 01:28 AM
Hey revaroo - did you get my message ... ?
I can't find anything either - I've just looked direct in the database to see if I can match up the fileds with the output, but nope, no chance of that.
Only way we'll get this is via backline looking in the code I guess ...
I'll drop a couple of emails to people, someone must have this somewhere ...
Martin
05-24-2012 07:38 AM
Here is more details about the requirements I need to meet:
I am trying to remotely obtain, for each drive:
When the output comes in detailed format, this is fairly easy. I can use:
Now, when the output comes in "noverbose" format (why it does so is a mystery to me – I did not want to the noverbose format), I get one line per drive, similar to this:
TPC_DEV65 DRIVE STK.T10000B.000 3 8 0 4 - -1 -1 -1 -1 renbu-master /dev/nst7 XYZZY_B4 - 1073741824 2 -1 -1 -1 -1 0 0 0 0 - 0 - - STK~~~~T10000B~~~~~~~~0102 - 0 0 0
I think that the 2nd field indicate we’re dealing with a drive.
I get (guessed):
But I am not sure where Current RVSN and Current EVSN are and I don’t have a good test environment where I could play with tapes and try to find out how the noverbose line is affected.
I am not even sure those fields are present in the noverbose output since it contains less fields than the detailed output. In this case, I would need to find another way to find out (remotely) whether a drive is in use or not.
Thanks,
Laurent.
05-24-2012 04:39 PM
I managed to get the two outputs (for the same drive) while a backup was being performed and it looks like there is no "Current RVSN" or "Current EVSN" in the "noverbose" output. See below.
So now, I'm really wondering how to find remotely whether a drive is in use or not. It looks like I using:
vmoprcmd -h remote_server -devconfig "-emm_dev_list -dl"
I will get a mix of both formats (detailed, and noverbose - why?) but if the noverbose format doesn't give a way to know whether the drive is in use or not, I'll probably need to find another command. Does anybody knows one that can be use to query a drive remotely?
Also, I am wondering what the "Flags" field means. This value is in both outputs when the drive is being used.
Thanks,
Laurent.
noverbose:
TPC_DEV65 DRIVE nbu-media000TLD4hcart 3 8 0 4 - -1 -1 -1 -1 nbu-media /dev/nst7 XYZZY_B4 - 33591307 2 -1 -1 -1 -1 0 0 0 0 - 0 /pseudo_0/adapter0/host1/target1:0:12/1:0:12:0 - STK~~~~~T10000B~~~~~~~~~0102 - 0 0 0
verbose:
==============================================================================
Drive: nbu-media000TLD4hcart
Index: 0
Drive Type: hcart(3)
Media Server: nbu-media
Occupy Index: 0
Opr Count: 0
Status: 2
Saved Mode Bits: 8624
Access Mode: 82
Robot Type: TLD(8)
Robot Number: 0
Loc1: 4
Loc2: -1
Loc3: -1
Loc4: -1
Loc5: 0
Port: -1
Bus: -1
Target: -1
Lun: -1
VH Saved Mode Bits: 0
Flags: 33591307
PathFlags: 0
DeviceFlags: 0
Time Mounted: 0
Total Time Mounted: 0
Cleaning Frequency: 0
Last Time Cleaned: 0
Vendor Device Num: 0
Tape Alert 1: 0
Tape Alert 2: 0
Last DA Call Time: 0
Application Type: 0
Drive Path: /dev/nst7
Volume Header Drive Path: /pseudo_0/adapter0/host1/target1:0:12/1:0:12:0
Vendor Drive Name: -
Current RVSN: 3005TA
Current EVSN: 3005TA
Current User: -
Operator Comment: -
SN: XYZZY_B4
Inquiry Info: STK T10000B 0102
World Wide Id: -
NDMP Host: -
Scan Host: -
Assign Host: nbu-media
RSM GUID: 00000000-0000-0000-0000-000000000000
APPL_GUID: 00000000-0000-0000-0000-000000000000
==============================================================================
05-24-2012 05:45 PM
It looks like the command
vmoprcmd -h remote_server -dp ad
gives the missing information (RecMID and ExtMID) and I could join on the drive index coming from the previous command:
ADDITIONAL DRIVE STATUS
Drv DriveName RecMID ExtMID Wr.Enbl. ReqId Assigned Shared
0 STK.T10000B.000 - 0 - No
1 STK.T10000B.001 - 0 - No
2 IBM.ULT3580-TD4.000 - 0 - No
I need to validate this.
05-25-2012 09:44 AM
Conclusion
In the end, my requirements are met by calling a combination of two commands:
vmoprcmd -h remote_server -devconfig -l
and
vmoprcmd -h remote_server -dp ad
and "joining" the output on the drive index.
Thanks to all who offered suggestions.
Laurent.