BMC Smart Utilities (Communities supported)

Version 18
    Share:|

    Smart Utilities (Part 1)

     

     

    Contents

     

     

    Introduction.

    Extract the zip file and setup environment

    1.     Server group ranking chart

    2.     Live Server Group board information.

    3.     Share application properties report

    4.     Compare AR Configuration from all Servers in the server group & generate HTML.

    5.     Compare multiple AR Configuration files in a given location.

    6.     Generate AR Schema Names report

     

    Introduction

     

    This package is a collection of unsupported utilities that can help you save time and speed up troubleshooting efforts by quickly analyzing data and metadata on your servers and presenting useful information in an easy to read HTML format.

     

    Use Case:  For example, you have 20 servers in the sever group and some users are facing a delay in approval requests. To troubleshoot, you want to focus on the servers that owns the approval process based on ranking or failover basis and start investigation. You can run the Server Group ranking utility to find out the ranking information. But if the server ranked as 1 may be down and other server in the server group may own approval process. To find dynamic server group ranking info, you can execute “Live Server group board Information” utility that will show which server currently owns the Approval process. You can start troubleshooting from that server first and extend investigation to other servers.

     

    Extract the zip file and setup environment

     

    • Download from Dropbox - SmartUtility .zip
    • Create folder C:\SmartUtilities
    • Unzip file “SmartUtility.zip” all files into C:\SmartUtility
    • · Verify JAVA_HOME, Java path etc. make sure you can execute java programs
    • · Set environment variables (Adjust the path per your environment, may be C or D or E drive. )

    SET REPORT_PATH=C:\SmartUtility\Report

    SET CSV_PATH=C:\SmartUtility\csv\\

    SET CFG_PATH=C:\SmartUtility\cfg\\

    SET XML_PATH=C:\SmartUtility

    SET DEBUG=FALSE

    Note: You can manually execute above commands to set env variables or execute Script.bat is provided for simplifying the steps, just edit the batch file, adjust the path and change user name password for Demo where ever required. You can execute the batch file from command prompt.

     

    • Open dbInfo.xml and modify the Database connection entries for your environment either for Oracle or SQL Server. “SOURCE” could be any of your environment such as Production or QA or Development, “DEST” (Destination) could be any of your environment such as Production or QA or Development
        

     

    •      Open file dbInfo.xml and update your Database information

     

    1. Server group ranking chart

    This utility generates the Server Group ranking report in a well formatted tabular format to understand your environment and take additional steps to fix any discrepancies.

    To generate the report, execute the following at command prompt.

    To execute for Source DB connection

    java -jar -Dexecutiondb=source -Dreportlocation="%REPORT_PATH%\ServerGroupRank_source.html" -Ddebug=%DEBUG% ServerGroupRanking.jar

     

    To execute for “DEST”(Destination) DB connection:

    java -jar -Dexecutiondb=dest -Dreportlocation="%REPORT_PATH%\ServerGroupRank_Dest.html" -Ddebug=%DEBUG% ServerGroupRanking.jar

     

    HTML Report is generated in C:\SmartUtility\Report

     

    Sample Report as shown below:

     

     

    Not Defined: This means there is no entry in Server Group ranking form for the respective server and process.

    Not Ranked: This means there is an entry in Server Group Ranking form for the respective server and process but rank is set to empty or null

    2.    Live Server Group board information

    This Utility read information from Server Group board table and would reflect live information of processes currently owned by respective servers.

     

    To generate the report, execute the following at command prompt.

     

    SET REPORT_PATH=C:\SmartUtility\Report

    SET DEBUG=FALSE

     

    To execute for “DEST”(Destination) DB connection:

    java -jar -Dexecutiondb=dest -Dreportlocation="%REPORT_PATH%\ServerGroupBoard_Dest.html" -Ddebug=%DEBUG% ServerGroupBoardInfo.jar

     

    To execute for Source DB connection

    java -jar -Dexecutiondb=source -Dreportlocation="%REPORT_PATH%\ServerGroupBoard_source.html" -Ddebug=%DEBUG% ServerGroupBoardInfo.jar

    The report is generated as shown below:

     

    From the above report, CMDB and Business Rules Engine running on the server that is ranked 3. This means server ranked 1 and 2 might not be available or down for some reason. Once server 1 or server 2 come online then rank failover to other servers. If you run the report again then it would reflect the latest information.

    3.   Share application properties report

     

    This Utility read share application properties from the server and display the report in HTML format, will highlight color yellow that may need attention.

     

    To generate the report, execute the following at command prompt.

     

    SET REPORT_PATH=C:\SmartUtility\Report

    SET DEBUG=FALSE

     

    To execute for “DEST”(Destination) DB connection:

    java -jar -Dexecutiondb=dest  -Dreportlocation="%REPORT_PATH%\ShareAppProperties_Dest.html" -Ddebug=%DEBUG% ShareApplicationProperties.jar

     

    To execute for Source DB connection

    java -jar -Dexecutiondb=source -Dreportlocation="%REPORT_PATH%\ShareAppProperties_source.html" -Ddebug=%DEBUG% ShareApplicationProperties.jar

     

    The report is generated as shown below:

    The entries highlighted in color yellow may need attention.

     

     

    4.    Compare AR Configuration from all Servers in the server group & generate HTML

    This utility query Server group board information stored in DB, and generate HTML report showing setting name, value for each server by reading values using API calls. This will highlight if there is any difference regarding BMC recommended values (stored in Configuration.xml)

     

    To execute utility run following commands:

    SET REPORT_PATH=C:\SmartUtility\Report

    SET CSV_PATH=C:\SmartUtility\csv\\

    SET CFG_PATH=C:\SmartUtility\cfg\\

    SET XML_PATH=C:\SmartUtility

     

    To execute for “DEST”(Destination) DB connection:

    java -jar -Dexecutiondb=dest -Dreportlocation="%REPORT_PATH%\ARConfigreport_Dest.html" -Dcfglocation="%CSV_PATH%" -Dcsvlocation="%CFG_PATH%" -Dusername=Demo -Dpassword="" -Dxmllocation="%XML_PATH%\Configuration.xml" -Ddebug=%DEBUG% ARConfigurationInAllServers.jar

     

    To execute for Source DB connection

    java -jar -Dexecutiondb=Source -Dreportlocation="%REPORT_PATH%\ARConfigreport_source.html" -Dcfglocation="%CSV_PATH%" -Dcsvlocation="%CFG_PATH%" -Dusername=Demo -Dpassword="" -Dxmllocation="%XML_PATH%\Configuration.xml" -Ddebug=%DEBUG% ARConfigurationInAllServers.jar

     

    Execution logic:

    Step1- While executing jar we select which Database to execute on; source or “DEST”(Destination).

    Step2- From dbinfo.xml it reads all the DB credentials. (Source or “DEST” (Destination).)

    Step-3 Recommended setting names and their values to be given in Configuration.xml.

    Step-4 It reads the serverName, serverPort from servgrp_board.

    Step-5 Connect to all servers one by one with servername and port query to the servers for all recommended setting values as well as fixed setting values compare and prepare report.

     

    The output is as shown below:

     

    5.   Compare multiple AR Configuration files in a given location

    This utility helps with collecting and comparing data from multiple ar.cfg files and generate compare report in HTML format. This would help with analyzing the environment and compare the configuration to find out if there are any discrepancies.

     

    You can collect all ar.cfg files from your servers and paste to cfg folder before running the utility. There is no limit of files, so you can compare 10 or 20 or 30 or even more at the same time.

     

    To execute utility run following commands:

     

    SET REPORT_PATH=C:\SmartUtility\Report

    SET CSV_PATH=C:\SmartUtility\csv\\

    SET CFG_PATH=C:\SmartUtility\cfg\\

     

    java -jar -Dreportlocation="%REPORT_PATH%\ARconfigforgivenfile.html" -Dcsvlocation="%CSV_PATH%" -Dcfglocation="%CFG_PATH%" ARConfigurationInAllServersWithGivenCfgFiles.jar

     

      The report is generated as shown below:

     

    6.   Generate Schema Names Report:

    This utility query AR Schema information stored in DB, and generate HTML report showing Schema ID, Schema Name, Customization Type. This would help support to quickly relate the schema ids from the logs with form names. If you provide this report along with the API/SQL logs, support no need to go forth and back to get Form Names. This would save time.

     

    To execute utility run following commands:

    SET REPORT_PATH=C:\SmartUtility\Report

     

    To execute for “DEST”(Destination) DB connection:

    java -jar -Dexecutiondb=dest -Dreportlocation="%REPORT_PATH%\SchemaNames_Dest.html" -Ddebug=%DEBUG% SchemaNames.jar

     

    To execute for Source DB connection

    java -jar -Dexecutiondb=source -Dreportlocation="%REPORT_PATH%\SchemaNames_source.html" -Ddebug=%DEBUG% SchemaNames.jar