12
Capture Tool for SHR

Capture Tool Read Me

Embed Size (px)

DESCRIPTION

SHR

Citation preview

Page 1: Capture Tool Read Me

Capture Tool for SHR

Page 2: Capture Tool Read Me

INDEX

Introduction..............................................................................................3Installation................................................................................................3Executing the Capture tool...........................................................................3Interpreting results.....................................................................................4

System configuration.................................................................................4Product Configuration................................................................................4PostgreSQL DB information........................................................................4Sybase DB information...............................................................................4Log File..................................................................................................4Data source information..............................................................................5SHR Service Status....................................................................................5Dataflow information.................................................................................5ABC stream status.....................................................................................6

Extending capture tool................................................................................6XML Structure......................................................................................6XML Details............................................................................................7

Executable’s Details................................................................................7Running Custom Configuration Files:...................................................9

2

Page 3: Capture Tool Read Me

IntroductionCapture tool is designed to capture useful configuration and runtime information from

SHR systems to address the debugging/troubleshooting needs of Support and CPE. The objective of the tool is to avoid multiple iterations in getting the required information and speed up the resolution of customer reported issues by Support and CPE.

Installation Pre requisites:

1. Post installation and content pack installation should have been completed in corresponding SHR installed machine.

2. HP_PMDB_Platform_Administrator should be running

To install the Capture Tool execute following steps.

1. Run the following:Windows: “%pmdb_home%/contrib/Supportability/capture_tool/capture_toolInstall.bat”. Linux:“$PMDB_HOME/contrib/Supportability/capture_tool/capture_toolInstall.sh”.

2. Change directory “%pmdb_home%/adminServer/webapps/birt” in command prompt and run the commandWindows: “updatePasswd.bat <management database password for user pmdb_admin> “. Linux:“updatePasswd.sh <management database password for user pmdb_admin> “.

This step is required to make birt reports (which derive stream information) working.

3. Restart Admin UI to access birt reports through http://<hostname>:21411/birt/report.jsp

Executing the Capture toolThe capture tool ships with an out of the box capture configuration file

“shr_capture_tool_options.xml” which can be found at “%pmdb_home%\contrib\Supportability\capture_tool\perl\“. This XML contains targets which have set of commands to run. The tool uses this as a default configuration xml to captures the required information.

Page 4: Capture Tool Read Me

Click on the following batch file to run the Capture tool.Windows:“%pmdb_home%/contrib/Supportability/capture_tool/perl/capturetool.bat”Linux:$PMDB_HOME /contrib/Supportability/capture_tool/perl/capturetool.sh”

After it runs, the data collected would be dumped under the folder “%pmdb_home%/capture_output “ It will overwrite the content of the folder if there is already some generated data.

Interpreting results The information captured by the out of the box configuration file as follows

System configuration

1. OS Information2. System Information3. Logical drive information4. Logical memory information5. Time zone information6. Network Information7. Software Installed Information8. Environment Variables9. Event viewer output

Product Configuration

1. Collection configuration property file2. Config.prp3. BSMRVersion.prp

PostgreSQL DB information

1. Users, schema , space, db user etc.2. Number of active connections to database3. PostgreSQL configuration file4. PostgreSQL pg_hba.conf file

Sybase DB information

1. Version of Database.2. Database configuration information for SHR3. Number of active connections to the SHR database4. pmdbConfig.cfg of SHR

Page 5: Capture Tool Read Me

Log File

1. SHR logs2. Sybase logs3. PostgreSQL log4. AdminServer log

Installed_CP: 1. #Streams, #Dim tables, #Fact tables per content pack2. #Nodes, #Physical Systems, #VMs 3. Retention profiles4. All the content packs installed.

Data source information

1. Topology Source configured2. List of domains configured for collection3. DB Datasource configured and domain to which they belong.

Last poll time for each table involved in that domain4. PA Datasource configured and domain to which they belong.

Last poll for each of host, data source and class belonging to that domain5. Copy of latest dimension data -reconcilRegistry6. %PMDB_HOME%\config\vc\collectors.xml

SHR Service Status

1. Sybase IQ connectivity2. PostgreSQL connectivity3. Sybase IQ service status4. PostgreSQL service status5. DB Logger service status6. IM service status7. Collection service status8. Timer Services

Dataflow information

Refer the index.html file generated to navigate across files.

1. All the tables attached with particular content pack2. Row count ,database size and min , max ta_period of each table3. And results for that particular table saying if the table is getting loaded on

time. Check is based on following conditions. Result would be “passed” if i. Dimension tables: row count>1

ii. Fact tables: max(ta_period) < last two hours // specified in minutes in dataflowCheck.properties file found at %PMDB_HOME%/contrib\Supportability folder

iii. Hourly tables: max(ta_period) <6 hours // specified in hours dataflowCheck.properties

Page 6: Capture Tool Read Me

iv. Daily tables: max(ta_period)< 1 day // specified in Days dataflowCheck.properties

v. Others: row count >04. Stream and step information for each content pack with associated table

information along with the command each step runs.5. File would be generated with all the errors listed from all the logs

ABC stream status

1. Top 10 active streams ordered by execution time2. Top 10 streams ordered by execution time3. Top 10 steps ordered by retries4. Top 10 steps ordered by execution time5. Top 10 Streams in error for most number of times6. Top 10 Streams Aborted most number of times

These reports can be accessed any time through link http://<hostname>:21411/birt/report.jsp

By default all the information captured will be either in CSV format, text format or in html.

Extending capture toolThe Capture tool provides an extensible framework which CPE and Support teams can extend with custom actions by writing

1. Custom queries against management database (execute_mgmt_sql)2. Custom queries against the data warehouse (execute_sybase_sql)3. Custom file copy commands (filecopy)4. Custom Perl scripts (pl_script)5. Custom snapshot of folders (dir_snapshot)

XML StructureThe Structure of the XML file is as given below

<?xml version="1.0" encoding="UTF-8" ?> <capture output="output_default_folder_name"> <target name="Target1">

<runcommand exec="executablename1" argument=”args"> </runcommand> <runcommand exec="executableName2" arguments=”args”>

Page 7: Capture Tool Read Me

</runcommand> </target > <target name="Target2"> <runcommand exec="executablename1" argument=”args">

</runcommand> <runcommand exec="executableName2" arguments=”args”> </runcommand></target >

</capture>

XML Details

Target name= Uniquely identifies a particular target exec can have one of the following values.

o filecopyo execute_mgmt_sqlo dir_snapshoto execute_sybase_sqlo pl_script

Executable’s Details

filecopy: copies the file/directory from source to destination folder specified.o Arguments:

source: Source file which needs to be copied output_file: File name after shipping the file output_dir: Destination directory

ex:<target>

<runcommand exec="filecopy" argument="-source=C:\a.txt -output_file=b.txt -output_dir=C:\outputdir ">

</runcommand></target>

execute_mgmt_sql: Executes the specified sql statements against the PostgreSQL management database

o Arguments: sql: query string which needs to be executed . ( should be prefixed and

postfixes with “#SQL” string output_file: Name of the file where result set is dumped output_dir: Directory where output file should be dumped

Page 8: Capture Tool Read Me

ex:<target>

<runcommand exec="execute_mgmt_sql" argument="-output_file=Datasource -output_dir=C:\Datasource

-sql=#SQLselect * from dwabc.dict_db_ds#SQL"> </runcommand></target>

dir_snapshot: Lists the properties of files under ito Arguments:

dir: name of the directory whose snapshot needs to be taken output_file: Filename where results are stored output_dir: directory location where results are dumped

ex:<target>

<runcommand exec="dir_snapshot" argument="-dir=C:\ stage -output_file=stage_snapshot.txt

-output_dir=C:\Directory_snapshot"> </runcommand>

</target>

execute_sybase_sql: executes sql in Sybase data baseo Arguments:

sql: query string which needs to be executed . ( sql should be prefixed and post fixed with “#SQL” string

output_file: Name of the file where result set is dumped output_dir: Directory where output file should be dumped

ex:<target>

<runcommand exec="execute_sybase_sql" argument="-sql=#SQLselect * from dsi_reporting_apps#SQL -output_file=contentpacks -output_dir=C:\cp -outputhtml "> </runcommand>

</target>

pl_script: Executes the Perl script mentioned in arguments section.o Arguments:

name of the perl script which should be executed output_file: name of the file where result is dumped output_dir: name of the directory where output file should be dumped.

Page 9: Capture Tool Read Me

ex:<target>

<runcommand exec="pl_script"argument ="dataflow.pl -output_file=dataflow -output_dir=C:/ Dataflow "> </runcommand>

</target>

The output can be captured in html format by specifying an option “-outputhtml” in argument section.

Running Custom Configuration Files:Custom XML can be fed to the tool as follows

1. Change the directory “%pmdb_home%\contrib\Supportability\capture_tool\perl\” in command prompt

2. Run the command Windows:

Capturetool_config.bat “<custom1.xml,custom2.xml,custom3.xml... >”Linux:Capturetool_config.sh “<custom1.xml,custom2.xml,custom3.xml... >”

Where:custom1.xml, custom2 .xml.. are the fully qualified names of custom xml files

developed.

Page 10: Capture Tool Read Me