NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform.
You will still be able to view content, but posting and replying will be temporarily disabled.
To learn more, please review the information in this blog post.

Software Development Kit (SDK) and API Discussions

Wrong return from perf perf-object-get-instances and cMode DOT

RoulienDeLaVega
3,879 Views

Hi,

 

I try to get some info from my filers like cpu_busy, total_ops, latency...

I wrote a perl script using the ONTAPI but for example when I get the system counter cpu_busy, it show me a large number instead of utilisation %, is it normal ?

 

my $api = new NaElement('perf-object-get-instances');

my $xi = new NaElement('counters');
$api->child_add($xi);
$xi->child_add_string('counter','cpu_busy');

my $xi1 = new NaElement('instance-uuids');
$api->child_add($xi1);

$xi1->child_add_string('instance-uuid',$node_uuid);
$api->child_add_string('objectname','system');

my $xo = connect_filer($filer_address)->invoke_elem($api);
my $instances = $xo->child_get("instances");

if($instances){
my $instance_data = $instances->child_get("instance-data");
my $counters = $instance_data->child_get("counters");
if($counters){
my $counter_data = $counters->child_get("counter-data");
if($counter_data){
my $rounded_busy = $counter_data->child_get_int("value");
$cpu_return{$node_name} = $rounded_busy;
}
}
}

 

I have the same issue when I use nfs_ops, it give me total nfs operation sinc last boot instead of nfs operation per second...

 

 

1 REPLY 1

zulanch
3,822 Views
Public