Converged Perfstat is a useful diagnostics data collection tool for Clustered Data ONTAP and Data ONTAP running in 7-mode. The latest version, perfstat8_20130314_1964919_*, can be downloaded from NOW.netapp.com (see Fig. 1)
Figure 1. Downloading Converged Perfstat from now.netapp.com
From Figure 1 you can see that the Converged Perfstat not only supports Linux/Unix and Windows, but also Mac OS. In this blog post, we will use the Windows flavor to do our demonstration. So, I simply download Perfstat8_20130314_1964919_Windows.zip to a Windows host. Unzip it, and copy perfstat8.exe to a local directory. For instance, I copied it to c:\weiliu\perfstat8.
In the example below, we’ll use Converged Perfstat to collect data on an ONTAP cluster. By default, Converged Perfstat will prompt you to type in the password of the admin account for authentication. However, it should not require the admin role for the purpose of stats collection. Fortunately, there is a way to bypass this step and I’ll show you how to do that. In fact, we’ll go one step further and bypass all password prompts to make it easy for automation.
In order to accomplish everything stated in the above paragraph, we need to do some preparations on both the Windows host and the ONTAP cluster.
Prep Windows host
The Windows flavor of Converged Perfstat has a dependency on the plink tool. We also need an SSH key generation tool. In this example, we use puttygen.
Step 1. Download plink.exe and puttygen.exe from here [http://www.chiark.greenend.org.uk/~sgtatham/putty/
Step 2. Open a Command Prompt box, cd to c:\weiliu\perfstat8. Then, run plink.exe as shown in Figure 2. Answer “y”, and type in the proper password (see Fig. 2)
Figure 2. Using plink for the first time
The first time you run plink.exe, it may fail as shown in Figure 2. That’s OK, because the ONTAP cluster’s RSA2 key has not been cached in the Windows host’s registry. Restart the Windows host to update the registry. When the Windows host is back online, rerun plink.exe. And this time the command should be successful, as shown in Figure 3.
Figure 3. Using plink the second time and successfully
Step 3. Run puttygen to generate a pub/priv key pair. First, double click on puttygen.exe to run the tool (see Fig. 4); ensure the SSH-2 RSA radio button is selected. Then, click the Generate button.
Figure 4. Using puttygen to generate pub/priv key pair
When the pub/priv key pair is generated, leave the Key passphrase black, and click the Save private key button (see Fig. 5). And save the private key to a location on the Windows host. In this example, I saved it to c:\weiliu\perfstat8\sshkey\perfstat_privkey.ppk.
Figure 5. Saving private key
For now, leave the puttygen tool there, as we will need the pub key info (the highlighted text) later on.
Prep ONTAP cluster
When using the SSH public key authentication method, Converged Perfstat will use a user called perfstat with its publickey property configured. Also, in order to allow Converged Perfstat to access the System Shell, the diag account needs to be unlocked.
Step 4. Create the perfstat user and configure its publickey property. From your Clustered ONTAP admin console, use the following commands as shown in Figure 6.
Figure 6. Creating the perfstat user account and configure its public key
Figure 6 also shows how to verify the public key, by using the security login publickey show command.
Step 5. Unlock diag account and set password. From your Clustered ONTAP admin console, use the following commands to unlock and verify (see Fig. 7).
Figure 7. Unlocking the diag account and verify
And use the following command to set password for the diag account (see Fig. 8)
Figure 8. Setting password for diag
Note, the password must be at least 8 characters long, and must have both letters and numbers.
Run Converged Perfstat
Now, we are ready to run Converged Perfstat on a Windows host.
Step 6. Open a command prompt and just run the following command (see Fig. 9):
Perfstat8 <IP addr> -z –-mode=c –-sshprivatekey-file=”c:\weiliu\perfstat8\sshkey\p
Where, the <IP addr> is the cluster-management IP address. “-z” means to collect stats on cluster nodes only. "--mode=c" means to collect stats on cluster nodes. “—sshprivatekey-file” specifies the location of the private key generated in Step 3. And the option “—diag-passwd” allows you to specify the password of the diag account here and avoid the input prompt.
Figure 9. Running Converged Perfstat on a Windows host
The output file is located in the same directory where perfstat8.exe resides. The file name is perfstat_yyyymmdd_hhmmss.zip. Figure 10 below shows an example of the output file.
Figure 10. Converged Perfstat output file
Step 7. Upload the Output to LatX. This step is quite straightforward. You can directly upload the Converged Perfstat output zip file to LatX website for inspecting and analysis; just as you would with the output files from previous generation of perfstat.
Thanks for reading.