Btw.,
Here's a code snippet in perl from NBUX that decodes the status while
processing bpimagelist
output.
Cheers'
--PLB
##
## Convert hex status into English.
##
## Status values were derived from descriptions in the bpmedialist
manpage.
##
## 0x200 = 1000000000 = Multiplexing is TRUE.
## 0x080 = 0010000000 = Imported is TRUE.
## 0x040 = 0001000000 = Multiple retention levels is TRUE.
## 0x008 = 0000001000 = The status is Full.
## 0x004 = 0000000100 = This is an unreported state.
## 0x002 = 0000000010 = The status is Suspended.
## 0x001 = 0000000001 = The status is Frozen.
## 0x000 = 0000000000 = The status is Active.
##
## The code below is a kludge (thanks to Chris Madden for this) until I
## figure out how to manipulate the hex status value as a bitstring.
##
## --PLB 12/21/2001
##
$status = sprintf("%03x", hex($status) );
my(@status_flags);
if( substr($status, 0, 1) =~ /2/ ) { unshift(@status_flags,
"MULTIPLEXED"); }
if( substr($status, 1, 1) =~ /8/ ) { unshift(@status_flags,
"IMPORTED"); }
if( substr($status, 1, 1) =~ /4/ ) { unshift(@status_flags,
"MULTIRETENTION"); }
if( substr($status, 2, 1) =~ /[1359]/ ) { unshift(@status_flags,
"FROZEN"); }
if( substr($status, 2, 1) =~ /[89]/ ) { unshift(@status_flags,
"FULL"); }
if( substr($status, 2, 1) =~ /0/ ) { unshift(@status_flags,
"ACTIVE"); }
$status = join(" ", @status_flags);
At 11:17 AM 01/28/2002 -0600, David A. Chapa wrote:
>Hex
>000 - Active
>001 - Frozen
>002 - Suspended
>008 - Full
>040 - Multiple RL
>080 - Imported
>200 - MPX True
>
>-David
>
>
><><><><><><><><><><><><><><><><><><><><>
>David A. Chapa
>NetBackup Consultant
>DataStaff, Inc.
>http://www.consulting.datastaff.com
>847 413 1144
>---------------------------------------
>NBU-LSERV AT datastaff DOT com - Adv. Scripting
>http://www.xbpadm-commands.com
>
>-----Original Message-----
>From: veritas-bu-admin AT mailman.eng.auburn DOT edu
>[mailto:veritas-bu-admin AT mailman.eng.auburn DOT edu]On Behalf Of Jason
>Ahrens
>Sent: Monday, January 28, 2002 10:44 AM
>To: Veritas BU
>Subject: [Veritas-bu] Decipering the 'status' field of bpmedialist -l
>
>
>I am trying to decipher the status field of 'bpmedialist -l' I know this
>will tell me information about the media such as full, frozen, suspended,
>imported, MPX(?) and possibly others. I cannot seem to find this in the
>NetBackup Datacentre 3.4 manual.
>
>Does anyone know how to decipher the status field? I know it's bitmapped,
>but I don't know that the bits mean.
>
>Thanks
>
>Jason
>
>--
>Jason Ahrens, Systems Analyst
>TELUS Enterprise Solutions
>http://www.telus.com
>The Future is Friendly
>
>_______________________________________________
>Veritas-bu maillist - Veritas-bu AT mailman.eng.auburn DOT edu
>http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
>
>_______________________________________________
>Veritas-bu maillist - Veritas-bu AT mailman.eng.auburn DOT edu
>http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
|