Last active
June 9, 2019 05:49
-
-
Save scr512/3798123b739ce5da5339 to your computer and use it in GitHub Desktop.
Send Isilon stats to Graphite (Carbon) and to Dashing instance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
#Stats->Graphite | |
#10/27/16 Added boot wear monitoring. Removed Dashing stuff. | |
#02/27/16 Added username specific latency and operation collection. Pushing this data to both Graphite and Dashing | |
#03/29/15 Added in more accurate tracking of tier capacity via diskpools_to_json.py | |
#09/24/14 Added in queries for SmartPool capacity tracking | |
#08/22/14 Added in NFSv3 latency stats | |
#Let's first look and see if we have a stuck execution of the script. If the lock is older than 3 minutes we'll kill the PID and cleanup the lock. | |
find /tmp/send_stats_to_carbon.lck -mmin +3 -exec kill -9 `cat /tmp/send_stats_to_carbon.lck` {} \; | |
find /tmp/send_stats_to_carbon.lck -mmin +3 -exec rm -rf /tmp/send_stats_to_carbon.lck {} \; | |
lockfile=/tmp/send_stats_to_carbon.lck | |
if ( set -o noclobber; echo "$$" > "$lockfile") 2> /dev/null; then | |
trap 'rm -f "$lockfile"; exit $?' INT TERM EXIT | |
# do stuff here | |
carbon='192.168.1.1' | |
carbon_port='2003' | |
time=`date +%s` | |
clustername=$(isi status -q -d | egrep "Cluster Name"| awk '{print $3}') | |
disk_in=$(isi statistics query --noconversion --noheader --nofooter --nodes=all --stats=cluster.disk.xfers.in.rate) | |
disk_out=$(isi statistics query --noconversion --noheader --nofooter --nodes=all --stats=cluster.disk.xfers.out.rate) | |
echo $disk_in | awk '{print "'"isilon_performance_disk_in.$clustername"'", $2,"'"$time"'"}' | nc $carbon $carbon_port | |
echo $disk_out | awk '{print "'"isilon_performance_disk_out.$clustername"'", $2,"'"$time"'"}' | nc $carbon $carbon_port | |
pstat=$(isi statistics pstat) | |
null=$(echo $pstat | grep null | awk '{print $2}' | tr -d /s) | |
getattr=$(echo $pstat | grep null | awk '{print $4}' | tr -d /s) | |
setattr=$(echo $pstat | grep null | awk '{print $6}' | tr -d /s) | |
lookup=$(echo $pstat | grep lookup | awk '{print $2}' | tr -d /s) | |
access=$(echo $pstat | grep lookup | awk '{print $4}' | tr -d /s) | |
readlink=$(echo $pstat | grep lookup | awk '{print $6}' | tr -d /s) | |
read=$(echo $pstat | grep create | awk '{print $2}' | tr -d /s) | |
write=$(echo $pstat | grep create | awk '{print $4}' | tr -d /s) | |
create=$(echo $pstat | grep create | awk '{print $6}' | tr -d /s) | |
mkdir=$(echo $pstat | grep mkdir | awk '{print $2}' | tr -d /s) | |
symlink=$(echo $pstat | grep mkdir | awk '{print $4}' | tr -d /s) | |
mknod=$(echo $pstat | grep mkdir | awk '{print $6}' | tr -d /s) | |
remove=$(echo $pstat | grep remove | awk '{print $2}' | tr -d /s) | |
rmdir=$(echo $pstat | grep remove | awk '{print $4}' | tr -d /s) | |
rename=$(echo $pstat | grep remove | awk '{print $6}' | tr -d /s) | |
link=$(echo $pstat | grep readdir | awk '{print $2}' | tr -d /s) | |
readdir=$(echo $pstat | grep readdir | awk '{print $4}' | tr -d /s) | |
readdirplus=$(echo $pstat | grep readdir | awk '{print $6}' | tr -d /s) | |
statfs=$(echo $pstat | grep statfs | awk '{print $2}' | tr -d /s) | |
fsinfo=$(echo $pstat | grep statfs | awk '{print $4}' | tr -d /s) | |
pathconf=$(echo $pstat | grep statfs | awk '{print $6}' | tr -d /s) | |
commit=$(echo $pstat | grep noop | awk '{print $2}' | tr -d /s) | |
noop=$(echo $pstat | grep noop | awk '{print $4}' | tr -d /s) | |
total=$(echo $pstat | grep TOTAL | awk '{print $2}' | tr -d /s) | |
echo "isilon_performance_nfs_ops.$clustername.null $null $time" | nc $carbon $carbon_port | |
echo "isilon_performance_nfs_ops.$clustername.getattr $getattr $time" | nc $carbon $carbon_port | |
echo "isilon_performance_nfs_ops.$clustername.setattr $setattr $time" | nc $carbon $carbon_port | |
echo "isilon_performance_nfs_ops.$clustername.lookup $lookup $time" | nc $carbon $carbon_port | |
echo "isilon_performance_nfs_ops.$clustername.access $access $time" | nc $carbon $carbon_port | |
echo "isilon_performance_nfs_ops.$clustername.readlink $readlink $time" | nc $carbon $carbon_port | |
echo "isilon_performance_nfs_ops.$clustername.read $read $time" | nc $carbon $carbon_port | |
echo "isilon_performance_nfs_ops.$clustername.write $write $time" | nc $carbon $carbon_port | |
echo "isilon_performance_nfs_ops.$clustername.create $create $time" | nc $carbon $carbon_port | |
echo "isilon_performance_nfs_ops.$clustername.mkdir $mkdir $time" | nc $carbon $carbon_port | |
echo "isilon_performance_nfs_ops.$clustername.symlink $symlink $time" | nc $carbon $carbon_port | |
echo "isilon_performance_nfs_ops.$clustername.mknod $mknod $time" | nc $carbon $carbon_port | |
echo "isilon_performance_nfs_ops.$clustername.remove $remove $time" | nc $carbon $carbon_port | |
echo "isilon_performance_nfs_ops.$clustername.rmdir $rmdir $time" | nc $carbon $carbon_port | |
echo "isilon_performance_nfs_ops.$clustername.rename $rename $time" | nc $carbon $carbon_port | |
echo "isilon_performance_nfs_ops.$clustername.link $link $time" | nc $carbon $carbon_port | |
echo "isilon_performance_nfs_ops.$clustername.readdir $readdir $time" | nc $carbon $carbon_port | |
echo "isilon_performance_nfs_ops.$clustername.readdirplus $readdirplus $time" | nc $carbon $carbon_port | |
echo "isilon_performance_nfs_ops.$clustername.statfs $statfs $time" | nc $carbon $carbon_port | |
echo "isilon_performance_nfs_ops.$clustername.fsinfo $fsinfo $time" | nc $carbon $carbon_port | |
echo "isilon_performance_nfs_ops.$clustername.pathconf $pathconf $time" | nc $carbon $carbon_port | |
echo "isilon_performance_nfs_ops.$clustername.commit $commit $time" | nc $carbon $carbon_port | |
echo "isilon_performance_nfs_ops.$clustername.noop $noop $time" | nc $carbon $carbon_port | |
echo "isilon_performance_nfs_ops.$clustername.total $total $time" | nc $carbon $carbon_port | |
ifs_in=$(echo $pstat | grep -A2 OneFS| grep In| awk '{print $4}') | |
ifs_out=$(echo $pstat | grep -A2 OneFS| grep Out| awk '{print $4}') | |
disk_read=$(echo $pstat |grep -A3 Disk | grep Read | awk '{print $6}') | |
disk_write=$(echo $pstat |grep -A3 Disk | grep Write | awk '{print $6}') | |
net_in=$(echo $pstat |grep -A1 Network | grep MB | awk '{print $2}') | |
net_out=$(echo $pstat |grep -A1 Network | grep MB | awk '{print $4}') | |
echo "isilon_performance_ifs_in.$clustername.ifs_in $ifs_in $time" | nc $carbon $carbon_port | |
echo "isilon_performance_ifs_out.$clustername.ifs_out $ifs_out $time" | nc $carbon $carbon_port | |
echo "isilon_performance_disk_read.$clustername.disk_read $disk_read $time" | nc $carbon $carbon_port | |
echo "isilon_performance_disk_write.$clustername.disk_write $disk_write $time" | nc $carbon $carbon_port | |
echo "isilon_performance_net_in.$clustername.net_in $net_in $time" | nc $carbon $carbon_port | |
echo "isilon_performance_net_out.$clustername.net_out $net_out $time" | nc $carbon $carbon_port | |
throttled=$(isi_for_array sysctl vfs.nfsrv.rpc.request_space_throttled|tr -d ':') | |
echo $throttled | awk '{print "'"isilon_performance.nfs_rpc_throttled.$clustername."'"$1, $3, "'"$time"'"}' | nc $carbon $carbon_port | |
throttled_count=$(isi_for_array sysctl vfs.nfsrv.rpc.request_space_throttle_count|tr -d ':') | |
echo $throttled_count | awk '{print "'"isilon_performance.nfs_rpc_throttled_count.$clustername."'"$1, $3, "'"$time"'"}' | nc $carbon $carbon_port | |
mbaudit=$(isi_for_array sysctl kern.mbaudit) | |
mbufsinuse=$(echo $mbaudit | grep mbaudit | tr -d ':') | |
mbufsclustersinuse=$(echo $mbaudit | grep clusters | tr -d ':' | sed 's:/: :g') | |
mbufsnetwork=$(echo $mbaudit | grep network | tr -d ':') | |
echo $mbufsinuse | awk '{print "'"isilon_performance.mbufs_in_use.$clustername."'"$1, $3, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $mbufsclustersinuse | awk '{print "'"isilon_performance.mbufs_clusters_in_use.current.$clustername."'"$1, $2, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $mbufsclustersinuse | awk '{print "'"isilon_performance.mbufs_clusters_in_use.max.$clustername."'"$1, $3, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $mbufsnetwork | awk '{print "'"isilon_performance.mbufs_allocated_to_network.$clustername."'"$1, $2, "'"$time"'"}' | nc $carbon $carbon_port | |
overcommit=$(isi_for_array sysctl vfs.nfsrv.rpc.overcommit_active|tr -d ':') | |
echo $overcommit | awk '{print "'"isilon_performance.nfs_rpc_overcommit.$clustername."'"$1, $3, "'"$time"'"}' | nc $carbon $carbon_port | |
overcommit_count=$(isi_for_array sysctl vfs.nfsrv.rpc.overcommit_events|tr -d ':') | |
echo $overcommit_count | awk '{print "'"isilon_performance.nfs_rpc_overcommit_count.$clustername."'"$1, $3, "'"$time"'"}' | nc $carbon $carbon_port | |
fsoplatency=$(isi statistics client --degraded --totalby=class --noheader --noconversion) | |
echo $fsoplatency | awk '{print "'"isilon_performance.fs_op_latency.$clustername."'"$7, $4, "'"$time"'"}' | nc $carbon $carbon_port | |
nodecpuload=$(isi statistics query --noconversion --noheader --nofooter --nodes=all --stats=node.load.1min) | |
echo $nodecpuload | awk '{print "'"isilon_performance_node_cpu_load.$clustername."'"$1, $2/100,"'"$time"'"}' | nc $carbon $carbon_port | |
nfs_latency=$(isi statistics protocol --protocols nfs3 --totalby op --zero --noconversion --noheader) | |
echo $nfs_latency | awk '{print "'"isilon_performance.protocol.nfs3.latency.$clustername."'"$9, $4, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $nfs_latency | awk '{print "'"isilon_performance.protocol.nfs3.latency_stddev.$clustername."'"$9, $5, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $nfs_latency | awk '{print "'"isilon_performance.protocol.nfs3.in.$clustername."'"$9, $2, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $nfs_latency | awk '{print "'"isilon_performance.protocol.nfs3.out.$clustername."'"$9, $3, "'"$time"'"}' | nc $carbon $carbon_port | |
#added in pool capacity usage stats. Note that I did this in a rush, so I'm selecting for specific SmartPools instead of being smart and just looking it up - 09/24/14 | |
disk_query=$(isi status -d -q) | |
tier2_pool1_query=$(echo $disk_query | grep Tier2_Pool1) | |
tier2_pool1_status=$(echo $tier2_pool1_query | awk {'print $2,$3'} | sed 's/[0-9]*[M,G,B]*|* *//g') | |
if [ $tier2_pool1_status = OK ] | |
then | |
tier2_pool1=$(echo $tier2_pool1_query | awk '{print $8,$9,$10,$11,$12,$13}' | tr -d '%()GT|/<>') | |
else | |
tier2_pool1=$(echo $tier2_pool1_query | awk '{print $6,$7,$8,$9,$10,$11}' | tr -d '%()GT|/<>') | |
fi | |
echo $tier2_pool1 | awk '{print "'"isilon_performance.capacity.$clustername.tier2_pool1.hdd_used "'"$1, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $tier2_pool1 | awk '{print "'"isilon_performance.capacity.$clustername.tier2_pool1.hdd_size "'"$2, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $tier2_pool1 | awk '{print "'"isilon_performance.capacity.$clustername.tier2_pool1.hdd_percent "'"$3, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $tier2_pool1 | awk '{print "'"isilon_performance.capacity.$clustername.tier2_pool1.ssd_used "'"$4, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $tier2_pool1 | awk '{print "'"isilon_performance.capacity.$clustername.tier2_pool1.ssd_size "'"$5, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $tier2_pool1 | awk '{print "'"isilon_performance.capacity.$clustername.tier2_pool1.ssd_percent "'"$6, "'"$time"'"}' | nc $carbon $carbon_port | |
tier2_pool2_query=$(echo $disk_query | grep Tier2_Pool2) | |
tier2_pool2_status=$(echo $tier2_pool2_query | awk {'print $2,$3'} | sed 's/[0-9]*[M,G,B]*|* *//g') | |
if [ $tier2_pool2_status = OK ] | |
then | |
tier2_pool2=$(echo $tier2_pool2_query | awk '{print $8,$9,$10,$11,$12,$13}' | tr -d '%()GT|/<>') | |
else | |
tier2_pool2=$(echo $tier2_pool2_query | awk '{print $6,$7,$8,$9,$10,$11}' | tr -d '%()GT|/<>') | |
fi | |
echo $tier2_pool2 | awk '{print "'"isilon_performance.capacity.$clustername.tier2_pool2.hdd_used "'"$1, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $tier2_pool2 | awk '{print "'"isilon_performance.capacity.$clustername.tier2_pool2.hdd_size "'"$2, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $tier2_pool2 | awk '{print "'"isilon_performance.capacity.$clustername.tier2_pool2.hdd_percent "'"$3, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $tier2_pool2 | awk '{print "'"isilon_performance.capacity.$clustername.tier2_pool2.ssd_used "'"$4, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $tier2_pool2 | awk '{print "'"isilon_performance.capacity.$clustername.tier2_pool2.ssd_size "'"$5, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $tier2_pool2 | awk '{print "'"isilon_performance.capacity.$clustername.tier2_pool2.ssd_percent "'"$6, "'"$time"'"}' | nc $carbon $carbon_port | |
tier2_pool3_query=$(echo $disk_query | grep Tier2_Pool3) | |
tier2_pool3_status=$(echo $tier2_pool3_query | awk {'print $2,$3'} | sed 's/[0-9]*[M,G,B]*|* *//g') | |
if [ $tier2_pool3_status = OK ] | |
then | |
tier2_pool3=$(echo $tier2_pool3_query | awk '{print $8,$9,$10,$11,$12,$13}' | tr -d '%()GT|/<>') | |
else | |
tier2_pool3=$(echo $tier2_pool3_query | awk '{print $6,$7,$8,$9,$10,$11}' | tr -d '%()GT|/<>') | |
fi | |
echo $tier2_pool3 | awk '{print "'"isilon_performance.capacity.$clustername.tier2_pool3.hdd_used "'"$1, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $tier2_pool3 | awk '{print "'"isilon_performance.capacity.$clustername.tier2_pool3.hdd_size "'"$2, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $tier2_pool3 | awk '{print "'"isilon_performance.capacity.$clustername.tier2_pool3.hdd_percent "'"$3, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $tier2_pool3 | awk '{print "'"isilon_performance.capacity.$clustername.tier2_pool3.ssd_used "'"$4, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $tier2_pool3 | awk '{print "'"isilon_performance.capacity.$clustername.tier2_pool3.ssd_size "'"$5, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $tier2_pool3 | awk '{print "'"isilon_performance.capacity.$clustername.tier2_pool3.ssd_percent "'"$6, "'"$time"'"}' | nc $carbon $carbon_port | |
tier4_query=$(echo $disk_query | grep Tier4) | |
tier4_status=$(echo $tier4_query | awk {'print $2,$3'} | sed 's/[0-9]*[M,G,B]*|* *//g') | |
if [ $tier4_status = OK ] | |
then | |
tier4=$(echo $tier4_query | awk '{print $8,$9,$10,$11,$12,$13}' | tr -d '%()GT|/<>') | |
else | |
tier4=$(echo $tier4_query | awk '{print $6,$7,$8,$9,$10,$11}' | tr -d '%()GT|/<>') | |
fi | |
echo $tier4 | awk '{print "'"isilon_performance.capacity.$clustername.tier4.hdd_used "'"$1, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $tier4 | awk '{print "'"isilon_performance.capacity.$clustername.tier4.hdd_size "'"$2, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $tier4 | awk '{print "'"isilon_performance.capacity.$clustername.tier4.hdd_percent "'"$3, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $tier4 | awk '{print "'"isilon_performance.capacity.$clustername.tier4.ssd_used "'"$4, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $tier4 | awk '{print "'"isilon_performance.capacity.$clustername.tier4.ssd_size "'"$5, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $tier4 | awk '{print "'"isilon_performance.capacity.$clustername.tier4.ssd_percent "'"$6, "'"$time"'"}' | nc $carbon $carbon_port | |
#Added in Tier capacity tracking by bytes. Again, hardcoding stuff 'cause I'm in a hurry... Season to liking if you're using in your environment. - 03/29/2015 | |
tier2=$(/usr/share/papi/scripts/1/diskpool/diskpools/diskpools_to_json.py | python -mjson.tool | grep -B5 Tier2) | |
tier4=$(/usr/share/papi/scripts/1/diskpool/diskpools/diskpools_to_json.py | python -mjson.tool | grep -B5 Tier4) | |
tier2_avail=$(echo $tier2 | grep available | awk '{print $2}' | sed 's/,//g') | |
tier2_total=$(echo $tier2 | grep total | awk '{print $2}' | sed 's/,//g') | |
tier2_used=$(echo $tier2 | grep used | awk '{print $2}' | sed 's/,//g') | |
tier4_avail=$(echo $tier4 | grep available | awk '{print $2}' | sed 's/,//g') | |
tier4_total=$(echo $tier4 | grep total | awk '{print $2}' | sed 's/,//g') | |
tier4_used=$(echo $tier4 | grep used | awk '{print $2}' | sed 's/,//g') | |
echo $tier2_avail | awk '{print "'"isilon_performance.capacity.$clustername.tier2.avail "'"$1, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $tier2_total | awk '{print "'"isilon_performance.capacity.$clustername.tier2.total "'"$1, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $tier2_used | awk '{print "'"isilon_performance.capacity.$clustername.tier2.used "'"$1, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $tier4_avail | awk '{print "'"isilon_performance.capacity.$clustername.tier4.avail "'"$1, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $tier4_total | awk '{print "'"isilon_performance.capacity.$clustername.tier4.total "'"$1, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $tier4_used | awk '{print "'"isilon_performance.capacity.$clustername.tier4.used "'"$1, "'"$time"'"}' | nc $carbon $carbon_port | |
#isi storagepools is even better. OneFS 7.x only code above is deprecated. Naming here again, hard coded... "_d" being for "detail". | |
t2pool1_d=$(isi storagepool list --format=json | python -mjson.tool | grep -A17 '"name": "T2Pool1"' | egrep 'pct|bytes' | tr -d '":,') | |
t2pool2_d=$(isi storagepool list --format=json | python -mjson.tool | grep -A17 '"name": "T2Pool2"' | egrep 'pct|bytes' | tr -d '":,') | |
t2pool3_d=$(isi storagepool list --format=json | python -mjson.tool | grep -A17 '"name": "T2Pool3"' | egrep 'pct|bytes' | tr -d '":,') | |
t4pool1_d=$(isi storagepool list --format=json | python -mjson.tool | grep -A17 '"name": "T4Pool1"' | egrep 'pct|bytes' | tr -d '":,') | |
echo $t2pool1_d | awk '{print "'"isilon_performance.capacity.$clustername.t2pool1_d."'"$1, $2, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $t2pool2_d | awk '{print "'"isilon_performance.capacity.$clustername.t2pool2_d."'"$1, $2, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $t2pool3_d | awk '{print "'"isilon_performance.capacity.$clustername.t2pool3_d."'"$1, $2, "'"$time"'"}' | nc $carbon $carbon_port | |
echo $t4pool1_d | awk '{print "'"isilon_performance.capacity.$clustername.t4pool1_d."'"$1, $2, "'"$time"'"}' | nc $carbon $carbon_port | |
#boot disk wear | |
boot_disk_wear_j3=$(isi_for_array 'isi_radish -a "Internal J3" "Carrier board J3"' | grep "Percent Life" | grep -v Used | awk '{print $1 $2 $3 $4 sprintf( "%d","0x"$9 )}' | sed 's/:/ /g') | |
echo $boot_disk_wear_j3 | awk '{print "'"isilon_performance.boot_disk_wear.$clustername.percent_left.j3."'"$1,$3"'" "'" "'"$time"'"}' | nc $carbon $carbon_port | |
boot_disk_wear_j4=$(isi_for_array 'isi_radish -a "Internal J4" "Carrier board J4"' | grep "Percent Life" | grep -v Used | awk '{print $1 $2 $3 $4 sprintf( "%d","0x"$9 )}' | sed 's/:/ /g') | |
echo $boot_disk_wear_j4 | awk '{print "'"isilon_performance.boot_disk_wear.$clustername.percent_left.j4."'"$1,$3"'" "'" "'"$time"'"}' | nc $carbon $carbon_port | |
#Top 10 clients by write throughput | |
clients_in=$(isi statistics client --degraded --nodes=all --orderby in --totalby username --noheader --protocol nfs3 --noconversion | grep -v UNKNOWN | sed 's,USA\\,,g') | |
echo $clients_in | head -10 | awk '{print "'"isilon_performance.protocol.nfs3.client_write.$clustername."'"$8, $2, "'"$time"'"}' | nc $carbon $carbon_port | |
#Top 10 clients by read throuhput | |
clients_out=$(isi statistics client --degraded --nodes=all --orderby out --totalby username --noheader --protocol nfs3 --noconversion | grep -v UNKNOWN | sed 's,USA\\,,g') | |
echo $clients_out | head -10 | awk '{print "'"isilon_performance.protocol.nfs3.client_read.$clustername."'"$8, $3, "'"$time"'"}' | nc $carbon $carbon_port | |
#Top 10 clients by NFS ops | |
clients_ops=$(isi statistics client --nodes=all --orderby ops --totalby username --noheader --protocol nfs3 --noconversion | grep -v UNKNOWN) | |
echo $clients_ops | head -10 | awk '{print "'"isilon_performance.protocol.nfs3.client_ops.$clustername."'"$8, $1, "'"$time"'"}' | nc $carbon $carbon_port | |
#Top 10 clients by averaged write latency | |
clients_write_latency=$(isi statistics client --nodes=all --class write --orderby timeavg --totalby username --noheader --protocol nfs3 --noconversion | grep -v UNKNOWN) | |
echo $clients_write_latency | head -10 | awk '{print "'"isilon_performance.protocol.nfs3.client_write_latency.$clustername."'"$8, $4, "'"$time"'"}' | nc $carbon $carbon_port | |
#Top 10 clients by averaged namespace_write latency | |
clients_namespace_write_latency=$(isi statistics client --nodes=all --class namespace_write --orderby timeavg --totalby username --noheader --protocol nfs3 --noconversion | grep -v UNKNOWN) | |
echo $clients_namespace_write_latency | head -10 | awk '{print "'"isilon_performance.protocol.nfs3.client_namespace_write_latency.$clustername."'"$8, $4, "'"$time"'"}' | nc $carbon $carbon_port | |
# clean up after yourself, and release your trap | |
rm -f "$lockfile" | |
trap - INT TERM EXIT | |
else | |
echo "Lock Exists: $lockfile owned by $(cat $lockfile)" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment