Software Development Kit (SDK) and API Discussions

Cluster Mode SDK: perf-object-start

oferkes

Hi,

 

i am trying to get the output of top_file and top_client commands.

the cli commands are:

statistics top file show

statistics top client show

 

here is what i do in my code (Perl):

my $in_start = NaElement->new("perf-object-start");
$in_start->child_add_string("object", "top_file");
$in_start->child_add_string("sample-id", "sample_object");

$in_start->child_add_string("instance", <instance name>); # <instance name> is the name of the vserver i want to pull data from

#Invoke API
my $out = $server->invoke_elem($in_start);
if($out->results_status() eq "failed")
{
  print($out->results_reason() ."\n");
  exit(-2);
}

and this is the error i get:

Statistics collection for sample "sample_object", was not completed successfully. Reason: "For top_file object, no instances were found to match the given query." Please delete this sample.

when i login to the cluster admin vserver, and run the command from the cli, i do get the expected output.

 

can anyone provide a hint of what is missing in my code to get this working?

 

Thanks,

Ofer

0 REPLIES 0
Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public