Stats run with an Identifier - possible via the SDK?

I am just finding my way around the SDK and I'm not seeing a way to do what I need to do.

Basically I would like to emulate the functionality of a"stats start" command with the -I Identifier so that I can start a stats run on a system that I can check and clear on a daily basis.

Something line this:

stats start -I myid volume

- 24 hours later -

stats stop -I myid

I would then have the accumulated volume statistics over the 24 hour period.

I could do this by storing the daily values and doing the math from the previous day, but I'd like to be able to emulate the stats command so it's being stored in ontap on the controller.

Is this possible with the SDK?  If it is, examples would be VERY much appreciated....


Re: Stats run with an Identifier - possible via the SDK?


One option to achive this by using system-cli API.  See for an example.

You can have two scripts: one to start and other one to stop the stats collection. Then schedule this scripts to run at the specified times either in OnCommand UM/DFM as script plugin or like any other cron job in the OS.