Subscribe
Accepted Solution

SMcli for performance data collections

I'm trying to use SMcli for performance data collections.  We have an e5460 serving luns to a v-series cluster. 

 

What I've done so far:

smcli 10.99.5.41 -c "set session performanceMonitorInterval=5;"

smcli 10.99.5.41 -c "set session performanceMonitorIterations=100;"

 

All went well until to this point.  I can't figure out how to get the save going.  It rejects everything I try with this error specifying the first character after file="

 

c:\Program Files (x86)\StorageManager\client>smcli 10.99.5.41 -c "save storageArray performanceStats file="C:\logs\joe.csv" ;"
Performing syntax check...

Encountered "C" at line 1, column 55.
Was expecting:
    <STRING_LITERAL> ...


SMcli failed.

 

Thanks,

joe

Re: SMcli for performance data collections

When trying to save files through the SMcli on Windows, you have to use \ in front of the beginning and ending double quote marks ( " ) around the path.  You also had an extra space between the quot mark and the semi-colon.

 

The command you are issuing should be:

 

c:\Program Files (x86)\StorageManager\client>smcli 10.99.5.41 -c "save storageArray performanceStats file=\"C:\logs\joe.csv\";"

 

Hope that helps.

 

Jason

Re: SMcli for performance data collections

Thanks Jason.  That did work. 

 

When I look at the joe.csv it has one data sample in it...  I was expecting 100 x 5 second interal data samples.  Any clue what I need to do for that? 

 

The end goal is to have scheduled jobs run each hour collecting an hours worth of data into a new log file 24X7.

 

I'll try putting the set commands in the same command line as the save command.... 

 

Thanks,

Joe

 

Re: SMcli for performance data collections

This did the trick...

 

 

c:\logs>"c:\Program Files (x86)\StorageManager\client\smcli" 10.99.5.41 -c "set session performanceMonitorInterval=5;set session performanceMonitorIterations=100;save storageArray performanceStats file=\"C:\logs\joe.csv\";"

 

I attached the file it produced.  This is a lab array so it's pretty idle.

 

Thanks again Jason!

 

Joe

Re: SMcli for performance data collections

I have a crude script ready for task scheduler.  Below is the contents of my script.

 

 

######   begin bat script ######

For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b)
For /f "tokens=1-2 delims=/:" %%a in ("%TIME%") do (set mytime=%%a%%b)
set mytime=%mytime: =0%

set Logname="c:\logs\e-series_%mydate%_%mytime%.csv"
rem Echo.  >>%Logname% 2>>&1
rem Echo.=================== >>%Logname% 2>>&1


"c:\Program Files (x86)\StorageManager\client\smcli" 10.99.5.41 -c "set session performanceMonitorInterval=5;set session performanceMonitorIterations=3600;save storageArray performanceStats file=\"%LogName%\";"

 

####### end bat script ######

 

Produces a command like this:


c:\scripts>"c:\Program Files (x86)\StorageManager\client\smcli" 10.99.5.41 -c "set session performanceMonitorInterval=5;set session performanceMonitorIterations=3600;save storageArray performanceStats file=\""c:\logs\e-series_2015-01-29_2025.csv"\";"

So I get a unique file name indicating the time the command started.  windows task scheduler runs daily, weekly or monthly.  I'll likely duplicate the script contents 4 times in the script  so I can get 24 hrs of collections.  Testing a single run with 3600 from task scheduler tonight.....   then I'll do the necessary tweeks to Iterations so I can get a 24hr collection of data from one script.  

 

 

Joe    

 

 

Re: SMcli for performance data collections

My testing is complete.  I've set an hourly task in task scheduler to collect array performance.  The iterations of 3600 failed to produce a file with data.....   Using 600 produces just under a 1hr file so I'll use that for now and increase the iterations as necessary to get a complete hour.

 

######   begin bat script ######

For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b)
For /f "tokens=1-2 delims=/:" %%a in ("%TIME%") do (set mytime=%%a%%b)
set mytime=%mytime: =0%

set Logname="c:\logs\e-series_%mydate%_%mytime%.csv"
rem Echo.  >>%Logname% 2>>&1
rem Echo.=================== >>%Logname% 2>>&1


"c:\Program Files (x86)\StorageManager\client\smcli" 10.99.5.41 -c "set session performanceMonitorInterval=5;set session performanceMonitorIterations=600;save storageArray performanceStats file=\"%LogName%\";"

 

####### end bat script ######

 

 

Hope this helps someone else who's unable to keep a session alive for the GUI collections to work.

 

Re: SMcli for performance data collections

update after running this for a while. 

 

Do collections from each controller.  Data about luns not owned by a controller is all 0s.  Also, it only reports controller data for the controller in the query and the array level stats are the same as the controller....  so you need both controllers data (ideally collected at the same time) and merge the data afterwards with some pretty simple scripts. 

 

I'll eventually load this data into a DB. 

 

Also, a web proxy is available which provide REST API like functionality.

 

Web Proxy 1.1 User Guide

Re: SMcli for performance data collections

[ Edited ]

 Hi Joe,

 

I'd definitely recommend using the REST API for this functionality in the future. We take care of a lot of the heavy lifting on collecting the data and performing analysis on it. Things like collecting data from both controllers are handled on the server so the user doesn't have to do it.

 

Thanks,

 

Michael