Currently Being Moderated

Data ONTAP PowerShell Toolkit - Collect SYSSTAT type of information in CSV format

As part of performance monitoring and analysis collecting performance data is crucial. Even though historical data could be collected with other monitoring tools we are often using SYSSTAT command to collect such data during short period of time of specific activity to analyze performance of NetApp array. Raw output of SYSSTAT command is useful but in some cases it needs to be presented in more visual form such graphs and charts. Producing Comma-Separated-Values file from SYSSTAT command output is long and painful process.

 

Working with customer on performance analysis made me to develop PowerShell script which can capture such data in CSV format, so that data can be processed much faster and presented to customer in nice graphical format.

 

Script Get-NaSysStat.ps1 uses Get-NaPerfCounter and Get-NaPerfData commandlets to extract performance data of NetApp array and store them into CSV file. Script uses next parameters:

 

  NaIP       : IP address or Name of the Filer
  NaUS      : Filer User Name. Default Value - root
  NaPW     : Filer User's Password. Default Value - password.
  Output     : Display/<File Name or Path>. Default Value - Display
  Interval     : Interval in minutes between samples. Default Value - 5 min.
  Iterations  : Number of sample iterations.
               Default Value - 0, for no limit.
               Execution can be ended by pressing Ctrl-C

 

Example of calling script and screen output:

 

PS C:\@work\Scripts> .\Get-NaSysStat.ps1 -NaIP 10.58.97.11 -NaUS root -NaPW <password> -Output Perf.csv -Interval 1

Name                                 Value
----                                     -----
Time                                  4/7/2011 4:37:03 PM
system_model                    FAS6070
ontap_version                     NetApp Release 8.0.1RC2 7-Mode: Thu Oct 21 01:27:45 PDT 2010
serial_no                            ***
system_id                          ***

hostname                           Array-01
nfs_ops                              0.00
cifs_ops                             0.00
http_ops                             0.00
fcp_ops                              8.50
iscsi_ops                           0.00
read_ops                           0.00
sys_read_latency               0.00
write_ops                           8.50
sys_write_latency               0.32
total_ops                            8.50
sys_avg_latency                 0.32
net_data_recv                     2.20
net_data_sent                    9.25
disk_data_read                  169.61
disk_data_written               584.21
cpu_busy                          2.12
avg_processor_busy          1.49
total_processor_busy         5.98
num_processors                4
*********************************************************************

 

Screen output is valuable part but parameter -Output tells script to save data into CSV file. Here is an example of CSV files:

 

Time, avg_processor_busy, cifs_ops, cpu_busy, disk_data_read, disk_data_written, fcp_ops, hostname, http_ops, iscsi_ops, net_data_recv, net_data_sent, nfs_ops, num_processors, ontap_version, read_ops, serial_no, sys_avg_latency, sys_read_latency, sys_write_latency, system_id, system_model, total_ops, total_processor_busy, write_ops,
3/28/2011 5:32:25 PM, 3.17, 0.00, 17.30, 6773.59, 21667.06, 1031.74, BP-SAN-04, 0.00, 0.00, 17.41, 284.66, 0.00, 12, NetApp Release 8.0.1 7-Mode: Wed Jan  5 17:23:51 PST 2011, 558.10, 700000501660, 0.83, 0.89, 0.75, 1873760944, FAS6280, 1031.54, 37.98, 473.44,
3/28/2011 5:33:26 PM, 2.07, 0.00, 10.88, 8511.15, 16221.77, 869.91, BP-SAN-04, 0.00, 0.00, 6.29, 91.75, 0.00, 12, NetApp Release 8.0.1 7-Mode: Wed Jan  5 17:23:51 PST 2011, 656.24, 700000501660, 0.80, 0.79, 0.84, 1873760944, FAS6280, 869.70, 24.89, 213.46,
3/28/2011 5:34:27 PM, 0.83, 0.00, 3.59, 3311.89, 5268.20, 131.53, BP-SAN-04, 0.00, 0.00, 1.84, 9.72, 0.00, 12, NetApp Release 8.0.1 7-Mode: Wed Jan  5 17:23:51 PST 2011, 50.07, 700000501660, 0.81, 1.05, 0.65, 1873760944, FAS6280, 131.35, 10.00, 81.28,
3/28/2011 5:35:28 PM, 1.66, 1.70, 10.61, 2518.90, 3812.95, 241.06, BP-SAN-04, 0.00, 0.00, 12.41, 25.53, 0.00, 12, NetApp Release 8.0.1 7-Mode: Wed Jan  5

 

Performance data is exported into Microsoft Excel for further analysis and nice performance graphs created within minutes:

 

Perf.png

 

Script is attached to this post.

Comments

Delete Document

Are you sure you want to delete this document?