NetApp – Performance and Statistics Collector (PerfStats)

NetApp – Performance and Statistics Collector (PerfStats) – version 7

Command Line Parameters

-f

[-f controllername[,controllername1,controllername2,...]]
  • name of the filer

 

-t

 [-t time] (sample time per iteration, default 2)
  • Duration of each iteration in minutes

-i,m

[-i n[,m]] (repeat n times with m minutes between samples, 
                     defaults: n=1,m=0)
  • Number of Iterations and wait time between iterations
  • Make sure that there are no spaces between the two numbers
  • Default values for i is 1, and m is 0 –> That is the default is 1 iteration and no wait time

-l

 [-l login[:password]] (rsh/ssh login and password for rsh only)
  • Login Account to connect to Filer

-S pw:

[-S pw:|kf:]

Processing Steps:

Versioning

  • The version is stated
  • In our case, the information stated is “PerfStat v7.38 (10-2012)”

Begin Iteration <Iteration>

  • Indicates the beginning of the Iteration
  • In our case, the information stated is “Begin Iteration <nth> 


Checking filer <filer>

  • Checking filer …. Establishes a connection with the filer noted
  • In our case, the information stated is “Checking filer filerHR


Prestats on <filer>; OS: ONTAP<version>

  • This step connects to the Filer and kicks off statistics gathering on the Filer
  • In our case, the information stated is “Prestats on  filerHR; OS: ONTAP8.0.2 


Sleep for <performance duration> minute(s)…

  • Once performance gathering is initiated on the Filer, this step waits for the iteration duration
  • In our case, the information stated is “Sleep for 2 minutes”


Poststats on <filer>; OS: ONTAP<version>

  • This step connects to the Filer and “concludes” statistics gathering on the Filer
  • In our case, the information stated is “Poststats on  filerHR; OS: ONTAP8.0.2 


End Iteration <Iteration>

  • Indicates the completion of the Iteration
  • In our case, the information stated is “Poststats on  End Iteration <nth> 

 


Sleep <n> seconds

  • This indicates how long to wait between iterations
  • In our case, the information stated is “Sleeping 60 seconds”

Sample Code (baseline):



If not exist perfData mkdir perfData

for /F "tokens=2,3,4 delims=/ " %%i in ('date/t') do set y=%%k
for /F "tokens=2,3,4 delims=/ " %%i in ('date/t') do set d=%%k%%i%%j
for /F "tokens=5-8 delims=:. " %%i in ('echo.^| time ^| find "current" ') do set t=%%i%%j
set t=%t%_
if "%t:~3,1%"=="_" set t=0%t%
set t=%t:~0,4%
rem set "theFilename=%d%%t%"
set "fname=perfData\%1__%d%%t%.perfdata"
echo %fname%

Time /T

perfstat -f %1 -t 2 -i 4,1 -l root  -S pw:rootpwd > %fname%

Time /T

Sample invokation:



  Syntax:

     getNetAppFilePerData 

  Sample:

    getNetAppFilerPerfData filerHR

Output:

PerfStats - Output - 20130301

References:

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s