Operating System - Linux
1753770 Members
4856 Online
108799 Solutions
New Discussion

Re: Need to create the report using the script

 
Senthil_N
Advisor

Need to create the report using the script

Hi All,

 

We have lot servers installed with Veritas Storage foundation products.

 

If I enter following command it is showing all the veritas product installed and license details.

 

 

Symantec License Manager vxlicrep utility version 3.02.34.0
Copyright (C) 1996-2008 Symantec Corporation. All rights reserved.

Creating a report on all VERITAS products installed on this system

-----------------***********************-----------------

License Key = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Product Name = VERITAS Cluster Server
Serial Number = 9xxxxxxxxxxxx
License Type = PERMANENT
OEM ID = 81
Point Product = YES

Features :=
Platform = Linux
Version = 5.0
Tier = Unused
Reserved = 0

Mode = CFS_VRTS


-----------------***********************-----------------

License Key = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Product Name = VERITAS Volume Manager
Serial Number = 9xxxxxxxx
License Type = PERMANENT
OEM ID = 81
Point Product = YES

Features :=
CVM_FULL = Enabled

VxVM = Enabled
FASTRESYNC = Enabled
DGSJ = Enabled
CPU Count = Not Restricted
PGR = Enabled
VVS_CONFIG = Enabled
Platform = Linux
Version = 5.0
Dynamic Lun Expansion = Enabled
Hardware assisted copy = Enabled
Cross-platform Data Sharing = Enabled
Maximum number of volumes = Not Restricted


-----------------***********************-----------------

License Key = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Product Name = VERITAS Storage Foundation for Cluster File System
Serial Number = 9xxxxxxxx
License Type = PERMANENT
OEM ID = 81
Editions Product = YES

Features :=
OPERATING_SYSTEM = LINUX
CPU Count = Not Restricted
VXFS#VERITAS File System = Enabled
VXCFS#VERITAS File System = Enabled
VXCLUSTERFS = Enabled
VxVM#VERITAS Volume Manager = Enabled
CVM_FULL#VERITAS Volume Manager = Enabled

Mode#VERITAS Cluster Server = CFS_VRTS
Platform = Linux
Version = 5.0
Tier#VERITAS Cluster Server = Unused
File Change Log#VERITAS File System = Enabled
Cross-platform Data Sharing#VERITAS File System = Enabled
Extra-Big File Systems#VERITAS File System = Enabled
Multi-Volume Support#VERITAS File System = Enabled
Quality of Storage Service#VERITAS File System = Enabled
Dynamic Lun Expansion#VERITAS Volume Manager = Enabled
Hardware assisted copy#VERITAS Volume Manager = Enabled
Cross-platform Data Sharing#VERITAS Volume Manager = Enabled
PGR#VERITAS Volume Manager = Enabled
VVS_CONFIG#VERITAS Volume Manager = Enabled
FASTRESYNC#VERITAS Volume Manager = Enabled
DGSJ#VERITAS Volume Manager = Enabled
VXCKPT#VERITAS File System = Enabled


-----------------***********************-----------------

Product Name = VERITAS Volume Manager
License Type = PERMANENT

Features :=
PGR = Enabled
PGR_TRAINING = Enabled
Site Awareness = Enabled
Storage Expert = Enabled
Dynamic Lun Expansion = Enabled
Cross-platform Data Sharing = Enabled

 

-----------------***********************-----------------

Product Name = VERITAS File System
License Type = PERMANENT

Features :=
QLOG = Enabled
VXFDD = Enabled
File Change Log = Enabled
Cross-platform Data Sharing = Enabled
Extra-Big File Systems = Enabled
Multi-Volume Support = Enabled

 

-----------------***********************-----------------

Product Name = VERITAS Database Edition for Oracle
License Type = PERMANENT

Features :=
DATABASE_EDITION = Enabled
DBED_ORA_TOOLS = Enabled
ODM = Enabled

 

-----------------***********************-----------------

Product Name = VERITAS SANPoint Control
License Type = PERMANENT

Features :=
SPC Lite = Enabled

 

-----------------***********************-----------------

License Key = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Product Name = VERITAS File System
Serial Number = 9xxxxxxxx
License Type = PERMANENT
OEM ID = 81
Point Product = YES

Features :=
VXFS = Enabled
VXCKPT = Enabled
VXCFS = Enabled

CPU Count = Not Restricted
Platform = Linux
Version = 5.0
File Change Log = Enabled
Cross-platform Data Sharing = Enabled
Extra-Big File Systems = Enabled
Multi-Volume Support = Enabled
Quality of Storage Service = Enabled
Maximum number of file systems = Not Restricted

 

 

 

 

Using above output I need to create a report as follows using shell script.

 

 

Server_Name     Product_Name              Serial_Number      License_Key   License_Type    Platform        Version

ServerA                Veritas Cluster              xxxxxxxx                xxxxxxxxx       Permanent        Linux               5.0

ServerA                Veritas file system      xxxxxxxx                xxxxxxxxx       Permanent        Linux                5.0

ServerA               VeritasStorageFoun     xxxxxxxx                xxxxxxxxx       Permanent        Linux                5.0

 

 

 

 

Thanks a lot in advance.

 

1 REPLY 1
Dennis Handly
Acclaimed Contributor

Re: Need to create the report using the script

Perhaps something like:

awk -v server=ServerA '

BEGIN {

   serial = "---"

   license_key = "---"

   platform = "---"

   version = "---"

}

/Product Name/ {

   product = $4

   for (i = 5; I < NF; ++i) product = product " " $i

   next

}

/License Key/ {

   license_key = $4

   next

}

/Serial Number/ {

   serial = $4

   next

}

/License Type/ {

   license_type = $4

   next

}

/Platform =/ {

   platform = $3
}

/Version =/ {

   version = $3

   next

}

/----/ && product != "" {

   print server, product, serial, license_key, license_type, platform, version

   serial = "---"

   license_key = "---"

   platform = "---"

   version = "---"

   next

}

END {

   print server, product, serial, license_key, license_type, platform, version

}' input-file