Thursday 25 October 2012

NetApp "stats" command

NetApp "stats" command:

Step 1:
List the available measureable objects on the filer.
filer> stats list objects
Objects:
        cpx
        rquota
        aggregate
        audit_ng
        cifs
        disk
        dump
        ext_cache_obj
        ext_cache
        fcp
        hostadapter
        ifnet
        iscsi_conn
        iscsi_lif
        iscsi
        logical_replication_destination
        logical_replication_source
        lun
        ndmp
        nfsv3
        processor
        qtree
        quota
        raid
        spinhi
        system
        target
        vfiler
        volume
        wafl
        avoa

Step 2:
Find out list of counters available for the objects listed in step1
stats list counters
filer> stats list counters
Counters for object name: cifs
instance_name
node_name
cifs_ops
cifs_latency
cifs_read_ops
cifs_write_ops
Counters for object name: disk
instance_name
node_name
instance_uuid
display_name
raid_name
raid_group
raid_type
disk_speed

To list counters for specific object ?

filer>stats list counters volume
Counters for object name: volume
        instance_name
        node_name
        instance_uuid
        vserver_name
        vserver_uuid
        avg_latency
        total_ops
        read_data
        read_latency
        read_ops
        write_data
        write_latency
        write_ops
        other_latency
        other_ops


Step 3:
Find out the specific instances available for each objects
DARFAS01> stats list instances
Instances for object name: cpx
        total
Instances for object name: rquota
        rquota_cpu0
        rquota_cpu1
        rquota_total
Instances for object name: aggregate
        aggr0
Instances for object name: audit_ng
Instances for object name: cifs
        cifs
Note: Basically what instances means is that for each object (example-volume), there are specific instances available for you to check the counters for.

Step 4:
For example: To find out the instances for the object volume.
DARFAS01> stats list instances volume
Instances for object name: volume
        vol0
        vfiler1_darfp01_root
        vfiler1_darfp01_nas
        vfiler2_darfp02_root
        vfiler2_darfp02_nas
        EUEV01_FAS_ISCSI_SATA11
As we can see on my test fieler, I have these instances availables. In other words, under object VOLUME, I can check counters against the volumes availables on my test filer.

Step 5:
Lets measure the counter againt the objects for specific instance
OBJECT:INSTANCE:COUNTER

Lets apply this format into command. Before that I want to know which counters are available for my chosen object i.e VOLUME
DARFAS01> stats list counters volume
Counters for object name: volume
        instance_name
        node_name
        instance_uuid
        vserver_name
        vserver_uuid
        avg_latency
        total_ops
        read_data
        read_latency
        read_ops
        write_data
        write_latency
        write_ops
        other_latency
        other_ops


Step 6:
Start system statistics gathering in the background, using identifier "MyStats", display the values while gathering continues, then stop gathering and display final values:

filer> stats start -I MyStats volume

To see the results while DISK I/O copy is in progress.

filer> stats show -I MyStats (Note:This will display results for all the volumes)

To seee the results for specific volume, say 'vol_cifs_vfiler'

filer> stats start -I MyStats volume:vol_cifs_vfiler

Then stop gathering and display final values:

filer> stats show -I MyStats
StatisticsID: MyStats
volume:vol_cifs_vfiler:instance_name:vol_cifs_vfiler
volume:vol_cifs_vfiler:node_name:
volume:vol_cifs_vfiler:instance_uuid:2ba581c0-1ea0-11e2-9c8f-123478563412
volume:vol_cifs_vfiler:vserver_name:
volume:vol_cifs_vfiler:vserver_uuid:
volume:vol_cifs_vfiler:avg_latency:17.67us
volume:vol_cifs_vfiler:total_ops:0/s
volume:vol_cifs_vfiler:read_data:0b/s
volume:vol_cifs_vfiler:read_latency:0us
volume:vol_cifs_vfiler:read_ops:0/s
volume:vol_cifs_vfiler:write_data:0b/s
volume:vol_cifs_vfiler:write_latency:0us
volume:vol_cifs_vfiler:write_ops:0/s
volume:vol_cifs_vfiler:other_latency:17.67us
volume:vol_cifs_vfiler:other_ops:0/s