#include perfstatMan::perfstatMan(string version) { generatePerfstatMan(version); } void perfstatMan::generatePerfstatMan(string version) { vecManpage.push_back("\n"); vecManpage.push_back("NAME \n"); vecManpage.push_back(version); vecManpage.push_back(" Supported Converged ONTAP\n\n"); vecManpage.push_back("SYNOPSIS\n"); vecManpage.push_back("Perfstat is a performance diagnostic tool supplied and supported by NetApp.\n"); vecManpage.push_back("Usage: perfstat [OPTIONS] \n\n"); vecManpage.push_back("OPTIONS:\n"); vecManpage.push_back(printMan("-h", "--help", "To see a complete detailed usage")); vecManpage.push_back(printMan("-v", "--version", "Prints perfstat version, and")); vecManpage.push_back(printMan("", "", "supported ONTAP versions.")); vecManpage.push_back(printMan("-q", "--quiet", "Suppress all non-error messages")); vecManpage.push_back(printMan("", "--verbose", "Increase verbosity ")); vecManpage.push_back(printMan("", "", "(beware: prints all command executions)")); vecManpage.push_back(printMan("", "--debug", "Beware verbose output. Both 'verbose'")); vecManpage.push_back(printMan("", "", "and 'debug' will add client-side timestamps.")); vecManpage.push_back(printMan("", "--preset-file", "Use a different preset file.")); vecManpage.push_back(printMan("", "--print-preset", "Prints the internal preset file.")); vecManpage.push_back(printMan("-o", "--output-file", "Use a different output file name.")); vecManpage.push_back(printMan("", "", "(default: \"perfstat_data_yyyymmdd_hhmmss.zip\").")); vecManpage.push_back(printMan("", "--sshprivatekey-file", "SSH private key filename for perfstat user.")); //vecManpage.push_back(printMan("", "--sshdiagprivkey-file", "SSH private key filename for diag user.")); vecManpage.push_back(printMan("", "--sample-interval", "Specifies statit/sysstat frequency.")); vecManpage.push_back(printMan("", "--config-all", "captures config information in every iteration.")); vecManpage.push_back(printMan("", "", "(default: CONFIG info is captured only during \nthe first iteration).")); vecManpage.push_back(printMan("-t", "--time", "sample time in minutes, per iteration.")); vecManpage.push_back(printMan("", "", "(default: 2 minutes).")); vecManpage.push_back(printMan("-i", "--iteration=N[,M]", "repeat N times with M seconds between samples.")); vecManpage.push_back(printMan("", "", "(default: N=1, M=0)..")); vecManpage.push_back(printMan("-n", "--nodes=N1[,N2,N3,..]", "node names to collect from.")); vecManpage.push_back(printMan("", "", "(defaults to all nodes).")); vecManpage.push_back(printMan("", "--max-run-time", "Maximum Perfstat runtime in minutes.")); vecManpage.push_back(printMan("", "--full-stutter-statit", "Split entire time (-t)")); vecManpage.push_back(printMan("", "", "into all stutter statit collections.")); vecManpage.push_back(printMan("", "--no-stutter-statit", "Disable 'stuttered' statit commands.")); vecManpage.push_back(printMan("", "--enable-flag=PATTERN", "Enables data collection for specified flags.")); vecManpage.push_back(printMan("", "", "(default: All flags are disabled.")); vecManpage.push_back(printMan("", "", "Command with ! flag value will be executed).")); vecManpage.push_back(printMan("", "--unzip=FILE", "Unzips the specified file.")); vecManpage.push_back(printMan("", "--include=PATTERN", "Includes *only* commands matching ")); vecManpage.push_back(printMan("", "", "PATTERN, and excludes everything else.")); vecManpage.push_back(printMan("", "--exclude=PATTERN", "Excludes commands matching PATTERN,")); vecManpage.push_back(printMan("", "", "and includes everything else.")); vecManpage.push_back(printMan("-H", "--hosts=H1:username:passWord[,H2:userName:passWord,H3:passWord,..]", "Remote host names to collect from.")); vecManpage.push_back(printMan("-m", "--mode=[7-mode/cluster-mode/cluster/c]", " Specify the mode for the target filers (default: 7-mode).")); vecManpage.push_back(printMan("-z", "--FILER_ONLY", " Specify the flag to capture information from controller(s) only (default: Host and controller(s)")); vecManpage.push_back(printMan("-s", "--SSH", "How the 7-mode parallel commands should be executed, using SSH or RSH. (default: RSH)")); vecManpage.push_back(printMan("-r", "--MODULE_INST =ID1[ID2,ID3..]", "Capture RAS trace for the instances of pre-configured modules(default: instance-id 1)")); vecManpage.push_back(printMan("-p", "--PROFILES=[kahuna,flat,storage,(more)]", "Capture MP Domain profiles from filers")); vecManpage.push_back(printMan("-l", "--login", "controller login user in 7-mode [ default: root ]")); vecManpage.push_back(printMan("-a", "--app_name", "Name of the application for which data to be collected on host side.")); vecManpage.push_back(printMan("-w", "--app_args", "List of parameters for the application data collection on host side. ")); vecManpage.push_back(printMan("-S", "--switch", "Collect the data from target switches.The format should :::")); vecManpage.push_back(printMan("-k", "--SKTRACE_POINT", "Collect the sktrace for the modules. The format should be : (deafult: 'SK:7,WAFL:4'). The debug level should be in old data ONTAP7.x fashion")); vecManpage.push_back(printMan("-L", "--log", "Collect back up log information")); vecManpage.push_back(printMan("", "--LEGACY_MODE", "Collects output in Legacy Mode. This option work only for 7-mode. In Legacy mode, Systemshell and SKTrace data will not be collected.")); vecManpage.push_back(printMan("", "--diag-passwd", "diag (systemshell) password. Format should be for C-Mode. :,: for 7-Mode")); //burt 662532 "wafl_bufstats" need to be removed vecManpage.push_back(printMan("", "--wafl-bufstats", "Execute the \" wafl bufstats \" command.")); //663869 perfstat8 crashed: double free or corruption !prev: 0xd95504e8 vecManpage.push_back(printMan("", "--stats-format", "Parse stats stop command output")); vecManpage.push_back(printMan("", "--mcc", "Metro Cluster support")); vecManpage.push_back(printMan("", "--SSHKey-passPhrase", "SSHKey file password. Passpharse used to encrypt the private key file.")); vecManpage.push_back(printMan("", "--SSHKnownHosts-FilePath", "Option is vaild in-case OpenSSH flag set. Otherwise sliently Ignored. Deafult path to look into know_hosts file is sshprivatekey file path.")); vecManpage.push_back(printMan("-R", "--maxRetries", "Default Retries count are 100. Each Retry take around 3 seconds. Chang in maximum retries count increase the timeout with the controller. E.g. 100 retries take around 5 minutes(3*100 seconds) timeout with the controller.")); vecManpage.push_back(printMan("-C", "--Clean-Up", "Clean up output uncompressed directory from local host and perfstat user from controller.")); vecManpage.push_back(printMan("", "--vol_db", "Collect the waffi_id for each volume under each node.")); #ifndef WIN32 //vecManpage.push_back(printMan("", "--client-creds", "local host credentials for downloading log/profile/sktrace/rastrace files from controller. The Format should be :")); #else vecManpage.push_back(printMan("-g", "", "Collects data using OPENSSH")); #endif //Burt720131 vecManpage.push_back(printMan("", "--iter-wafl-cpstats", "Enable collection of multiple samples of \" wafl cpstats \" command output over the sampling period. ")); vecManpage.push_back(printMan("", "--ip-version=[4/6]", "Force use of specific IP version for node mgmt LIF discovery (useful if a node has both an ipv4 and ipv6 node mgmt LIF).")); vecManpage.push_back("\n"); vecManpage.push_back("OPTION DESCRIPTION\n"); vecManpage.push_back("1. --include=PATTERN/--exclude=PATTERN\n"); vecManpage.push_back("The include/exclude patterns consist of semicolon separated "); vecManpage.push_back("parameter tags, which match those from the preset file.\n"); vecManpage.push_back("The parameter tags themselves have comma separated values. "); vecManpage.push_back("Any definition lines in the preset file which match ANY\n"); vecManpage.push_back("parameter tag and value will be included or excluded from "); vecManpage.push_back("execution. include/exclude option may not be used together.\n"); vecManpage.push_back(" Here are a few examples:\n"); vecManpage.push_back("\n"); vecManpage.push_back(" a. --exclude=\"SHELL=SYSTEMSHELL\"\n"); vecManpage.push_back(" With this option perfstat will not execute any systemshell commands.\n"); vecManpage.push_back(" b. --include=\"TYPE=PERF\"\n"); vecManpage.push_back(" With this option perfstat will only execute commands with TYPE as \"PERF\".\n\n"); vecManpage.push_back("2. --enable-flag=PATTERN\n"); vecManpage.push_back("The enable-flag pattern consist of comma separated flag names, "); vecManpage.push_back("which match those from the preset file.\n Any definition lines in "); vecManpage.push_back("the preset file which match ANY flag value will be enabled and "); vecManpage.push_back("added for execution.\n"); vecManpage.push_back("Here are a few examples:\n\n"); vecManpage.push_back(" a. --enable-flag=\"snapmirror,wafl\""); vecManpage.push_back(" With this option perfstat will enable \"snapmirror\" and \"wafl\" flags. Command with \"snappmirror\" and\n"); vecManpage.push_back(" \"wafl\" flag will be executed. Command with \"!snappmirror\" and \"!wafl\" flag will be excluded.\n\n"); vecManpage.push_back("3. --diag-password\n"); vecManpage.push_back("With this option, user doesn't need to input the systemShell password during perfstat run.\n"); vecManpage.push_back("As all the nodes in the cluster will be having same systemShell password, provide only the systemShell password of a single node in case of C-Mode\n"); vecManpage.push_back("In case of 7-Mode, the node ip and its respective systemShell password should be provided. \n"); #ifndef WIN32 /* vecManpage.push_back("4. --client-creds\n"); vecManpage.push_back("Needed to collect Log/Rastrace/Profile/Sktrace triggered files from the node.\n"); */ #endif vecManpage.push_back("Note: Patterns matching will not be case sensitive. \n\n"); //vecManpage.push_back("EXAMPLE\n"); #ifdef WIN32 vecManpage.push_back("EXAMPLES FOR C-MODE\n\n"); //Burt:627018 example updated vecManpage.push_back("%perfstat8.exe 10.10.2.10 --mode=\"cluster-mode\" \n"); vecManpage.push_back("%perfstat8.exe 10.10.2.10 --mode=\"cluster\" \n"); vecManpage.push_back("%perfstat8.exe 10.10.2.10 --mode=\"c\" \n"); vecManpage.push_back("This command runs perfstat with 1 iterations. Here IP address \"10.10.2.10\" is a cluster-management IP address of the cluster. \n\n"); vecManpage.push_back("%perfstat8.exe -i 5,10 --verbose 10.10.2.10 --mode=\"cluster-mode\" \n"); vecManpage.push_back("This command runs perfstat with 5 iterations, waiting 10 seconds between each iteration. \n"); vecManpage.push_back("Here IP address \"10.10.2.10\" is a cluster-management IP address of the cluster.\n\n"); vecManpage.push_back("%perfstat8.exe 10.10.2.10 -a \"oracle\" -w \"runas=someDbaUser,sysdba=true\" --mode=\"cluster-mode\" \n"); vecManpage.push_back("This command runs perfstat with default preset file and also collects the host side data along with the oracle AWR report. \n"); vecManpage.push_back("Here 'someDbaUser' is a pre-existing DBA user. The another option for oracle params is '-w \"oracle_login=testUser/testUser123\" ' \n\n"); vecManpage.push_back("%perfstat8.exe -i 5,10 --verbose 10.10.2.10 --enable-flag=snapmirror --mode=\"cluster-mode\" \n"); vecManpage.push_back("This command enables \"snapmirror\" flag in preset file and runs perfstat with 5 iterations, waiting 10 seconds between each iteration. \n"); vecManpage.push_back("Here IP address \"10.10.2.10\" is a cluster-management IP address of the cluster.\n\n"); vecManpage.push_back("Example to provide systemShell password at command Line.\n"); vecManpage.push_back("%perfstat8.exe -i 5,10 --verbose 10.10.2.10 --diag-passwd=abcxyz --mode=\"cluster-mode\" \n"); vecManpage.push_back("This command runs perfstat with 5 iterations. Here IP address \"10.10.2.10\" is a cluster-management IP address of the cluster. \n"); vecManpage.push_back("And \"abcxyz\" is the systemShell password.\n\n"); vecManpage.push_back("%perfstat8.exe --verbose --nodes=10.10.2.10,10.10.2.11,10.10.2.12 --diag-passwd=abcxyz --mode=\"cluster-mode\" \n"); vecManpage.push_back("This command runs perfstat with 1 iteration. Here IP address \"10.10.2.10\", \"10.10.2.11\", \"10.10.2.12\" are the address of node-management IP in the cluster. \n"); vecManpage.push_back("\"abcxyz\" is the systemShell password.\n\n"); vecManpage.push_back("EXAMPLES FOR 7-MODE\n\n"); vecManpage.push_back("%perfstat8.exe --nodes=10.72.57.222 --mode=\"7-mode\" \n"); vecManpage.push_back("%perfstat8.exe --nodes=10.72.57.222 \n"); vecManpage.push_back("This command runs perfstat with 1 iterations. Here \"10.72.57.222\" is the node-management IP for a 7-mode controller. \n\n"); vecManpage.push_back("%perfstat8.exe -i 5,10 --verbose --nodes=10.72.57.222 --mode=\"7-mode\" \n"); vecManpage.push_back("This command runs perfstat with 5 iterations, waiting 10 seconds between each iteration. \n"); vecManpage.push_back("Here \"10.72.57.222\" is the node-management IP for a 7-mode controller. \n\n"); vecManpage.push_back("%perfstat8.exe --verbose --nodes=10.72.57.222 --mode=\"7-mode\" -a \"oracle\" -w \"runas=someDbaUser,sysdba=true\" \n"); vecManpage.push_back("This command runs perfstat with default preset file and also collects the host side data along with the oracle AWR report. \n"); vecManpage.push_back("Here 'someDbaUser' is a pre-existing DBA user. The another option for oracle params is '-w \"oracle_login=testUser/testUser123\" ' \n\n"); vecManpage.push_back("%perfstat8.exe -i 5,10 --verbose --nodes=10.72.57.222 --mode=\"7-mode\" --enable-flag=snapmirror\n"); vecManpage.push_back("This command enables \"snapmirror\" flag in preset file and runs perfstat with 5 iterations, waiting 10 seconds between each iteration. \n\n"); vecManpage.push_back("Example to provide systemShell password at command Line.\n"); vecManpage.push_back("%perfstat8.exe --verbose --nodes=10.10.2.10,10.10.2.11,10.10.2.12 --mode=\"7-mode\" --diag-passwd=10.10.2.10:abcxyz1,10.10.2.11:abcxyz2,10.10.2.12:abcxyz3 \n"); vecManpage.push_back("This command runs perfstat with 1 iteration. Here IP address \"10.10.2.10\", \"10.10.2.11\", \"10.10.2.12\" are the address of the respective nodes. \n"); vecManpage.push_back("\"abcxyz1\", \"abcxyz2\", \"abcxyz3\" are the systemShell passwords of the respective nodes.\n\n"); vecManpage.push_back("Example to show the usage of LEGACY MODE.\n"); vecManpage.push_back("%perfstat8.exe --verbose --nodes=10.10.2.10 --mode=\"7-mode\" --LEGACY_MODE\n"); vecManpage.push_back("This command runs perfstat in Legacy Mode with 1 iteration. Here IP address \"10.10.2.10\", is the address of the node. \n"); vecManpage.push_back("Example to show the usage of -g option in LEGACY MODE.\n"); vecManpage.push_back("%perfstat8.exe --verbose --nodes=10.10.2.10 --mode=\"7-mode\" -g --sshprivatekey-file= --LEGACY_MODE\n"); vecManpage.push_back("This command runs perfstat in Legacy Mode with 1 iteration. Here IP address \"10.10.2.10\", is the address of the node-management IP and sshPrivateKeyFile is the name of the sshprivate key.\n"); vecManpage.push_back("Note: System shell account for \"diag\" user needs to be setup before running perfstat with system shell commands.\n\n"); #else vecManpage.push_back("EXAMPLES FOR C-MODE\n\n"); //Burt:627018 example updated vecManpage.push_back("%perfstat8 10.10.2.10 --mode=\"cluster-mode\" \n"); vecManpage.push_back("%perfstat8 10.10.2.10 --mode=\"cluster\" \n"); vecManpage.push_back("%perfstat8 10.10.2.10 --mode=\"c\" \n"); vecManpage.push_back("This command runs perfstat with 1 iterations. Here IP address \"10.10.2.10\" is a cluster-management IP address of the cluster. \n\n"); vecManpage.push_back("%perfstat8 -i 5,10 --verbose 10.10.2.10 --mode=\"cluster-mode\" \n"); vecManpage.push_back("This command runs perfstat with 5 iterations, waiting 10 seconds between each iteration. \n"); vecManpage.push_back("Here IP address \"10.10.2.10\" is a cluster-management IP address of the cluster.\n\n"); vecManpage.push_back("%perfstat8 10.10.2.10 -a \"oracle\" -w \"runas=someDbaUser,sysdba=true\" --mode=\"cluster-mode\" \n"); vecManpage.push_back("This command runs perfstat with default preset file and also collects the host side data along with the oracle AWR report. \n"); vecManpage.push_back("Here 'someDbaUser' is a pre-existing DBA user. The another option for oracle params is '-w \"oracle_login=testUser/testUser123\" ' \n\n"); vecManpage.push_back("%perfstat8 -i 5,10 --verbose 10.10.2.10 --enable-flag=snapmirror --mode=\"cluster-mode\" \n"); vecManpage.push_back("This command enables \"snapmirror\" flag in preset file and runs perfstat with 5 iterations, waiting 10 seconds between each iteration. \n"); vecManpage.push_back("Here IP address \"10.10.2.10\" is a cluster-management IP address of the cluster.\n\n"); vecManpage.push_back("Example to provide systemShell password at command Line.\n"); vecManpage.push_back("%perfstat8 -i 5,10 --verbose 10.10.2.10 --diag-passwd=abcxyz --mode=\"cluster-mode\" \n"); vecManpage.push_back("This command runs perfstat with 5 iterations. Here IP address \"10.10.2.10\" is a cluster-management IP address of the cluster. \n"); vecManpage.push_back("And \"abcxyz\" is the systemShell password.\n\n"); vecManpage.push_back("%perfstat8 --verbose --nodes=10.10.2.10,10.10.2.11,10.10.2.12 --diag-passwd=abcxyz --mode=\"cluster-mode\" \n"); vecManpage.push_back("This command runs perfstat with 1 iteration. Here IP address \"10.10.2.10\", \"10.10.2.11\", \"10.10.2.12\" are the address of a nodes in the cluster. \n"); vecManpage.push_back("\"abcxyz\" is the systemShell password.\n\n"); vecManpage.push_back("%perfstat8 --verbose --nodes=10.10.2.10,10.10.2.11,10.10.2.12 --client-creds=root:xyzabc --PROFILES=kahuna,flat --MODULE_INST=1 --mode=\"cluster-mode\" \n"); vecManpage.push_back("This command runs perfstat with 1 iteration. Here IP address \"10.10.2.10\", \"10.10.2.11\", \"10.10.2.12\" are the address of a node-management in the cluster. \n"); vecManpage.push_back("\"root\" and \"xyzabc\" are the username and password of the local host.\n\n"); vecManpage.push_back("EXAMPLES FOR 7-MODE\n\n"); vecManpage.push_back("%perfstat8 --nodes=10.72.57.222 --mode=\"7-mode\" \n"); vecManpage.push_back("%perfstat8 --nodes=10.72.57.222 \n"); vecManpage.push_back("This command runs perfstat with 1 iterations. Here \"10.72.57.222\" is the node-management IP for a 7-mode controller. \n\n"); vecManpage.push_back("%perfstat8 -i 5,10 --verbose --nodes=10.72.57.222 --mode=\"7-mode\" \n"); vecManpage.push_back("This command runs perfstat with 5 iterations, waiting 10 seconds between each iteration. \n\n"); vecManpage.push_back("%perfstat8 -i 5,10 --verbose --nodes=10.72.57.222 --mode=\"7-mode\" --enable-flag=snapmirror\n"); vecManpage.push_back("This command enables \"snapmirror\" flag in preset file and runs perfstat with 5 iterations, waiting 10 seconds between each iteration. \n\n"); vecManpage.push_back("%perfstat8 --verbose --nodes=10.72.57.222 --mode=\"7-mode\" -a \"oracle\" -w \"runas=someDbaUser,sysdba=true\" \n"); vecManpage.push_back("This command runs perfstat with default preset file and also collects the host side data along with the oracle AWR report. \n"); vecManpage.push_back("Here 'someDbaUser' is a pre-existing DBA user. The another option for oracle params is '-w \"oracle_login=testUser/testUser123\" ' \n\n"); vecManpage.push_back("Example to provide systemShell password at command Line.\n"); vecManpage.push_back("%perfstat8 --verbose --nodes=10.10.2.10,10.10.2.11,10.10.2.12 --mode=\"7-mode\" --diag-passwd=10.10.2.10:abcxyz1,10.10.2.11:abcxyz2,10.10.2.12:abcxyz3 \n"); vecManpage.push_back("This command runs perfstat with 1 iteration. Here IP address \"10.10.2.10\", \"10.10.2.11\", \"10.10.2.12\" are the address of the respective nodes. \n"); vecManpage.push_back("\"abcxyz1\", \"abcxyz2\", \"abcxyz3\" are the systemShell passwords of the respective nodes.\n\n"); vecManpage.push_back("%perfstat8 --verbose --nodes=10.10.2.10 --mode=\"7-mode\" --PROFILES=kahuna\n"); vecManpage.push_back("This command runs perfstat with 1 iteration. Here IP address \"10.10.2.10\" is the address of the node. \n"); vecManpage.push_back("Example to show the usage of LEGACY MODE.\n"); vecManpage.push_back("%perfstat8 --verbose --nodes=10.10.2.10 --mode=\"7-mode\" --LEGACY_MODE\n"); vecManpage.push_back("This command runs perfstat in Legacy Mode with 1 iteration. Here IP address \"10.10.2.10\", is the address of the node. \n"); vecManpage.push_back("Note: System shell account for \"diag\" user needs to be setup before running perfstat with system shell commands.\n\n"); #endif vecManpage.push_back("Note: Converged perfstat does not accept empty password\n"); vecManpage.push_back("COPYRIGHT\n"); vecManpage.push_back("Copyright 2009, NetApp All Rights Reserved.\n"); } string perfstatMan::printMan(string column1, string column2, string column3) { int Column1Len = 8; int Column2Len = 22; string data; data.append(column1); int spaceLen = Column1Len - (int)column1.length(); for(int i=0; i perfstatMan::getPerfstatMan() { return vecManpage; }