cancel
Showing results for 
Search instead for 
Did you mean: 

Script to get media ID, slot, server, robot and expiration date

t_predator
Level 2

Hi,

I'd like to get a script or command line to have (at least) the following informations:

Media ID

Slot

Server

Robot

Expiration Date

 

Something like this (copy-paste from media windows in Netbackup):

0792L3    LT0792L3    HCART3    TLD      0    cip_nbu1     20    00_000_TLD    Master_SIN      7    24/07/2008 20:22:39      0 - NetBackup      -   

 

I'm using Netbackup 5.1MP5 running on Windows 2003 server.

 

 

Can anyone help me ?

1 ACCEPTED SOLUTION

Accepted Solutions

Andy_Welburn
Level 6
Try:

 

vmquery -rn <robot_number> -w

 

Just be prepared to parse the output!!

View solution in original post

4 REPLIES 4

Anonymous
Not applicable

COMMAND: vmquery -?

 

EXAMPLE: vmquery -m DLY028

 

can give

 

media ID:              DLY028
media type:            DLT cartridge tape (11)
barcode:               DLY028
media description:     ---
volume pool:           Daily (5)
robot type:            TLD - Tape Library DLT (8)
robot number:          0
robot slot:            50
robot control host:    jedi_master

volume group:          000_00000_TLD
vault name:            ---
vault sent date:       ---
vault return date:     ---
vault slot:            ---
vault session id:      ---
vault container id:    -
created:               Wed May 24 16:06:12 2006
assigned:              Tue Dec  4 01:00:03 2007
last mounted:          Thu Jul 24 01:01:20 2008
first mount:           Thu May 25 18:05:55 2006
expiration date:       ---
number of mounts:      351
max mounts allowed:    ---
status:                0x0

 

 This looks like it might give you most of what you need.

t_predator
Level 2

Thanks for your answer, but it's not what I want.

I want to have the full inventory of my robot, not just one tape detail.

 

So this is what I'd like to get:

0211L3    000211L3    HCART3    TLD      0    cip_nbu1     28    00_000_TLD    Master_SIN     40    28/07/2008 22:13:22      0 - NetBackup      -   
0501L3    LT0501L3    HCART3    TLD      0    cip_nbu1     55    00_000_TLD    Master_SIN      2    28/07/2008 22:13:22      0 - NetBackup      -   
0472L3    LT0472L3    HCART3    TLD      0    cip_nbu1     26    00_000_TLD    Master_SIN     37    28/07/2008 20:42:30      0 - NetBackup      -   
0352L3    LT0352L3    HCART3    TLD      0    cip_nbu1      9    00_000_TLD    Master_SIN     31    28/07/2008 20:42:26      0 - NetBackup      -   
0438L3    LT0438L3    HCART3    TLD      0    cip_nbu1     11    00_000_TLD    Master_SIN     14    28/07/2008 20:41:35      0 - NetBackup      -   
0368L3    LT0368L3    HCART3    TLD      0    cip_nbu1     25    00_000_TLD    Master_SIN     34    28/07/2008 20:41:32      0 - NetBackup      -   

........

Andy_Welburn
Level 6
Try:

 

vmquery -rn <robot_number> -w

 

Just be prepared to parse the output!!

t_predator
Level 2

Thanks Andy, this is exactly what I was looking for.

 

Best regards.