Gathering diagnostic information with ‘support manager cli’

Ops Center Protector User Guide

Version
7.7.x
Audience
anonymous
Part Number
MK-99PRT002-08
ft:lastEdition
2023-10-26

Support manager cli is a powerful CLI tool that is based on diagdata and many of these commands should be familiar. The main advantage of the support manager CLI tool over diagdata, is that it is a remote tool and thus doesn’t require specific access to any of the nodes vi remote desk top/ssh, which is always the case when running diagdata to control and collect information from nodes. Also, the support manager cli can run on the master as well, to collect data from that Master.

It provides the following functions from a command prompt on the Master node only and can also run commands that are targeted for the Master node:
  • Remotely, stopping and starting of Ops Center Protector services.
  • Remotely resetting the Ops Center Protector system state.
  • Remotely raising and lowering of trace level for diagnostics.
  • Remote collection of Ops Center Protector state information to aid investigation of issues.

It would be advantageous if the user also has experience of using diagdata.

This tool is invoked in the following way:

The executable is in <Protector Installation>/bin

  1. Windows: From a cmd prompt or PowerShell prompt enter ‘[./]supportmanagercli
  2. Linux: From a terminal session ./supportmanagercli

Like many of the CLI tools provided to support the Protector product, running the tool without any arguments, will print out the arguments/options that may be used. Many of these options, like diagdata can be concatenated together to create specific requirements.

Following the usage options below, there is a compressive set of notes that describes how the options can be used.

The table(s) below describe how each of the arguments would be used:

Abbreviated argument Full argument Description
  --verbose More verbose output.
-h --help Produce this help message.
Table. Information options
Abbreviated argument Full argument Description
-i --info Get information about specified nodes.
  --show-nodes Show list of specified nodes (or all nodes if none specified).
Table. Collection options
Abbreviated argument Full argument Description
-m --mini Perform mini dump on specified machines, and collect the resulting archives on the master.
-f --full Perform full dump on specified machines and collect the resulting archives on the master.
-c <arg> --collect <arg> Indicate which data must be collected from specified machines. Use 'all' to collect all components. For help use 'help'.
-n <arg> --tracename <arg> Optional filter mask, which uses wildcards to target only specific trace files e.g. --tracename repos* (multiple filters can be used separated by ';' e.g. hub*;node*;repo* for Linux use "hub*;node*;repo*")
-a <arg> --traceage <arg> Takes an integer which is the number of days to go back from today.
-z <arg> --nosnapshots <arg> Optional filter mask, which uses age in days to target only trace files modified in that time frame.
  --no-md5 Disable MD5 checksum on created zip files
  --split Split collected dump files into multiple chunks. Intended to be used if the file is too big to be uploaded to a file service. See the note 1 below
-o <arg> --output <arg> Optional output directory when trace is sent to the Master. The default value shown is correct for the installation location.
Note: The size of the ‘chunks’ used in the split option is configurable. This can be changed by editing the config file: db/config/diagdata.cfg and locating the following xml section on the associated node. The value is in byes with a default of 1GB – ie 1,073,741,824
<item name="File Part Chunk Size" argtype="single">
        <value type="uint32">1073741824</value>
</item>
Table. Management options
Abbreviated argument Full argument Description
-t<arg> --trace <arg> Set trace level on specified machines for new and running processes.
  --trace-new <arg> Set trace level on specified machines for new processes only.
  --trace-running <arg> Set trace level on specified machines for running processes only.
-p --delalltrace Delete all trace files on specified machines. This option will stop the services, delete all trace, and start the services.
Table. Trace directory options
Abbreviated argument Full argument Description
-d<arg> --trace-dir Set the Protector trace directory on specified machine.
Table. Node selection options
Abbreviated argument Full argument Description
  --all-nodes <arg> Specify that all nodes should be included.
  --node-name <arg> Optional filter mask, which uses wildcards to include specific nodes by their name (multiple filters can be specified, separated by ',').
  --node-type <arg> Optional filter mask, which uses wildcards to include specific nodes by their type (multiplefilters can be specified, separated by ',').
  --test-node-filter Test a node filter only, without performing any operation on the nodes returned by that filter.
Table. Other shared options
Abbreviated argument Full argument Description
-r<arg> --restart Restart services on specified machines. Valid with management options and trace directory options.

How to build the options:

As mentioned above, this tool runs on the Master only, thus from a Windows or a Linux Master. It will run in a Windows CMD or Power Shell Window or in a Linux terminal window. It will not run from any other node type and it will not run from an AIX based node.

The ‘binary’ is located in the <installation>/bin area and is named ‘supportmanagercli’ (Note the binary name, as there are some other binary files with similar names in the same place)

Like many CLI tools, the options need to be ‘strung’ together. The following table(s), in no particular order will show how the options could be used:

Preceded any of the options with ‘supportmanagercli’ from a Windows CMD window and ‘./supportmanagercli’ from Windows PowerShell Or Linux terminal window:

SYNOPSIS:

Table. supportmanagercli [OPTIONS] NodeSelection
Option Description
--show-nodes List all nodes as 3 lists 'OSHost Nodes involved', 'OSHost Nodes' and 'Agentless Nodes'
--info --node-name <node name> Displays information about a specific node, nodes names using wild cards, a csv list (Note: no spaces between commas)
--info --all-nodes Displays information about all nodes
--info --node-type <node type> Displays information node types -ie OSHost, HyperV, HBBHCP, HitachiBlockDevice
--test-node-filter This is used to test the filter:

--test-node-filter --node-name *<name>*

--test-node-filter --node-type *<type>*

Or use just a wild card:

--test-node-filter --node-name *

--test-node-filter --node-name *
--deltrace --node-name <node name> Delete inactive trace for a specific node
--deltrace --all-nodes Delete inactive trace for all nodes
--delalltrace --node-name <node name> Delete all trace files on specified node (Services will be restarted)
--delalltrace --all-nodes Delete all trace files on all nodes (Services will be restarted)
--trace-dir <dir> --node-name <node name> Set the trace directory on specified node (Requires the services to be restarted)
--trace-dir <dir> --all-nodes Set all trace directories (Requires the services to be restarted)
--trace <Trace Level> --node-name <node name> Set specified trace level on specific nodes (new and running processes)
--trace <Trace Level> --all-nodes Set specified trace level on ALL nodes (new and running processes)
--trace-new <Trace Level> --node-name <node name> Set specified trace level on specific nodes (new processes)
--trace-new <Trace Level> --all-nodes Set specified trace level on ALL nodes (new processes)
--trace-running <Trace Level> --node-name <node name> Set specified trace level on specific nodes (running processes)
--trace-running <Trace Level> --all-nodes Set specified trace level on ALL nodes (running processes)
--full --node-name <node name> Collect data from the node name (can use CSV - no space) and put it into the Master’s <protector home>/runtime/remote trace collection/<time stamp directory>
--full --all-nodes Collect data from all nodes and put it into the Master’s <protector home>/runtime/remote trace collection/<time stamp directory>
--mini --node-name <node name> Collect data from the node name (can use CSV - no space) and put it into the Master’s <protector home>/runtime/remote trace collection/<time stamp directory>
--mini --all-nodes Collect data from all nodes and put it into the Master’s <protector home>/runtime/remote trace collection/<time stamp directory>
--full --node-name <node name> --output-dir <dir> Specify a Master collection directory (<dir> will be created on the Master)
--full --all-nodes --output-dir <dir> Specify a Master collection directory (<dir> will be created on the Master)
--mini --node-name <node name> -output-dir <dir> Specify a Master collection directory (<dir> will be created on the Master)
--mini --all-nodes -output-dir <dir> Specify a Master collection directory (<dir> will be created on the Master)
--full --node-name <node name> --split --no-md5 Collect data from the node name (can use CSV - no space) and put it into the Master’s <protector home>/runtime/remote trace collection/<time stamp directory> and split the zip into chunks. Don’t compute the MD5
--full --all-nodes –split --no-md5 Collect data from all nodes and put it into the Master’s <protector home>/runtime/remote trace collection/<time stamp directory> and split the zip into chunks. Don’t compute the MD5
--mini --node-name <node name> --split --no-md5 Collect data from the node name (can use CSV - no space) and put it into the Master’s <protector home>/runtime/remote trace collection/<time stamp directory> and split the zip into chunks. Don’t compute the MD5
--mini --all-nodes –split --no-md5 Collect data from all nodes and put it into the Master’s <protector home>/runtime/remote trace collection/<time stamp directory> and split the zip into chunks. Don’t compute the MD5
--full --node-name <node name> --tracename Collect data from the node name (can use CSV - no space) and put it into the Master’s <protector home>/runtime/remote trace collection/<time stamp directory> --tracename will get specific trace files and also works with wild cards. Case insensitive.
--full --node-name <node name> --traceage Collect data from the node name (can use CSV - no space) and put it into the Master’s <protector home>/runtime/remote trace collection/<time stamp directory> --traceage will get only trace up to n days old - ie --traceage 3 will collect that is between 0 days to 3 days old.
--full --node-name <node name> --nosnapshots Collect data from the node name (can use CSV - no space) and put it into the Master’s <protector home>/runtime/remote trace collection/<time stamp directory> --nosnapshots will disable snapshots when to collect data from nodes.
--restart --node-name <node name> Send to restart nodes - Note using option '--all-nodes' will also restart the Master as well.

Finally, the --verbose option can be appended to any of the above. It will obviously create a lot of output. To work with extra output a redirect can be used to send all the data into a file. Also, the data can be filtered as well with the following windows or Linux commands:

To send data to a file, use the redirect ‘>’:
customersupportcli
        --info --all-nodes > <file name> 
To filter out a pattern, use the:
  • Windows: |findstr <pattern>
    • customersupportcli --info --all-nodes |findstr <pattern>
  • Linux: |grep <pattern>
    • customersupportcli --info --all-nodes |grep <pattern>
  • PowerShell: |select-string <pattern>
    • customersupportcli --info --all-nodes | select-string <pattern>
Note: Always quote any arguments which have spaces, for example,

If setting a new trace directory on Windows to C:\Program Files\Hitachi\trace the command supportmanagercli --trace-dir C:\Program Files\Hitachi\trace will set the trace directory to C:\Program

Show all nodes:

supportmanagercli --show-nodes

OSHost nodes involved:

Docs-Client8

Docs-Client4

Docs-Client6

Docs-Proxy1

Docs-Client5

Docs-Proxy4

Docs-Client3

Docs-Proxy5

Docs-Proxy2

Docs-Client2

Docs-Proxy3

Docs-Master

Docs-Client1

OSHost Nodes:

Docs-Client2 (Type: Server, Virtual, Linux; Status: Authorized, Up; Version: 7.4.0.92768-R7.4)

Docs-Client1 (Type: Server, Virtual, Linux; Status: Authorized, Up; Version: 7.4.0.92768-R7.4)

Docs-Proxy3 (Type: Server, Virtual, Linux; Status: Authorized, Up; Version: 7.4.0.92768-R7.4)

Docs-Client3 (Type: Server, Virtual, Linux; Status: Authorized, Up; Version: 7.4.0.92768-R7.4)

Docs-Client4 (Type: Server, Virtual, Windows; Status: Authorized, Up; Version: 7.4.0.92768-R7.4)

Docs-Proxy1 (Type: Server, Virtual, Windows; Status: Authorized, Up; Version: 7.4.0.92768-R7.4)

Docs-Client5 (Type: Server, Virtual, Windows; Status: Authorized, Up; Version: 7.4.0.92768-R7.4)

Docs-Client8 (Type: Server, Virtual, Windows; Status: Authorized, Up; Version: 7.4.0.92768-R7.4)

Docs-Proxy5 (Type: Server, Virtual, Windows; Status: Authorized, Up; Version: 7.4.0.92768-R7.4)

Docs-Client6 (Type: Server, Server/Workstation, AIX; Status: Authorized, Up; Version: 7.4.0.92753-R7.4)

Docs-Proxy4 (Type: Server, Virtual, Linux; Status: Authorized, Up; Version: 7.4.0.92768-R7.4)

Docs-Master (Type: Server, Virtual, Windows; Status: Authorized, Up, Master; Version: 7.4.0.92768-R7.4)

Docs-Proxy2 (Type: Server, Virtual, Linux; Status: Authorized, Up; Version: 7.4.0.92768-R7.4)

Agentless Nodes:

Chesil (Type: HitachiBlockDevice; Status: Authorized, Up; Proxy/Host Node(s): Docs-Proxy5)

Docs-Gen1Repo1 (Type: Repository; Status: Authorized, Up; Proxy/Host Node(s): Docs-Proxy1)

Gen1OnDoc-client8 (Type: Repository; Status: Authorized, Up; Proxy/Host Node(s): Docs-Client8)

MyMasterRepo2 (Type: HBBRepository; Status: Authorized, Up; Proxy/Host Node(s): Docs-Master)

Conker (Type: HitachiBlockDevice; Status: Authorized, Up; Proxy/Host Node(s): Docs-Proxy4)

Docs-CloudScale1 (Type: HBBHCPCloudScale; Status: Authorized, Down; Proxy/Host Node(s): Docs-Proxy5)

MyMasterRepo (Type: HBBRepository; Status: Authorized, Up; Proxy/Host Node(s): Docs-Master)

Docs-Gen2Repo1 (Type: HBBRepository; Status: Authorized, Up; Proxy/Host Node(s): Docs-Proxy5)

Docs-HCP1 (Type: HBBHCP; Status: Authorized, Up; Proxy/Host Node(s): Docs-Proxy5)

Docs-HyperV1 (Type: HyperV; Status: Authorized, Up; Proxy/Host Node(s): Docs-Client5, Docs-Client5)

Docs-AWS1 (Type: HBBS3; Status: Authorized, Down; Proxy/Host Node(s): Docs-Proxy5)

Docs-SQL1 (Type: MSSQLSRV; Status: Authorized, Up; Proxy/Host Node(s): Docs-Client4, Docs-Client4)

Docs-VMware1 (Type: VMware; Status: Authorized, Up; Proxy/Host Node(s): Docs-Proxy1)

Retrieve the trace level from a single node:

This uses the windows ‘findstr’ to match the words “Hub Trace Level”

supportmanagercli --info --node-name Docs-Client4|findstr /c:"Hub Trace Level:"

[Docs-Client4]: Hub Trace Level: TraceAlways

Retrieve the trace level from a number of nodes: (use CSV no spaces)

supportmanagercli --info --node-name Docs-Client4,Docs-Proxy4 |findstr /c:"Hub Trace Level:"

[Docs-Proxy4]: Hub Trace Level: TraceAlways

[Docs-Client4]: Hub Trace Level: TraceAlways

Retrieve the trace level from all nodes:

supportmanagercli --info --all-nodes |findstr /c:"Hub Trace Level:"

[Docs-Proxy3]: Hub Trace Level: TraceAlways

[Docs-Client5]: Hub Trace Level: TraceAlways

[Docs-Proxy2]: Hub Trace Level: TraceAlways

[Docs-Client2]: Hub Trace Level: TraceAlways

[Docs-Client1]: Hub Trace Level: TraceAlways

[Docs-Master]: Hub Trace Level: TraceAlways

[Docs-Client6]: Hub Trace Level: TraceAlways

[Docs-Proxy5]: Hub Trace Level: TraceAlways

[Docs-Client3]: Hub Trace Level: TraceAlways

[Docs-Client8]: Hub Trace Level: TraceAlways

[Docs-Proxy1]: Hub Trace Level: TraceAlways

[Docs-Proxy4]: Hub Trace Level: TraceAlways

[Docs-Client4]: Hub Trace Level: TraceAlways

Set trace on a single node to TraceDebug

supportmanagercli --trace TraceDebug --node-name Docs-Proxy1

OSHost nodes involved:

Docs-Proxy1

[Docs-Proxy1]: Trace level for new processes set to TraceDebug

[Docs-Proxy1]: Trace level for running processes set to TraceDebug

[Docs-Proxy1]: Operation completed.

Operation completed on nodes:

Docs-Proxy1

Exiting...

Set trace on all nodes to TraceDebug

supportmanagercli --trace TraceDebug --all-nodes

OSHost nodes involved:

Docs-Proxy2

Docs-Client3

Docs-Proxy3

Docs-Master

Docs-Client8

Docs-Proxy4

Docs-Client1

Docs-Proxy5

Docs-Client2

Docs-Client5

Docs-Client6

Docs-Client4

Docs-Proxy1

[Docs-Proxy2]: Trace level for new processes set to TraceDebug

[Docs-Proxy2]: Trace level for running processes set to TraceDebug

[Docs-Proxy2]: Operation completed.

[Docs-Client3]: Trace level for new processes set to TraceDebug

[Docs-Client3]: Trace level for running processes set to TraceDebug

[Docs-Client3]: Operation completed.

[Docs-Proxy3]: Trace level for new processes set to TraceDebug

[Docs-Proxy3]: Trace level for running processes set to TraceDebug

[Docs-Proxy3]: Operation completed.

[Docs-Master]: Trace level for new processes set to TraceDebug

[Docs-Master]: Trace level for running processes set to TraceDebug

[Docs-Master]: Operation completed.

[Docs-Client8]: Trace level for new processes set to TraceDebug

[Docs-Client8]: Trace level for running processes set to TraceDebug

[Docs-Client8]: Operation completed.

[Docs-Proxy4]: Trace level for new processes set to TraceDebug

[Docs-Proxy4]: Trace level for running processes set to TraceDebug

[Docs-Proxy4]: Operation completed.

[Docs-Client1]: Trace level for new processes set to TraceDebug

[Docs-Client1]: Trace level for running processes set to TraceDebug

[Docs-Client1]: Operation completed.

[Docs-Proxy5]: Trace level for new processes set to TraceDebug

[Docs-Proxy5]: Trace level for running processes set to TraceDebug

[Docs-Proxy5]: Operation completed.

[Docs-Client2]: Trace level for new processes set to TraceDebug

[Docs-Client2]: Trace level for running processes set to TraceDebug

[Docs-Client2]: Operation completed.

[Docs-Client5]: Trace level for new processes set to TraceDebug

[Docs-Client5]: Trace level for running processes set to TraceDebug

[Docs-Client5]: Operation completed.

[Docs-Client6]: Trace level for new processes set to TraceDebug

[Docs-Client6]: Trace level for running processes set to TraceDebug

[Docs-Client6]: Operation completed.

[Docs-Client4]: Trace level for new processes set to TraceDebug

[Docs-Client4]: Trace level for running processes set to TraceDebug

[Docs-Client4]: Operation completed.

[Docs-Proxy1]: Trace level for new processes set to TraceDebug

[Docs-Proxy1]: Trace level for running processes set to TraceDebug

[Docs-Proxy1]: Operation completed.

Operation completed on nodes:

Docs-Master

Docs-Client8

Docs-Client5

Docs-Proxy3

Docs-Proxy1

Docs-Proxy2

Docs-Client2

Docs-Client4

Docs-Client3

Docs-Client1

Docs-Proxy4

Docs-Client6

Docs-Proxy5

Exiting...

And, to verify that all nodes are now set to TraceDebug:

supportmanagercli --info --all-nodes |findstr /c:"Hub Trace Level:"

[Docs-Client2]: Hub Trace Level: TraceDebug

[Docs-Client6]: Hub Trace Level: TraceDebug

[Docs-Client1]: Hub Trace Level: TraceDebug

[Docs-Client3]: Hub Trace Level: TraceDebug

[Docs-Proxy3]: Hub Trace Level: TraceDebug

[Docs-Client5]: Hub Trace Level: TraceDebug

[Docs-Proxy4]: Hub Trace Level: TraceDebug

[Docs-Proxy5]: Hub Trace Level: TraceDebug

[Docs-Proxy1]: Hub Trace Level: TraceDebug

[Docs-Client8]: Hub Trace Level: TraceDebug

[Docs-Proxy2]: Hub Trace Level: TraceDebug

[Docs-Client4]: Hub Trace Level: TraceDebug

[Docs-Master]: Hub Trace Level: TraceDebug