Quantcast
Channel: CodeSection,代码区,数据库(综合) - CodeSec
Viewing all articles
Browse latest Browse all 6262

Instructions for the bigsql_support tool

$
0
0
Instructions for the bigsql_support tool

As shown in Big SQL Log files Location and content , logs files that are useful for Big SQL problem determination are located in many directories and on many hosts. This blog discusses a tool that is useful in gathering these log files. The tool creates an archive that can be sent to the IBM support team for further investigation.

Tool name

bigsql_support.sh

Packaged in

bigsql-dist_*

BI-Analyst-*

The tool will be available in 4.2.1 and later versions.

Install location

/var/lib/ambari-agent/cache/stacks/BigInsights/4.x/services/BIGSQL/package/scripts

/var/lib/ambari-server/resources/stacks/BigInsights/4.x/services/BIGSQL/package/scripts

/usr/ibmpacks/current/bigsql/install

It can also run in standalone mode.

Requires

bigsql-util.sh

Usage bigsql-support.sh [options]
Options:
-a timestamp Timestamp to append to the archive file name
-A Collect on ALL hosts
-c Disable color coded status
-d Show parameters that will be used by the script
-e extra dirs List of extra directories to collect
-f host list File that contains a list of hosts to perform data collection
-F filename Name of the script log file
-h Display help
-H bihome Provides the path to BIGSQL_DIST_HOME
-i bigsql home Big SQL user home (default: /home/bigsql)
-I intall logs Directory containing the install logs ( defaul: /tmp/bigsql/logs )
-k Keep temporary files
-l Run locally only
-L logdir Specify the location of the script logging directory
-s support opt Options to support tool
-T temp dir Temporary directory used for archiving
-u user Big SQL username
-v vardir Path to the "var" directory (the value of $BIGSQL_DIST_VAR) Defaults +-------------------------------------------------+
+ CONSTANTS +
+-------------------------------------------------+
MODE : MASTER
ALL_HOSTS : 0
BIGSQL_USER : bigsql
THIS_HOST : machine_1.ibm.com
HOSTLIST_FILE : /tmp/bigsqlSSHHostList
USE_COLORS : 1
ARCHIVE_TIMESTAMP : 2016-11-28_12.00
LOG_FILENAME : bigsql-support-2016-11-28_12.00.35.6369.log
LOGGING_DIR : /tmp/bigsql/logs
SCRIPT_LOG_DIR :
SCRIPT_LOG : /tmp/bigsql/logs/bigsql-support-2016-11-28_12.00.35.6369.log
BIGSQL_DIST_HOME : /usr/ibmpacks/current/bigsql
BIGSQL_INST_HOME : /home/bigsql
LOCAL_ONLY :
INSTALL_LOG_DIR : /tmp/bigsql/logs
SUPPORT_OPT :
TEMP_ARCHIVE_DIR :
ARCHIVE_DIR : /tmp/bigsql/support
VAR_DIR : /var/ibm/bigsql
EXTRA_COLLECTION_DIRS :
HAVE_BIGSQL_USER : 0
SCRIPT_RUNNER : root Example

If no parameters are specified, the above default values are used.

Example command with options:
bigsql-support.sh -i /home/bigsql -u bigsql -v /var/ibm/bigsql -f /root/log_dir /bigsql_nodes_list.cfg -L /tmp/bigsql_test

For example, you can use a custom node list that has the headnode and only a few workers. You can also specify a new logging directory, separate that the usual install dir. Note that the install dir is collected separately from the logging dir of the bigsql_support script.

List of collected information

The tool will perform data collection on all hosts specified by the -h parameter. On each host, the script will collect the following:

Zip file created by db2support -localhost -o Ambari log files in (only get the *.txt log files): /var/ambari-agent/data Scheduler log files in: /var/ibm/bigsql/logs Install logs in: /tmp/bigsql/logs Notes The script needs to be executed as root The script must be run from a host that has passwordless ssh access to all the hosts in the host list file, for example, run from the headnode. The data collection is done in parallel for all hosts. The tool can be used outside of an install, as long as the script bigsql-support.sh and bigsql-util.sh are both located in the same local directory. They will both be copied to the remote hosts prior to execution. Example of the archive structure

Command

On a 4 host cluster, the following command was executed where the script is located:

$ ./bigsql-support.sh -L /tmp/bigsql_test_4

At the end of the run, this is the content of /tmp/bigsql_test_4:

Resulting archive

[root@machine_1.ibm.com:/tmp/bigsql_test_4] # ll

drwxr-xr-x 2 bigsql hadoop 4096 Jan 28 10:36 logs

drwxr-xr-x 3 bigsql hadoop 4096 Jan 28 10:47 support

[root@machine_1.ibm.com:/tmp/bigsql_test_4] # ll *

log:

This is the execution log for the tool.

-rw-rw-rw- 1 bigsql hadoop 24278 Jan 28 10:36 bigsql-support-2016-01-28_10.36.09.5300.log

support file:

This is the archive file to send the support team.

-rw-r r 1 root root 5758295 Jan 28 10:36 bigsql_support_full_archive_2016-01-28_10.36.tar.gz

Looking inside the archive [root@machine_1 temp]# ll

total 5624

-rw-r r 1 root root 5758295 Jan 28 10:48 bigsql_support_full_archive_2016-01-28_10.36.tar.gz[root@machine_1 temp]# tar xzvf bigsql_support_full_archive_2016-01-28_10.36.tar.gz bigsql_support_full_archive_2016-01-28_10.36.tar[root@machine_1 temp]# ll

total 32756

-rw-r r 1 root root 27781120 Jan 28 10:36 bigsql_support_full_archive_2016-01-28_10.36.tar

-rw-r r 1 root root 5758295 Jan 28 10:48 bigsql_support_full_archive_2016-01-28_10.36.tar.gz[root@machine_1 temp]# tar xvf bigsql_support_full_archive_2016-01-28_10.36.tar

bigsql_support_machine_1.ibm.com_2016-01-28_10.36.tar

bigsql_support_machine_4.ibm.com_2016-01-28_10.36.tar

bigsql_support_machine_3.ibm.com_2016-01-28_10.36.tar

bigsql_support_machine_2.ibm.com_2016-01-28_10.36.tar[root@machine_1 temp]# ll

total 59880

-rw-r r 1 root root 20531200 Jan 28 10:36 bigsql_support_machine_1.ibm.com_2016-01-28_10.36.tar

-rw-r r 1 root root 2621440 Jan 28 10:36 bigsql_support_machine_2.ibm.com_2016-01-28_10.36.tar

-rw-r r 1 root root 2406400 Jan 28 10:36 bigsql_support_machine_3.ibm.com_2016-01-28_10.36.tar

-rw-r r 1 root root 2211840 Jan 28 10:36 bigsql_support_machine_4.ibm.com_2016-01-28_10.36.tar

-rw-r r 1 root root 27781120 Jan 28 10:36 bigsql_support_full_archive_2016-01-28_10.36.tar

-rw-r r 1 root root 5758295 Jan 28 10:48 bigsql_support_full_archive_2016-01-28_10.36.tar.gz

Archive for each host

[root@machine_1 temp]# for i in `ls bigsql_support_bd*`;do tar xf $i;done [root@machine_1 temp]# ll

total 66972

drwxr-xr-x 5 root root 4096 Jan 28 10:48 machine_1.ibm.com

drwxr-xr-x 5 root root 4096 Jan 28 10:48 machine_2.ibm.com

drwxr-xr-x 5 root root 4096 Jan 28 10:48 machine_3.ibm.com

drwxr-xr-x 5 root root 4096 Jan 28 10:48 machine_4.ibm.com

-rw-r r 1 root root 20531200 Jan 28 10:36 bigsql_support_machine_1.ibm.com_2016-01-28_10.36.tar

-rw-r r 1 root root 2621440 Jan 28 10:36 bigsql_support_machine_2.ibm.com_2016-01-28_10.36.tar

-rw-r r 1 root root 2406400 Jan 28 10:36 bigsql_support_machine_3.ibm.com_2016-01-28_10.36.tar

-rw-r r 1 root root 2211840 Jan 28 10:36 bigsql_support_machine_4.ibm.com_2016-01-28_10.36.tar

-rw-r r 1 root root 27781120 Jan 28 10:36 bigsql_support_full_archive_2016-01-28_10.36.tar

-rw-r r 1 root root 5758295 Jan 28 10:48 bigsql_support_full_archive_2016-01-28_10.36.tar.gz

-rw-r r 1 bigsql hadoop 1690847 Jan 28 10:36 db2support_machine_1.ibm.com_2016-01-28_10.36.zip

-rw-r r 1 bigsql hadoop 1915146 Jan 28 10:36 db2support_machine_2.ibm.com_2016-01-28_10.36.zip

-rw-r r 1 bigsql hadoop 1822776 Jan 28 10:36 db2support_machine_3.ibm.com_2016-01-28_10.36.zip

-rw-r r 1 bigsql hadoop 1806711 Jan 28 10:36 db2support_machine_4.ibm.com_2016-01-28_10.36.zip

[root@machine_1 temp]# cd machine_1.ibm.com [root@machine_1 machine_1.ibm.com]# ll

total 12

drwxr-xr-x 2 root root 4096 Jan 28 10:48 ambari_agent_data

drwxr-xr-x 2 root root 4096 Jan 28 10:48 install_logs

drwxr-xr-x 2 root root 4096 Jan 28 10:48 scheduler_logs

Lastly, each of the above directories contain the log files and other important files.

Conclusion

The bigsql-support tool is useful to collect a variety of log files from the Big SQL cluster. The resulting zipped archive can easily be sent to the support team for analysis.


Viewing all articles
Browse latest Browse all 6262

Trending Articles