Community

Converged Perfstat and Clustered ONTAP

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/download.html]. And copy plink.exe to the directory where perfstat8.exe is located (e.g., c:\weiliu\perfstat8 in this example).

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\perfstat_privkey.ppk” –-diag-passwd “myPassw0rd”

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.

 

Comments
on ‎2013-07-07 11:37 AM

Hi Wei,

Thank you for the writing!

Got chance to try your steps at Linux today, it works for the most parts.

1. I had to hit "enter" hit at the below prompt, otherwise it would not go further.

      [07-07-2013 14:32:06]   INPUT   Enter passphrase for SSH key:  <- Hit enter key.

2. I see below message when I run the cli, what does it mean? need to fix it?

       Unable to log in console.log file

Thanks

Glen

on ‎2013-07-07 11:40 AM

Hi Wei,

One more thing, I can't get perfstat8 working against 7-mode, so I use perfstat7 instead.

Are you able to get perfstat8 work with 7-mode?

Thanks

Glen

lwei Former NetApp Employee on ‎2013-07-07 02:12 PM

Hi Glen,

The steps in this post are tested and works for Windows only. Linux flavor is slightly different. I have not tried it. But I believe the release_notes.txt has some discussions about Linux...

Thanks,

Wei

lwei Former NetApp Employee on ‎2013-07-07 02:14 PM

Hi Glen,

I think the perfstat8 should work with 7-mode. I'll try it and let you know.

Thanks,

Wei

on ‎2013-07-07 02:18 PM

Hi Wei,

The steps for c-mode is good enough for me, no worries to test at Linux.

Thanks

Glen

lwei Former NetApp Employee on ‎2013-07-10 09:11 PM

These days a 7-mode filer is hard to get. Sorry, I won't be able to try it against 7-mode.   -Wei

NetApp Employee on ‎2013-08-13 07:22 PM

Hi Wei,

I met same problem with Glen Yu, but I'm running at windows plantform. I've tried win7 and 2008R2, got the same problem. I've to press Enter to move forward while the  "INPUT   Enter passphrase for SSH key:" prompted. this is the lastest problem to integrate perfstat into DFM for automation of performance data collection.

Would be appreciate if you can help .

lwei Former NetApp Employee on ‎2013-08-13 07:53 PM

Hi Dan,

The work-around that worked for me is that after typing the perfstat8 command line, hit the Enter key TWICE. I do not guarantee it 100%. But it seems that the second "Enter" will be queued to answer the prompt "INPUT Enter passphrase for SSH key:". Please give it a try.

Thanks,

Wei

NetApp Employee on ‎2013-08-13 08:41 PM

Wei,

Thanks for your reply, I’d like put this command line to a bat
file, so that dfm could call the bat file to collect performance data
automatically. Do you mean hit some enter key following the command line in a bat file? seems
it doesn’t work

lwei Former NetApp Employee on ‎2013-08-14 12:56 PM

Hi Dan,

I don't have a ready-made solution for that yet. Sorry. I think something like SendKeys() might work. Perhaps the most natural way is for perfstat8 to provide a command line switch to accept the SSH key... I'll ask around.

Thanks,

Wei

NetApp Employee on ‎2013-10-30 06:04 PM

This bug will get fixed with the fix from this bug report:

http://support.netapp.com/NOW/cgi-bin/bol?Type=Detail&Display=696005

NetApp Employee on ‎2013-10-30 06:05 PM

The command set is a little different when you run against a 7-mode system.  If you are using Windows, I put together a GUI to handle it for you.  It is here:  https://communities.netapp.com/docs/DOC-28000

lwei Former NetApp Employee on ‎2013-10-31 07:48 AM

Great job! And thanks for the info.   -Wei