Révision fa87ed65
Cleanups
Renamed emc_vns_nfsv3_stats to emc_vnx_nfs_stats
Added NFSv4 support
| plugins/emc/emc_vnx_nfs_stats | ||
|---|---|---|
| 80 | 80 |
|
| 81 | 81 |
#Choosing Cotrol Station. Code have to be "10" |
| 82 | 82 |
for CS in $cs_addr; do |
| 83 |
if [ "`eval $SSH_CHECK`" -eq "10" ]; then
|
|
| 83 |
if [ "$(eval $SSH_CHECK)" -eq "10" ]; then
|
|
| 84 | 84 |
# echo "$CS is Primary" |
| 85 | 85 |
PRIMARY_CS=$CS |
| 86 | 86 |
break |
| ... | ... | |
| 102 | 102 |
if [ "$?" != 0 ] ; then continue; fi |
| 103 | 103 |
nas_server_ok=TRUE |
| 104 | 104 |
#nfs.v3.op data |
| 105 |
member_elements=`$SSH server_stats $server -info nfs.v3.op | grep member_elements | sed -ne 's/^.*= //p'`
|
|
| 105 |
member_elements=$($SSH server_stats $server -info nfs.v3.op | grep member_elements | sed -ne 's/^.*= //p')
|
|
| 106 | 106 |
IFS=',' read -ra graphs <<< $member_elements |
| 107 |
echo "multigraph vnx_emc_calls_s |
|
| 108 |
graph_title EMC VNX 5300 NFS V3 Calls per second
|
|
| 107 |
echo "multigraph vnx_emc_v3_calls_s
|
|
| 108 |
graph_title EMC VNX 5300 NFSv3 Calls per second
|
|
| 109 | 109 |
graph_vlabel Calls |
| 110 | 110 |
graph_category nfs |
| 111 | 111 |
graph_args --base 1000" |
| 112 | 112 |
for graph in "${graphs[@]}"; do
|
| 113 |
field=`echo "$graph" | cut -d '.' -f4 `
|
|
| 113 |
field=$(echo "$graph" | cut -d '.' -f4 )
|
|
| 114 | 114 |
echo "${server}_$field.label $server $field"
|
| 115 | 115 |
done |
| 116 | 116 |
|
| 117 |
echo -e "\nmultigraph vnx_emc_usec_call |
|
| 118 |
graph_title EMC VNX 5300 NFS V3 uSeconds per call
|
|
| 117 |
echo -e "\nmultigraph vnx_emc_v3_usec_call
|
|
| 118 |
graph_title EMC VNX 5300 NFSv3 uSeconds per call
|
|
| 119 | 119 |
graph_vlabel uSec / call |
| 120 | 120 |
graph_category nfs |
| 121 | 121 |
graph_args --base 1000" |
| 122 | 122 |
for graph in "${graphs[@]}"; do
|
| 123 |
field=`echo "$graph" | cut -d '.' -f4 `
|
|
| 123 |
field=$(echo "$graph" | cut -d '.' -f4 )
|
|
| 124 | 124 |
echo "${server}_$field.label $server $field"
|
| 125 | 125 |
done |
| 126 |
echo -e "\nmultigraph vnx_emc_op_percent |
|
| 127 |
graph_title EMC VNX 5300 NFS V3 Op %
|
|
| 126 |
echo -e "\nmultigraph vnx_emc_v3_op_percent
|
|
| 127 |
graph_title EMC VNX 5300 NFSv3 Op %
|
|
| 128 | 128 |
graph_vlabel % |
| 129 | 129 |
graph_scale no |
| 130 | 130 |
graph_category nfs" |
| 131 | 131 |
for graph in "${graphs[@]}"; do
|
| 132 |
field=`echo "$graph" | cut -d '.' -f4 `
|
|
| 132 |
field=$(echo "$graph" | cut -d '.' -f4 )
|
|
| 133 | 133 |
echo "${server}_$field.label $server $field"
|
| 134 | 134 |
echo "${server}_$field.min 0"
|
| 135 | 135 |
done |
| 136 |
graphs=() |
|
| 137 |
#nfs.v4.op data |
|
| 138 |
member_elements=$($SSH server_stats $server -info nfs.v4.op | grep member_elements | sed -ne 's/^.*= //p') |
|
| 139 |
IFS=',' read -ra graphs <<< $member_elements |
|
| 140 |
echo "multigraph vnx_emc_v4_calls_s |
|
| 141 |
graph_title EMC VNX 5300 NFSv4 Calls per second |
|
| 142 |
graph_vlabel Calls |
|
| 143 |
graph_category nfs |
|
| 144 |
graph_args --base 1000" |
|
| 145 |
for graph in "${graphs[@]}"; do
|
|
| 146 |
field=$(echo "$graph" | cut -d '.' -f4 ) |
|
| 147 |
echo "${server}_$field.label $server $field"
|
|
| 148 |
done |
|
| 136 | 149 |
|
| 150 |
echo -e "\nmultigraph vnx_emc_v4_usec_call |
|
| 151 |
graph_title EMC VNX 5300 NFSv4 uSeconds per call |
|
| 152 |
graph_vlabel uSec / call |
|
| 153 |
graph_category nfs |
|
| 154 |
graph_args --base 1000" |
|
| 155 |
for graph in "${graphs[@]}"; do
|
|
| 156 |
field=$(echo "$graph" | cut -d '.' -f4 ) |
|
| 157 |
echo "${server}_$field.label $server $field"
|
|
| 158 |
done |
|
| 159 |
echo -e "\nmultigraph vnx_emc_v4_op_percent |
|
| 160 |
graph_title EMC VNX 5300 NFSv4 Op % |
|
| 161 |
graph_vlabel % |
|
| 162 |
graph_scale no |
|
| 163 |
graph_category nfs" |
|
| 164 |
for graph in "${graphs[@]}"; do
|
|
| 165 |
field=$(echo "$graph" | cut -d '.' -f4 ) |
|
| 166 |
echo "${server}_$field.label $server $field"
|
|
| 167 |
echo "${server}_$field.min 0"
|
|
| 168 |
done |
|
| 137 | 169 |
|
| 138 | 170 |
#nfs.client data |
| 139 | 171 |
# Total Read Write Suspicious Total Read Write Avg |
| 140 | 172 |
# Ops/s Ops/s Ops/s Ops diff KiB/s KiB/s KiB/s uSec/call |
| 141 |
member_elements=`$SSH server_stats server_2 -monitor nfs.client -count 1 -terminationsummary no -titles never | sed -ne 's/^.*id=//p' | cut -d' ' -f1`
|
|
| 173 |
member_elements=$($SSH server_stats server_2 -monitor nfs.client -count 1 -terminationsummary no -titles never | sed -ne 's/^.*id=//p' | cut -d' ' -f1)
|
|
| 142 | 174 |
readarray graphs2 <<< $member_elements |
| 143 | 175 |
echo -e "\nmultigraph vnx_emc_nfs_client_ops_s |
| 144 | 176 |
graph_title EMC VNX 5300 NFS Client Ops/s |
| ... | ... | |
| 146 | 178 |
graph_category nfs" |
| 147 | 179 |
echo -n "graph_order " |
| 148 | 180 |
for graph in "${graphs2[@]}"; do
|
| 149 |
field=`echo "$graph" | sed -ne 's/\./_/pg' `
|
|
| 181 |
field=$(echo "$graph" | sed -ne 's/\./_/pg' )
|
|
| 150 | 182 |
echo -n "${server}_${field}_r ${server}_${field}_w ${server}_${field}_t ${server}_${field}_s "
|
| 151 | 183 |
done |
| 152 | 184 |
echo " " |
| 153 | 185 |
for graph in "${graphs2[@]}"; do
|
| 154 |
field=`echo "$graph" | sed -ne 's/\./_/pg' `
|
|
| 186 |
field=$(echo "$graph" | sed -ne 's/\./_/pg' )
|
|
| 155 | 187 |
echo "${server}_${field}_r.label $server $field Read Ops/s"
|
| 156 | 188 |
echo "${server}_${field}_w.label $server $field Write Ops/s"
|
| 157 | 189 |
echo "${server}_${field}_w.draw STACK"
|
| ... | ... | |
| 165 | 197 |
graph_category nfs" |
| 166 | 198 |
echo -n "graph_order " |
| 167 | 199 |
for graph in "${graphs2[@]}"; do
|
| 168 |
field=`echo "$graph" | sed -ne 's/\./_/pg' `
|
|
| 200 |
field=$(echo "$graph" | sed -ne 's/\./_/pg' )
|
|
| 169 | 201 |
echo -n "${server}_${field}_r ${server}_${field}_w ${server}_${field}_t "
|
| 170 | 202 |
done |
| 171 | 203 |
echo " " |
| 172 | 204 |
for graph in "${graphs2[@]}"; do
|
| 173 |
field=`echo "$graph" | sed -ne 's/\./_/pg' `
|
|
| 205 |
field=$(echo "$graph" | sed -ne 's/\./_/pg' )
|
|
| 174 | 206 |
echo "${server}_${field}_r.label $server $field Read B/s"
|
| 175 | 207 |
echo "${server}_${field}_r.cdef ${server}_${field}_r,1024,*"
|
| 176 | 208 |
echo "${server}_${field}_w.label $server $field Write B/s"
|
| ... | ... | |
| 185 | 217 |
graph_vlabel uSec/call |
| 186 | 218 |
graph_category nfs" |
| 187 | 219 |
for graph in "${graphs2[@]}"; do
|
| 188 |
field=`echo "$graph" | sed -ne 's/\./_/pg' `
|
|
| 220 |
field=$(echo "$graph" | sed -ne 's/\./_/pg' )
|
|
| 189 | 221 |
echo "${server}_${field}.label $server $field Avg uSec/call"
|
| 190 | 222 |
done |
| 191 | 223 |
done |
| ... | ... | |
| 196 | 228 |
exit 0 |
| 197 | 229 |
fi |
| 198 | 230 |
|
| 199 |
#nfs.v3.op data |
|
| 200 | 231 |
for server in $nas_servers; do |
| 201 | 232 |
$SSH nas_server -i $server | grep -q 'type *= nas' |
| 202 | 233 |
if [ "$?" != 0 ] ; then continue; fi |
| 203 | 234 |
nas_server_ok=TRUE |
| 204 |
member_elements=`$SSH server_stats $server -monitor nfs.v3.op -count 1 -terminationsummary no -titles never | sed -ne 's/^.*v3/v3/p'` |
|
| 235 |
#nfs.v3.op data |
|
| 236 |
member_elements=$($SSH server_stats $server -monitor nfs.v3.op -count 1 -terminationsummary no -titles never | sed -ne 's/^.*v3/v3/p') |
|
| 205 | 237 |
NUMCOL=5 |
| 206 |
LINES=`wc -l <<< $member_elements`
|
|
| 238 |
LINES=$(wc -l <<< $member_elements)
|
|
| 207 | 239 |
while IFS=$'\n' read -ra graphs ; do |
| 208 | 240 |
element+=( $graphs ) |
| 209 | 241 |
done <<< $member_elements |
| 210 | 242 |
|
| 211 |
echo "multigraph vnx_emc_calls_s" |
|
| 243 |
echo "multigraph vnx_emc_v3_calls_s"
|
|
| 212 | 244 |
for ((i=0; i<$((LINES)); i++ )); do |
| 213 | 245 |
echo "${server}_${element[i*$NUMCOL]}".value "${element[i*$NUMCOL+1]}"
|
| 214 | 246 |
done |
| 215 | 247 |
|
| 216 |
echo -e "\nmultigraph vnx_emc_usec_call" |
|
| 248 |
echo -e "\nmultigraph vnx_emc_v3_usec_call"
|
|
| 217 | 249 |
for ((i=0; i<$((LINES)); i++ )); do |
| 218 | 250 |
echo "${server}_${element[i*$NUMCOL]}".value "${element[i*$NUMCOL+3]}"
|
| 219 | 251 |
done |
| 220 | 252 |
|
| 221 |
echo -e "\nmultigraph vnx_emc_op_percent" |
|
| 253 |
echo -e "\nmultigraph vnx_emc_v3_op_percent"
|
|
| 222 | 254 |
for ((i=0; i<$((LINES)); i++ )); do |
| 223 | 255 |
echo "${server}_${element[i*$NUMCOL]}".value "${element[i*$NUMCOL+4]}"
|
| 224 | 256 |
done |
| 225 | 257 |
|
| 226 | 258 |
element=() |
| 259 |
|
|
| 260 |
#nfs.v4.op data |
|
| 261 |
member_elements=$($SSH server_stats $server -monitor nfs.v4.op -count 1 -terminationsummary no -titles never | sed -ne 's/^.*v4/v4/p') |
|
| 262 |
NUMCOL=5 |
|
| 263 |
LINES=$(wc -l <<< $member_elements) |
|
| 264 |
while IFS=$'\n' read -ra graphs ; do |
|
| 265 |
element+=( $graphs ) |
|
| 266 |
done <<< $member_elements |
|
| 267 |
|
|
| 268 |
echo -e "\nmultigraph vnx_emc_v4_calls_s" |
|
| 269 |
for ((i=0; i<$((LINES)); i++ )); do |
|
| 270 |
echo "${server}_${element[i*$NUMCOL]}".value "${element[i*$NUMCOL+1]}"
|
|
| 271 |
done |
|
| 272 |
|
|
| 273 |
echo -e "\nmultigraph vnx_emc_v4_usec_call" |
|
| 274 |
for ((i=0; i<$((LINES)); i++ )); do |
|
| 275 |
echo "${server}_${element[i*$NUMCOL]}".value "${element[i*$NUMCOL+3]}"
|
|
| 276 |
done |
|
| 277 |
|
|
| 278 |
echo -e "\nmultigraph vnx_emc_v4_op_percent" |
|
| 279 |
for ((i=0; i<$((LINES)); i++ )); do |
|
| 280 |
echo "${server}_${element[i*$NUMCOL]}".value "${element[i*$NUMCOL+4]}"
|
|
| 281 |
done |
|
| 282 |
|
|
| 283 |
element=() |
|
| 284 |
|
|
| 227 | 285 |
#nfs.client data |
| 228 | 286 |
echo -e "\nmultigraph vnx_emc_nfs_client_ops_s" |
| 229 |
member_elements=`$SSH server_stats server_2 -monitor nfs.client -count 1 -terminationsummary no -titles never | sed -ne 's/^.*id=//p'`
|
|
| 287 |
member_elements=$($SSH server_stats server_2 -monitor nfs.client -count 1 -terminationsummary no -titles never | sed -ne 's/^.*id=//p')
|
|
| 230 | 288 |
NUMCOL=9 |
| 231 |
LINES=`wc -l <<< $member_elements`
|
|
| 289 |
LINES=$(wc -l <<< $member_elements)
|
|
| 232 | 290 |
while IFS=$'\n' read -ra graphs; do |
| 233 | 291 |
element+=($graphs) |
| 234 | 292 |
done <<< $member_elements |
| 235 | 293 |
for (( i=0; i<$((LINES)); i++ )); do |
| 236 |
client=` echo ${element[i*$NUMCOL]} | sed -ne 's/\./_/pg'`
|
|
| 294 |
client=$( echo ${element[i*$NUMCOL]} | sed -ne 's/\./_/pg')
|
|
| 237 | 295 |
echo "${server}_${client}_r".value "${element[$i*$NUMCOL+2]}"
|
| 238 | 296 |
echo "${server}_${client}_w".value "${element[$i*$NUMCOL+3]}"
|
| 239 | 297 |
echo "${server}_${client}_t".value "${element[$i*$NUMCOL+1]}"
|
| ... | ... | |
| 241 | 299 |
done |
| 242 | 300 |
echo -e "\nmultigraph vnx_emc_nfs_client_kib_s" |
| 243 | 301 |
for (( i=0; i<$((LINES)); i++ )); do |
| 244 |
client=` echo ${element[i*$NUMCOL]} | sed -ne 's/\./_/pg'`
|
|
| 302 |
client=$( echo ${element[i*$NUMCOL]} | sed -ne 's/\./_/pg')
|
|
| 245 | 303 |
echo "${server}_${client}_r".value "${element[$i*$NUMCOL+6]}"
|
| 246 | 304 |
echo "${server}_${client}_w".value "${element[$i*$NUMCOL+7]}"
|
| 247 | 305 |
echo "${server}_${client}_t".value "${element[$i*$NUMCOL+5]}"
|
| 248 | 306 |
done |
| 249 | 307 |
echo -e "\nmultigraph vnx_emc_nfs_client_avg_usec" |
| 250 | 308 |
for (( i=0; i<$((LINES)); i++ )); do |
| 251 |
client=` echo ${element[i*$NUMCOL]} | sed -ne 's/\./_/pg'`
|
|
| 309 |
client=$( echo ${element[i*$NUMCOL]} | sed -ne 's/\./_/pg')
|
|
| 252 | 310 |
echo "${server}_${client}".value "${element[$i*$NUMCOL+8]}"
|
| 253 | 311 |
done |
| 254 | 312 |
done |
Formats disponibles : Unified diff