How are network metrics calculated by cdm probe on Solaris platform

Document ID : KB000125496
Last Modified Date : 30/01/2019
Show Technical Document Details
Question:
How are network metrics calculated by cdm probe on Solaris platform
Environment:
cdm 6.30
Solaris 10.x/ 11.x
Answer:
cdm probe uses a combination of dladm and kstat for collecting the network data for solaris system

"dladm show-link" to get dataLink details and and "kstat -p -c net -n" to fetch the data 

How to manually verify with commands: 

Can check the output of command 

dladm show-link
and 
dladm show-link | awk '{print $1}'

Also below shell script(example file name:network.sh) which can be run on solaris environment within a temporary directory. 

#!/usr/bin/bash

dladm show-link | awk '{print $1}' > dataLinksInfo
filename="dataLinksInfo"
while true
do
    echo "New iteration"
    while read -r line; do
       name="$line"
       skipiDisk="LINK"
       if [[ "$name" == "$skipiDisk" ]]
       then
         echo "Skiping datalink name as  $name"
      else
         kstat -p -c net -n $name | grep 'bytes64'
       fi
    done < "$filename"
    sleep 3
done


It will show the obtes64 and rbytes64 details on command prompt which is published as inbound , outbound and total network metrics. 
 
Additional Information:
https://docops.ca.com/ca-unified-infrastructure-management-probes/ga/en/alphabetical-probe-articles/cdm-cpu-disk-memory-performance-monitoring/cdm-metrics#cdmMetrics-Network
File Attachments:
network_sh.txt