2016-11-14 18:16:25 +01:00
|
|
|
#!/bin/bash
|
2016-12-26 17:45:00 +01:00
|
|
|
|
|
|
|
: <<=cut
|
|
|
|
|
2018-08-02 02:03:42 +02:00
|
|
|
=head1 NAME
|
2016-12-26 17:45:00 +01:00
|
|
|
|
2018-08-02 02:03:42 +02:00
|
|
|
emc_vnx_file_stats - Plugin to monitor Basic, NFSv3 and NFSv4 statistics of
|
2017-01-19 19:05:05 +01:00
|
|
|
EMC VNX 5300 Unified Storage system's Datamovers
|
2016-12-26 17:45:00 +01:00
|
|
|
|
|
|
|
=head1 AUTHOR
|
|
|
|
|
|
|
|
Evgeny Beysembaev <megabotva@gmail.com>
|
|
|
|
|
|
|
|
=head1 LICENSE
|
|
|
|
|
|
|
|
GPLv2
|
|
|
|
|
|
|
|
=head1 MAGIC MARKERS
|
|
|
|
|
|
|
|
#%# family=auto
|
2016-12-26 20:08:26 +01:00
|
|
|
#%# capabilities=autoconf suggest
|
2016-12-26 17:45:00 +01:00
|
|
|
|
|
|
|
=head1 DESCRIPTION
|
|
|
|
|
2018-08-02 02:03:42 +02:00
|
|
|
The plugin monitors basic statistics of EMC Unified Storage system Datamovers
|
|
|
|
and NFS statistics of EMC VNX5300 Unified Storage system. Probably it can
|
2017-01-19 19:05:05 +01:00
|
|
|
also be compatible with other Isilon or Celerra systems. It uses SSH to connect
|
2018-08-02 02:03:42 +02:00
|
|
|
to Control Stations, then remotely executes '/nas/sbin/server_stats' and
|
|
|
|
fetches and parses data from it. It supports gathering data both from
|
|
|
|
active/active and active/passive Datamover configurations, ignoring offline or
|
|
|
|
standby Datamovers.
|
2016-12-26 17:45:00 +01:00
|
|
|
If all Datamovers are offline or absent, the plugin returns error.
|
2017-01-19 19:05:05 +01:00
|
|
|
This plugin also automatically chooses Primary Control Station from the list by
|
|
|
|
calling '/nasmcd/sbin/getreason' and '/nasmcd/sbin/t2slot'.
|
2018-08-02 02:03:42 +02:00
|
|
|
|
2016-12-26 17:45:00 +01:00
|
|
|
At the moment data is gathered from the following statistics sources:
|
|
|
|
* nfs.v3.op - Tons of timings about NFSv3 RPC calls
|
|
|
|
* nfs.v4.op - Tons of timings about NFSv4 RPC calls
|
|
|
|
* nfs.client - Here new Client addresses are rescanned and added automatically.
|
2017-01-19 19:05:05 +01:00
|
|
|
* basic-std Statistics Group - Basic Statistics of Datamovers (eg. CPU, Memory
|
|
|
|
etc.)
|
2018-08-02 02:03:42 +02:00
|
|
|
|
2017-01-19 19:05:05 +01:00
|
|
|
It's quite easy to comment out unneeded data to make graphs less overloaded or
|
|
|
|
to add new statistics sources.
|
|
|
|
|
2017-01-19 20:22:01 +01:00
|
|
|
The plugin has been tested in the following Operating Environment (OE):
|
|
|
|
File Version T7.1.76.4
|
|
|
|
Block Revision 05.32.000.5.215
|
|
|
|
|
2017-01-19 19:05:05 +01:00
|
|
|
=head1 LIST OF GRAPHS
|
|
|
|
|
|
|
|
These are Basic Datamover Graphs.
|
|
|
|
Graph category CPU:
|
|
|
|
EMC VNX 5300 Datamover CPU Util %
|
|
|
|
Graph category Network:
|
|
|
|
EMC VNX 5300 Datamover Network bytes over all interfaces
|
|
|
|
EMC VNX 5300 Datamover Storage bytes over all interfaces
|
|
|
|
Graph category Memory:
|
|
|
|
EMC VNX 5300 Datamover Memory
|
|
|
|
EMC VNX 5300 File Buffer Cache
|
|
|
|
EMC VNX 5300 FileResolve
|
|
|
|
|
|
|
|
These are NFS (v3,v4) Graphs.
|
2018-03-29 02:54:31 +02:00
|
|
|
Graph category FS:
|
2017-01-19 19:05:05 +01:00
|
|
|
EMC VNX 5300 NFSv3 Calls per second
|
|
|
|
EMC VNX 5300 NFSv3 uSeconds per call
|
|
|
|
EMC VNX 5300 NFSv3 Op %
|
|
|
|
EMC VNX 5300 NFSv4 Calls per second
|
|
|
|
EMC VNX 5300 NFSv4 uSeconds per call
|
|
|
|
EMC VNX 5300 NFSv4 Op %
|
|
|
|
EMC VNX 5300 NFS Client Ops/s
|
|
|
|
EMC VNX 5300 NFS Client B/s
|
|
|
|
EMC VNX 5300 NFS Client Avg uSec/call
|
2017-02-02 16:22:09 +01:00
|
|
|
EMC VNX 5300 Std NFS Ops/s
|
|
|
|
EMC VNX 5300 Std NFS B/s
|
|
|
|
EMC VNX 5300 Std NFS Average Size Bytes
|
|
|
|
EMC VNX 5300 Std NFS Active Threads
|
2016-12-26 17:45:00 +01:00
|
|
|
|
|
|
|
=head1 COMPATIBILITY
|
|
|
|
|
2018-08-02 02:03:42 +02:00
|
|
|
The plugin has been written for being compatible with EMC VNX5300 Storage
|
2017-01-19 19:05:05 +01:00
|
|
|
system, as this is the only EMC storage which i have.
|
|
|
|
By the way, i am pretty sure it can also work with other VNX1 storages, like
|
|
|
|
VNX5100 and VNX5500.
|
2018-08-02 02:03:42 +02:00
|
|
|
About VNX2 series, i don't know whether the plugin will be able to work with
|
2017-01-19 19:05:05 +01:00
|
|
|
them. Maybe it would need some corrections in command-line backend. The same
|
2018-08-02 02:03:42 +02:00
|
|
|
situation is with other EMC systems, so i encourage you to try and fix the
|
|
|
|
plugin.
|
2016-12-26 17:45:00 +01:00
|
|
|
|
|
|
|
=head1 CONFIGURATION
|
|
|
|
|
2018-08-02 02:03:42 +02:00
|
|
|
The plugin uses SSH to connect to Control Stations. It's possible to use
|
2017-01-19 19:05:05 +01:00
|
|
|
'nasadmin' user, but it would be better if you create read-only global user by
|
|
|
|
Unisphere Client. The user should have only Operator role.
|
|
|
|
I created "operator" user but due to the fact that Control Stations already
|
2018-08-02 02:03:42 +02:00
|
|
|
had one internal "operator" user, the new one was called "operator1". So be
|
2017-01-19 19:05:05 +01:00
|
|
|
careful. After that, copy .bash_profile from /home/nasadmin to a newly created
|
2017-01-18 23:26:18 +01:00
|
|
|
/home/operator1
|
2018-08-02 02:03:42 +02:00
|
|
|
|
2017-01-19 19:05:05 +01:00
|
|
|
On munin-node side choose a user which will be used to connect through SSH.
|
2018-08-02 02:03:42 +02:00
|
|
|
Generally user "munin" is ok. Then, execute "sudo su munin -s /bin/bash",
|
|
|
|
"ssh-keygen" and "ssh-copy-id" to both Control Stations with newly created
|
2016-12-26 17:45:00 +01:00
|
|
|
user.
|
2018-08-02 02:03:42 +02:00
|
|
|
|
|
|
|
Make a link from /usr/share/munin/plugins/emc_vnx_file_stats to
|
|
|
|
/etc/munin/plugins/. If you want to get NFS statistics, name the link as
|
2017-01-19 19:05:05 +01:00
|
|
|
"emc_vnx_file_nfs_stats_<NAME>", otherwise to get Basic Datamover statistics
|
|
|
|
you have to name it "emc_vnx_file_basicdm_stats_<NAME>", where <NAME> is any
|
2018-08-02 02:03:42 +02:00
|
|
|
arbitrary name of your storage system. The plugin will return <NAME> in its
|
2017-01-19 19:05:05 +01:00
|
|
|
answer as "host_name" field.
|
2016-12-26 17:45:00 +01:00
|
|
|
|
|
|
|
For example, assume your storage system is called "VNX5300".
|
2018-08-02 02:03:42 +02:00
|
|
|
Make a configuration file at
|
2017-01-19 19:05:05 +01:00
|
|
|
/etc/munin/plugin-conf.d/emc_vnx_file_stats_VNX5300
|
2018-08-02 02:03:42 +02:00
|
|
|
|
2016-12-26 17:45:00 +01:00
|
|
|
[emc_vnx_file_*]
|
2018-08-02 02:03:42 +02:00
|
|
|
user munin
|
|
|
|
env.username operator1
|
|
|
|
env.cs_addr 192.168.1.1 192.168.1.2
|
|
|
|
env.nas_servers server_2 server_3
|
2017-01-19 19:05:05 +01:00
|
|
|
|
2018-08-02 02:03:42 +02:00
|
|
|
Where:
|
2017-01-19 19:05:05 +01:00
|
|
|
user - SSH Client local user
|
|
|
|
env.username - Remote user with Operator role
|
|
|
|
env.cs_addr - Control Stations addresses
|
|
|
|
env.nas_servers - This is the default value and can be omitted
|
2016-12-26 17:45:00 +01:00
|
|
|
|
|
|
|
=head1 HISTORY
|
|
|
|
|
|
|
|
08.11.2016 - First Release
|
|
|
|
17.11.2016 - NFSv4 support, Memory section
|
|
|
|
16.12.2016 - Merged "NFS" and "Datamover Stats" plugins
|
|
|
|
26.12.2016 - Compatibility with Munin coding style
|
|
|
|
|
|
|
|
=cut
|
2016-11-14 18:16:25 +01:00
|
|
|
|
|
|
|
export LANG=C
|
|
|
|
|
2017-01-19 00:07:21 +01:00
|
|
|
. "$MUNIN_LIBDIR/plugins/plugin.sh"
|
|
|
|
|
2017-01-26 16:13:12 +01:00
|
|
|
nas_server_ok=""
|
2017-02-02 16:22:09 +01:00
|
|
|
cs_addr=${cs_addr:=""}
|
|
|
|
username=${username:=""}
|
|
|
|
nas_servers=${nas_servers:="server_2 server_3"}
|
2017-01-26 18:19:40 +01:00
|
|
|
|
2018-08-02 02:03:42 +02:00
|
|
|
# Prints "10" on stdout if found Primary Online control station. "11" - for Secondary Online control station.
|
2017-01-19 00:48:58 +01:00
|
|
|
ssh_check_cmd() {
|
2017-02-02 18:14:16 +01:00
|
|
|
ssh -q "$username@$1" "/nasmcd/sbin/getreason | grep -w \"slot_\$(/nasmcd/sbin/t2slot)\" | cut -d- -f1 | awk '{print \$1}' "
|
|
|
|
|
2016-12-26 20:08:26 +01:00
|
|
|
}
|
2016-12-16 02:00:33 +01:00
|
|
|
|
2016-12-26 20:08:26 +01:00
|
|
|
check_conf () {
|
|
|
|
if [ -z "$username" ]; then
|
2016-12-26 21:31:37 +01:00
|
|
|
echo "No username ('username' environment variable)!"
|
2016-12-26 20:08:26 +01:00
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z "$cs_addr" ]; then
|
2016-12-26 21:31:37 +01:00
|
|
|
echo "No control station addresses ('cs_addr' environment variable)!"
|
2016-12-26 20:08:26 +01:00
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
#Choosing Cotrol Station. Code have to be "10"
|
|
|
|
for CS in $cs_addr; do
|
2017-02-05 23:46:17 +01:00
|
|
|
if [[ "10" = "$(ssh_check_cmd "$CS")" ]]; then
|
2016-12-26 20:08:26 +01:00
|
|
|
PRIMARY_CS=$CS
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ -z "$PRIMARY_CS" ]; then
|
|
|
|
echo "No alive primary Control Station from list \"$cs_addr\"";
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
return 0
|
|
|
|
}
|
2016-11-14 18:16:25 +01:00
|
|
|
|
|
|
|
if [ "$1" = "autoconf" ]; then
|
2016-12-26 20:08:26 +01:00
|
|
|
check_conf_ans=$(check_conf)
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
echo "yes"
|
|
|
|
else
|
|
|
|
echo "no ($check_conf_ans)"
|
|
|
|
fi
|
2016-11-14 18:16:25 +01:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2016-12-26 20:08:26 +01:00
|
|
|
if [ "$1" = "suggest" ]; then
|
|
|
|
echo "nfs_stats"
|
|
|
|
echo "basicdm_stats"
|
|
|
|
exit 0;
|
2016-11-14 18:16:25 +01:00
|
|
|
fi
|
|
|
|
|
2016-12-26 20:08:26 +01:00
|
|
|
STATSTYPE=$(echo "${0##*/}" | cut -d _ -f 1-5)
|
2018-08-02 02:03:42 +02:00
|
|
|
if [ "$STATSTYPE" = "emc_vnx_file_nfs_stats" ]; then STATSTYPE=NFS;
|
2016-12-26 21:50:15 +01:00
|
|
|
elif [ "$STATSTYPE" = "emc_vnx_file_basicdm_stats" ]; then STATSTYPE=BASICDM;
|
2017-01-26 16:13:12 +01:00
|
|
|
else echo "Do not know what to do. Name the plugin as 'emc_vnx_file_nfs_stats_<HOSTNAME>' or 'emc_vnx_file_basicdm_stats_<HOSTNAME>'" >&2; exit 1; fi
|
2016-11-14 18:16:25 +01:00
|
|
|
|
2016-12-26 20:08:26 +01:00
|
|
|
TARGET=$(echo "${0##*/}" | cut -d _ -f 6)
|
2016-11-14 18:16:25 +01:00
|
|
|
|
2017-01-18 23:26:18 +01:00
|
|
|
check_conf 1>&2 || exit 1
|
2016-11-14 18:16:25 +01:00
|
|
|
|
2017-01-18 23:26:18 +01:00
|
|
|
run_remote () {
|
2017-02-03 23:34:35 +01:00
|
|
|
# shellcheck disable=SC2029
|
2017-01-26 16:13:12 +01:00
|
|
|
ssh -q "$username@$PRIMARY_CS" ". /home/$username/.bash_profile; $*"
|
2017-01-18 23:26:18 +01:00
|
|
|
}
|
2016-11-14 18:16:25 +01:00
|
|
|
|
|
|
|
echo "host_name ${TARGET}"
|
|
|
|
|
|
|
|
if [ "$1" = "config" ] ; then
|
2017-02-02 16:22:09 +01:00
|
|
|
# TODO: active/active
|
2016-11-14 18:16:25 +01:00
|
|
|
for server in $nas_servers; do
|
2017-01-26 16:13:12 +01:00
|
|
|
run_remote nas_server -i "$server" | grep -q 'type *= nas' || continue
|
2016-11-14 18:16:25 +01:00
|
|
|
nas_server_ok=TRUE
|
2017-02-02 16:22:09 +01:00
|
|
|
filtered_server="$(clean_fieldname "$server")"
|
2018-08-02 02:03:42 +02:00
|
|
|
|
2017-01-26 16:13:12 +01:00
|
|
|
if [ "$STATSTYPE" = "BASICDM" ] ; then
|
2018-08-02 02:03:42 +02:00
|
|
|
cat <<-EOF
|
2016-12-26 21:31:37 +01:00
|
|
|
multigraph emc_vnx_cpu_percent
|
|
|
|
graph_title EMC VNX 5300 Datamover CPU Util %
|
|
|
|
graph_vlabel %
|
|
|
|
graph_category cpu
|
|
|
|
graph_scale no
|
|
|
|
graph_args --upper-limit 100 -l 0
|
|
|
|
${server}_cpuutil.min 0
|
|
|
|
${server}_cpuutil.label $server CPU util. in %.
|
|
|
|
|
2017-01-19 19:47:49 +01:00
|
|
|
multigraph emc_vnx_network_b
|
2016-12-26 21:31:37 +01:00
|
|
|
graph_title EMC VNX 5300 Datamover Network bytes over all interfaces
|
|
|
|
graph_vlabel B/s recv. (-) / sent (+)
|
|
|
|
graph_category network
|
|
|
|
graph_args --base 1000
|
|
|
|
${server}_net_in.graph no
|
|
|
|
${server}_net_in.label none
|
2017-01-19 19:47:49 +01:00
|
|
|
${server}_net_out.label $server B/s
|
2016-12-26 21:31:37 +01:00
|
|
|
${server}_net_out.negative ${server}_net_in
|
|
|
|
${server}_net_out.draw AREA
|
|
|
|
|
2017-01-19 19:47:49 +01:00
|
|
|
multigraph emc_vnx_storage_b
|
2016-12-26 21:31:37 +01:00
|
|
|
graph_title EMC VNX 5300 Datamover Storage bytes over all interfaces
|
|
|
|
graph_vlabel B/s recv. (-) / sent (+)
|
|
|
|
graph_category network
|
|
|
|
graph_args --base 1000
|
|
|
|
${server}_stor_read.graph no
|
|
|
|
${server}_stor_read.label none
|
2017-01-19 19:47:49 +01:00
|
|
|
${server}_stor_write.label $server B/s
|
2016-12-26 21:31:37 +01:00
|
|
|
${server}_stor_write.negative ${server}_stor_read
|
|
|
|
${server}_stor_write.draw AREA
|
|
|
|
|
|
|
|
multigraph emc_vnx_memory
|
|
|
|
graph_title EMC VNX 5300 Datamover Memory
|
2017-01-23 20:00:52 +01:00
|
|
|
graph_vlabel KiB
|
2016-12-26 21:31:37 +01:00
|
|
|
graph_category memory
|
|
|
|
graph_args --base 1024
|
|
|
|
graph_order ${server}_used ${server}_free ${server}_total ${server}_freebuffer ${server}_encumbered
|
|
|
|
${server}_used.label ${server} Used
|
|
|
|
${server}_free.label ${server} Free
|
|
|
|
${server}_free.draw STACK
|
|
|
|
${server}_total.label ${server} Total
|
|
|
|
${server}_freebuffer.label ${server} Free Buffer
|
|
|
|
${server}_encumbered.label ${server} Encumbered
|
2018-08-02 02:03:42 +02:00
|
|
|
|
2016-12-26 21:31:37 +01:00
|
|
|
multigraph emc_vnx_filecache
|
|
|
|
graph_title EMC VNX 5300 File Buffer Cache
|
|
|
|
graph_vlabel per second
|
|
|
|
graph_category memory
|
|
|
|
graph_args --base 1000
|
|
|
|
graph_order ${server}_highw_hits ${server}_loww_hits ${server}_w_hits ${server}_hits ${server}_lookups
|
|
|
|
${server}_highw_hits.label High Watermark Hits
|
|
|
|
${server}_loww_hits.label Low Watermark Hits
|
|
|
|
${server}_loww_hits.draw STACK
|
|
|
|
${server}_w_hits.label Watermark Hits
|
|
|
|
${server}_hits.label Hits
|
|
|
|
${server}_lookups.label Lookups
|
2018-08-02 02:03:42 +02:00
|
|
|
|
2016-12-26 21:31:37 +01:00
|
|
|
multigraph emc_vnx_fileresolve
|
|
|
|
graph_title EMC VNX 5300 FileResolve
|
|
|
|
graph_vlabel Entries
|
|
|
|
graph_category memory
|
|
|
|
graph_args --base 1000
|
|
|
|
${server}_dropped.label Dropped Entries
|
|
|
|
${server}_max.label Max Limit
|
|
|
|
${server}_used.label Used Entries
|
|
|
|
EOF
|
2017-01-18 23:51:31 +01:00
|
|
|
fi
|
2017-01-26 16:13:12 +01:00
|
|
|
if [ "$STATSTYPE" = "NFS" ] ; then
|
2016-11-14 18:16:25 +01:00
|
|
|
#nfs.v3.op data
|
2017-01-26 15:22:49 +01:00
|
|
|
# [nasadmin@mnemonic0 ~]$ server_stats server_2 -info nfs.v3.op
|
2018-08-02 02:03:42 +02:00
|
|
|
# server_2 :
|
|
|
|
#
|
2017-01-26 15:22:49 +01:00
|
|
|
# name = nfs.v3.op
|
|
|
|
# description = NFS V3 per operation statistics
|
|
|
|
# type = Set
|
|
|
|
# member_stats = nfs.v3.op.ALL-ELEMENTS.calls,nfs.v3.op.ALL-ELEMENTS.failures,nfs.v3.op.ALL-ELEMENTS.avgTime,nfs.v3.op.ALL-ELEMENTS.opPct
|
|
|
|
# member_elements = nfs.v3.op.v3Null,nfs.v3.op.v3GetAttr,nfs.v3.op.v3SetAttr,nfs.v3.op.v3Lookup,nfs.v3.op.v3Access,nfs.v3.op.v3ReadLink,nfs.v3.op.v3Read,nfs.v3.op.v3Write,nfs.v3.op.v3Create,nfs.v3.op.v3Mkdir,nfs.v3.op.v3Symlink,nfs.v3.op.v3Mknod,nfs.v3.op.v3Remove,nfs.v3.op.v3Rmdir,nfs.v3.op.v3Rename,nfs.v3.op.v3Link,nfs.v3.op.v3ReadDir,nfs.v3.op.v3ReadDirPlus,nfs.v3.op.v3FsStat,nfs.v3.op.v3FsInfo,nfs.v3.op.v3PathConf,nfs.v3.op.v3Commit,nfs.v3.op.VAAI
|
|
|
|
# member_of = nfs.v3
|
2017-01-19 19:59:15 +01:00
|
|
|
member_elements_by_line=$(run_remote server_stats "$server" -info nfs.v3.op | grep member_elements | sed -ne 's/^.*= //p')
|
|
|
|
IFS=',' read -ra graphs <<< "$member_elements_by_line"
|
2018-08-02 02:03:42 +02:00
|
|
|
cat <<-EOF
|
2016-12-26 21:31:37 +01:00
|
|
|
multigraph vnx_emc_v3_calls_s
|
|
|
|
graph_title EMC VNX 5300 NFSv3 Calls per second
|
|
|
|
graph_vlabel Calls
|
2017-02-23 04:29:44 +01:00
|
|
|
graph_category fs
|
2016-12-26 21:31:37 +01:00
|
|
|
graph_args --base 1000
|
|
|
|
EOF
|
|
|
|
for graph in "${graphs[@]}"; do
|
|
|
|
field=$(echo "$graph" | cut -d '.' -f4 )
|
|
|
|
echo "${server}_$field.label $server $field"
|
|
|
|
done
|
|
|
|
|
|
|
|
cat <<-EOF
|
2018-08-02 02:03:42 +02:00
|
|
|
|
2016-12-26 21:31:37 +01:00
|
|
|
multigraph vnx_emc_v3_usec_call
|
|
|
|
graph_title EMC VNX 5300 NFSv3 uSeconds per call
|
|
|
|
graph_vlabel uSec / call
|
2017-02-23 04:29:44 +01:00
|
|
|
graph_category fs
|
2016-12-26 21:31:37 +01:00
|
|
|
graph_args --base 1000
|
|
|
|
EOF
|
|
|
|
for graph in "${graphs[@]}"; do
|
|
|
|
field=$(echo "$graph" | cut -d '.' -f4 )
|
|
|
|
echo "${server}_$field.label $server $field"
|
|
|
|
done
|
|
|
|
cat <<-EOF
|
|
|
|
|
|
|
|
multigraph vnx_emc_v3_op_percent
|
|
|
|
graph_title EMC VNX 5300 NFSv3 Op %
|
|
|
|
graph_vlabel %
|
|
|
|
graph_scale no
|
2017-02-23 04:29:44 +01:00
|
|
|
graph_category fs
|
2016-12-26 21:31:37 +01:00
|
|
|
EOF
|
|
|
|
for graph in "${graphs[@]}"; do
|
|
|
|
field=$(echo "$graph" | cut -d '.' -f4 )
|
|
|
|
echo "${server}_$field.label $server $field"
|
|
|
|
echo "${server}_$field.min 0"
|
|
|
|
done
|
|
|
|
graphs=()
|
2016-11-17 16:03:09 +01:00
|
|
|
#nfs.v4.op data
|
2017-01-19 19:59:15 +01:00
|
|
|
member_elements_by_line=$(run_remote server_stats "$server" -info nfs.v4.op | grep member_elements | sed -ne 's/^.*= //p')
|
|
|
|
IFS=',' read -ra graphs <<< "$member_elements_by_line"
|
2016-12-26 21:31:37 +01:00
|
|
|
cat <<-EOF
|
|
|
|
multigraph vnx_emc_v4_calls_s
|
|
|
|
graph_title EMC VNX 5300 NFSv4 Calls per second
|
|
|
|
graph_vlabel Calls
|
2017-02-23 04:29:44 +01:00
|
|
|
graph_category fs
|
2016-12-26 21:31:37 +01:00
|
|
|
graph_args --base 1000
|
|
|
|
EOF
|
|
|
|
for graph in "${graphs[@]}"; do
|
|
|
|
field=$(echo "$graph" | cut -d '.' -f4 )
|
|
|
|
echo "${server}_$field.label $server $field"
|
|
|
|
done
|
|
|
|
|
|
|
|
cat <<-EOF
|
|
|
|
|
|
|
|
multigraph vnx_emc_v4_usec_call
|
|
|
|
graph_title EMC VNX 5300 NFSv4 uSeconds per call
|
|
|
|
graph_vlabel uSec / call
|
2017-02-23 04:29:44 +01:00
|
|
|
graph_category fs
|
2016-12-26 21:31:37 +01:00
|
|
|
graph_args --base 1000
|
|
|
|
EOF
|
|
|
|
for graph in "${graphs[@]}"; do
|
|
|
|
field=$(echo "$graph" | cut -d '.' -f4 )
|
|
|
|
echo "${server}_$field.label $server $field"
|
|
|
|
done
|
|
|
|
cat <<-EOF
|
2018-08-02 02:03:42 +02:00
|
|
|
|
2016-12-26 21:31:37 +01:00
|
|
|
multigraph vnx_emc_v4_op_percent
|
|
|
|
graph_title EMC VNX 5300 NFSv4 Op %
|
|
|
|
graph_vlabel %
|
|
|
|
graph_scale no
|
2017-02-23 04:29:44 +01:00
|
|
|
graph_category fs
|
2016-12-26 21:31:37 +01:00
|
|
|
EOF
|
|
|
|
for graph in "${graphs[@]}"; do
|
|
|
|
field=$(echo "$graph" | cut -d '.' -f4 )
|
|
|
|
echo "${server}_$field.label $server $field"
|
|
|
|
echo "${server}_$field.min 0"
|
|
|
|
done
|
2016-11-14 18:16:25 +01:00
|
|
|
|
|
|
|
#nfs.client data
|
2018-08-02 02:03:42 +02:00
|
|
|
# Total Read Write Suspicious Total Read Write Avg
|
2016-11-14 18:16:25 +01:00
|
|
|
# Ops/s Ops/s Ops/s Ops diff KiB/s KiB/s KiB/s uSec/call
|
2017-01-19 19:59:15 +01:00
|
|
|
member_elements_by_line=$(run_remote server_stats server_2 -monitor nfs.client -count 1 -terminationsummary no -titles never | sed -ne 's/^.*id=//p' | cut -d' ' -f1)
|
2017-01-26 15:22:49 +01:00
|
|
|
#Somewhy readarray adds extra \n in the end of each variable. So, we use read() with a workaround
|
|
|
|
IFS=$'\n' read -rd '' -a graphs_array <<< "$member_elements_by_line"
|
2016-12-26 21:31:37 +01:00
|
|
|
cat <<-EOF
|
|
|
|
|
|
|
|
multigraph vnx_emc_nfs_client_ops_s
|
|
|
|
graph_title EMC VNX 5300 NFS Client Ops/s
|
|
|
|
graph_vlabel Ops/s
|
2017-02-23 04:29:44 +01:00
|
|
|
graph_category fs
|
2016-12-26 21:31:37 +01:00
|
|
|
EOF
|
|
|
|
echo -n "graph_order "
|
2017-01-18 23:51:31 +01:00
|
|
|
for graph in "${graphs_array[@]}"; do
|
2017-01-23 20:00:52 +01:00
|
|
|
field="$(clean_fieldname "_$graph")"
|
|
|
|
echo -n "${server}${field}_r ${server}${field}_w ${server}${field}_t ${server}${field}_s "
|
2016-12-26 21:31:37 +01:00
|
|
|
done
|
|
|
|
echo " "
|
2017-01-18 23:51:31 +01:00
|
|
|
for graph in "${graphs_array[@]}"; do
|
2017-01-23 20:00:52 +01:00
|
|
|
field="$(clean_fieldname "_$graph")"
|
|
|
|
echo "${server}${field}_r.label $server $graph Read Ops/s"
|
|
|
|
echo "${server}${field}_w.label $server $graph Write Ops/s"
|
|
|
|
echo "${server}${field}_w.draw STACK"
|
|
|
|
echo "${server}${field}_t.label $server $graph Total Ops/s"
|
|
|
|
echo "${server}${field}_s.label $server $graph Suspicious Ops diff"
|
2016-12-26 21:31:37 +01:00
|
|
|
done
|
|
|
|
|
|
|
|
cat <<-EOF
|
|
|
|
|
2017-01-19 19:47:49 +01:00
|
|
|
multigraph vnx_emc_nfs_client_b_s
|
2016-12-26 21:31:37 +01:00
|
|
|
graph_title EMC VNX 5300 NFS Client B/s
|
|
|
|
graph_vlabel B/s
|
2017-02-23 04:29:44 +01:00
|
|
|
graph_category fs
|
2016-12-26 21:31:37 +01:00
|
|
|
EOF
|
|
|
|
echo -n "graph_order "
|
2017-01-18 23:51:31 +01:00
|
|
|
for graph in "${graphs_array[@]}"; do
|
2017-01-23 20:00:52 +01:00
|
|
|
field="$(clean_fieldname "_$graph")"
|
|
|
|
echo -n "${server}${field}_r ${server}${field}_w ${server}${field}_t "
|
2016-12-26 21:31:37 +01:00
|
|
|
done
|
|
|
|
echo " "
|
2017-01-18 23:51:31 +01:00
|
|
|
for graph in "${graphs_array[@]}"; do
|
2017-01-23 20:00:52 +01:00
|
|
|
field="$(clean_fieldname "_$graph")"
|
|
|
|
echo "${server}${field}_r.label $server $graph Read B/s"
|
|
|
|
echo "${server}${field}_w.label $server $graph Write B/s"
|
|
|
|
echo "${server}${field}_w.draw STACK"
|
|
|
|
echo "${server}${field}_t.label $server $graph Total B/s"
|
2016-12-26 21:31:37 +01:00
|
|
|
done
|
|
|
|
|
|
|
|
cat <<-EOF
|
|
|
|
|
|
|
|
multigraph vnx_emc_nfs_client_avg_usec
|
|
|
|
graph_title EMC VNX 5300 NFS Client Avg uSec/call
|
|
|
|
graph_vlabel uSec/call
|
2017-02-23 04:29:44 +01:00
|
|
|
graph_category fs
|
2016-12-26 21:31:37 +01:00
|
|
|
EOF
|
2017-01-18 23:51:31 +01:00
|
|
|
for graph in "${graphs_array[@]}"; do
|
2017-01-23 20:00:52 +01:00
|
|
|
field="$(clean_fieldname "_$graph")"
|
|
|
|
echo "${server}${field}.label $server $graph Avg uSec/call"
|
2016-12-26 21:31:37 +01:00
|
|
|
done
|
2017-02-02 16:22:09 +01:00
|
|
|
|
|
|
|
#nfs-std
|
2018-08-02 02:03:42 +02:00
|
|
|
# Timestamp NFS Read Read Read Size Write Write Write Size Active
|
|
|
|
# Ops/s Ops/s KiB/s Bytes Ops/s KiB/s Bytes Threads
|
2017-02-02 16:22:09 +01:00
|
|
|
cat <<-EOF
|
|
|
|
|
|
|
|
multigraph vnx_emc_nfs_std_nfs_ops
|
|
|
|
graph_title EMC VNX 5300 Std NFS Ops/s
|
|
|
|
graph_vlabel Ops/s
|
2017-02-23 04:29:44 +01:00
|
|
|
graph_category fs
|
2017-02-02 16:22:09 +01:00
|
|
|
EOF
|
|
|
|
echo "graph_order ${filtered_server}_rops ${filtered_server}_wops ${filtered_server}_tops"
|
|
|
|
echo "${filtered_server}_rops.label $server Read Ops/s"
|
|
|
|
echo "${filtered_server}_wops.label $server Write Ops/s"
|
|
|
|
echo "${filtered_server}_wops.draw STACK"
|
|
|
|
echo "${filtered_server}_tops.label $server Total Ops/s"
|
2018-08-02 02:03:42 +02:00
|
|
|
|
2017-02-02 16:22:09 +01:00
|
|
|
cat <<-EOF
|
|
|
|
|
|
|
|
multigraph vnx_emc_nfs_std_nfs_b_s
|
|
|
|
graph_title EMC VNX 5300 Std NFS B/s
|
|
|
|
graph_vlabel B/s
|
2017-02-23 04:29:44 +01:00
|
|
|
graph_category fs
|
2017-02-02 16:22:09 +01:00
|
|
|
EOF
|
|
|
|
echo "graph_order ${filtered_server}_rbs ${filtered_server}_wbs ${filtered_server}_tbs"
|
|
|
|
echo "${filtered_server}_rbs.label $server Read B/s"
|
|
|
|
echo "${filtered_server}_wbs.label $server Write B/s"
|
|
|
|
echo "${filtered_server}_wbs.draw STACK"
|
|
|
|
echo "${filtered_server}_tbs.label $server Total B/s"
|
|
|
|
echo "${filtered_server}_tbs.cdef ${filtered_server}_rbs,${filtered_server}_wbs,+"
|
2018-08-02 02:03:42 +02:00
|
|
|
|
2017-02-02 16:22:09 +01:00
|
|
|
cat <<-EOF
|
|
|
|
|
|
|
|
multigraph vnx_emc_nfs_std_nfs_avg
|
|
|
|
graph_title EMC VNX 5300 Std NFS Average Size Bytes
|
|
|
|
graph_vlabel Bytes
|
2017-02-23 04:29:44 +01:00
|
|
|
graph_category fs
|
2017-02-02 16:22:09 +01:00
|
|
|
EOF
|
|
|
|
echo "${filtered_server}_avg_readsize.label $server Average Read Size Bytes"
|
|
|
|
echo "${filtered_server}_avg_writesize.label $server Average Write Size Bytes"
|
|
|
|
|
|
|
|
cat <<-EOF
|
|
|
|
|
|
|
|
multigraph vnx_emc_nfs_std_nfs_threads
|
|
|
|
graph_title EMC VNX 5300 Std NFS Active Threads
|
|
|
|
graph_vlabel Threads
|
2017-02-23 04:29:44 +01:00
|
|
|
graph_category fs
|
2017-02-02 16:22:09 +01:00
|
|
|
EOF
|
|
|
|
echo "${filtered_server}_threads.label $server Active Threads"
|
2016-12-16 02:00:33 +01:00
|
|
|
fi
|
2016-11-14 18:16:25 +01:00
|
|
|
done
|
2017-01-26 16:13:12 +01:00
|
|
|
if [ -z "$nas_server_ok" ]; then
|
2017-01-19 00:27:39 +01:00
|
|
|
echo "No active data movers!" 1>&2
|
2016-11-14 18:16:25 +01:00
|
|
|
fi
|
2017-01-19 00:27:39 +01:00
|
|
|
exit 0
|
2016-11-14 18:16:25 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
for server in $nas_servers; do
|
2017-02-03 23:34:35 +01:00
|
|
|
run_remote nas_server -i "$server" | grep -q 'type *= nas' || continue
|
2016-11-14 18:16:25 +01:00
|
|
|
nas_server_ok=TRUE
|
2017-02-02 16:22:09 +01:00
|
|
|
filtered_server="$(clean_fieldname "$server")"
|
|
|
|
|
2017-01-26 16:13:12 +01:00
|
|
|
if [ "$STATSTYPE" = "BASICDM" ] ; then
|
2017-01-23 20:00:52 +01:00
|
|
|
#basicdm data
|
2018-08-02 02:03:42 +02:00
|
|
|
# [nasadmin@mnemonic0 ~]$ server_stats server_2 -count 1 -terminationsummary no
|
|
|
|
# server_2 CPU Network Network dVol dVol
|
|
|
|
# Timestamp Util In Out Read Write
|
|
|
|
# % KiB/s KiB/s KiB/s KiB/s
|
2017-01-23 20:00:52 +01:00
|
|
|
# 20:42:26 9 16432 3404 1967 24889
|
|
|
|
|
2017-02-02 16:22:09 +01:00
|
|
|
member_elements_by_line=$(run_remote server_stats "$server" -count 1 -terminationsummary no -titles never | grep '^[^[:space:]]')
|
|
|
|
IFS=$' ' read -ra graphs <<< "$member_elements_by_line"
|
2017-01-19 20:07:01 +01:00
|
|
|
|
2017-02-02 16:22:09 +01:00
|
|
|
echo "multigraph emc_vnx_cpu_percent"
|
|
|
|
echo "${server}_cpuutil.value ${graphs[1]}"
|
2017-01-19 20:07:01 +01:00
|
|
|
|
2017-02-02 16:22:09 +01:00
|
|
|
echo -e "\nmultigraph emc_vnx_network_b"
|
2017-02-03 23:34:35 +01:00
|
|
|
echo "${server}_net_in.value $((graphs[2] * 1024))"
|
|
|
|
echo "${server}_net_out.value $((graphs[3] * 1024))"
|
2017-01-19 20:07:01 +01:00
|
|
|
|
2017-02-02 16:22:09 +01:00
|
|
|
echo -e "\nmultigraph emc_vnx_storage_b"
|
2017-02-03 23:34:35 +01:00
|
|
|
echo "${server}_stor_read.value $((graphs[4] * 1024))"
|
|
|
|
echo "${server}_stor_write.value $((graphs[5] * 1024))"
|
2017-01-23 20:00:52 +01:00
|
|
|
|
2018-08-02 02:03:42 +02:00
|
|
|
# [nasadmin@mnemonic0 ~]$ server_stats server_2 -monitor kernel.memory -count 1 -terminationsummary no
|
|
|
|
# server_2 Free Buffer Buffer Buffer Buffer Buffer Buffer Cache Encumbered FileResolve FileResolve FileResolve Free KiB Page Total Used KiB Memory
|
|
|
|
# Timestamp Buffer Cache High Cache Cache Cache Cache Low Watermark Memory Dropped Max Used Size Memory Util
|
|
|
|
# KiB Watermark Hits/s Hit % Hits/s Lookups/s Watermark Hits/s Hits/s KiB Entries Limit Entries KiB KiB %
|
2017-01-23 20:00:52 +01:00
|
|
|
# 20:44:14 3522944 0 96 11562 12010 0 0 3579268 0 0 0 3525848 8 6291456 2765608 44
|
2017-01-19 20:07:01 +01:00
|
|
|
|
2017-02-02 16:22:09 +01:00
|
|
|
member_elements_by_line=$(run_remote server_stats "$server" -monitor kernel.memory -count 1 -terminationsummary no -titles never | grep '^[^[:space:]]')
|
|
|
|
IFS=$' ' read -ra graphs <<< "$member_elements_by_line"
|
2017-01-19 20:07:01 +01:00
|
|
|
|
2017-02-02 16:22:09 +01:00
|
|
|
echo -e "\nmultigraph emc_vnx_memory"
|
|
|
|
#Reserved for math
|
2018-08-02 02:03:42 +02:00
|
|
|
echo "${server}_total.value $((graphs[14] / 1))"
|
2017-02-03 23:34:35 +01:00
|
|
|
echo "${server}_used.value $((graphs[15] / 1))"
|
|
|
|
echo "${server}_free.value $((graphs[12] / 1))"
|
|
|
|
echo "${server}_freebuffer.value $((graphs[1] / 1))"
|
|
|
|
echo "${server}_encumbered.value $((graphs[8] / 1))"
|
2017-01-19 20:07:01 +01:00
|
|
|
|
2017-02-02 16:22:09 +01:00
|
|
|
echo -e "\nmultigraph emc_vnx_filecache"
|
|
|
|
echo "${server}_highw_hits.value ${graphs[2]}"
|
|
|
|
echo "${server}_loww_hits.value ${graphs[6]}"
|
|
|
|
echo "${server}_w_hits.value ${graphs[7]}"
|
|
|
|
echo "${server}_hits.value ${graphs[4]}"
|
|
|
|
echo "${server}_lookups.value ${graphs[5]}"
|
2017-01-19 20:07:01 +01:00
|
|
|
|
2017-02-02 16:22:09 +01:00
|
|
|
echo -e "\nmultigraph emc_vnx_fileresolve"
|
|
|
|
echo "${server}_dropped.value ${graphs[9]}"
|
|
|
|
echo "${server}_max.value ${graphs[10]}"
|
|
|
|
echo "${server}_used.value ${graphs[11]}"
|
2016-12-16 02:00:33 +01:00
|
|
|
|
|
|
|
|
|
|
|
fi
|
2017-01-26 16:13:12 +01:00
|
|
|
if [ "$STATSTYPE" = "NFS" ] ; then
|
2016-11-17 16:03:09 +01:00
|
|
|
#nfs.v3.op data
|
2017-01-23 20:15:56 +01:00
|
|
|
# [nasadmin@mnemonic0 ~]$ server_stats server_2 -monitor nfs.v3.op -count 1 -terminationsummary no
|
2018-08-02 02:03:42 +02:00
|
|
|
# server_2 NFS Op NFS NFS Op NFS NFS Op %
|
|
|
|
# Timestamp Op Errors Op
|
|
|
|
# Calls/s diff uSec/Call
|
2017-01-23 20:15:56 +01:00
|
|
|
# 22:14:41 v3GetAttr 30 0 23 21
|
|
|
|
# v3Lookup 40 0 98070 27
|
|
|
|
# v3Access 50 0 20 34
|
|
|
|
# v3Read 4 0 11180 3
|
|
|
|
# v3Write 2 0 2334 1
|
|
|
|
# v3Create 1 0 1743 1
|
|
|
|
# v3Mkdir 13 0 953 9
|
|
|
|
# v3Link 6 0 1064 4
|
|
|
|
|
2017-02-02 16:22:09 +01:00
|
|
|
member_elements_by_line=$(run_remote server_stats "$server" -monitor nfs.v3.op -count 1 -terminationsummary no -titles never | sed -ne 's/^.*v3/v3/p')
|
|
|
|
NUMCOL=5
|
|
|
|
LINES=$(wc -l <<< "$member_elements_by_line")
|
|
|
|
while IFS=$'\n' read -ra graphs ; do
|
|
|
|
elements_array+=( $graphs )
|
|
|
|
done <<< "$member_elements_by_line"
|
2018-08-02 02:03:42 +02:00
|
|
|
|
2017-02-02 16:22:09 +01:00
|
|
|
if [ "${#elements_array[@]}" -eq "0" ]; then LINES=0; fi
|
2016-11-14 18:16:25 +01:00
|
|
|
|
2017-02-02 16:22:09 +01:00
|
|
|
echo "multigraph vnx_emc_v3_calls_s"
|
|
|
|
for ((i=0; i<$((LINES)); i++ )); do
|
|
|
|
echo "${server}_${elements_array[i*$NUMCOL]}".value "${elements_array[i*$NUMCOL+1]}"
|
|
|
|
done
|
2016-11-14 18:16:25 +01:00
|
|
|
|
2017-02-02 16:22:09 +01:00
|
|
|
echo -e "\nmultigraph vnx_emc_v3_usec_call"
|
|
|
|
for ((i=0; i<$((LINES)); i++ )); do
|
|
|
|
echo "${server}_${elements_array[i*$NUMCOL]}".value "${elements_array[i*$NUMCOL+3]}"
|
|
|
|
done
|
|
|
|
|
|
|
|
echo -e "\nmultigraph vnx_emc_v3_op_percent"
|
|
|
|
for ((i=0; i<$((LINES)); i++ )); do
|
|
|
|
echo "${server}_${elements_array[i*$NUMCOL]}".value "${elements_array[i*$NUMCOL+4]}"
|
|
|
|
done
|
2016-11-14 18:16:25 +01:00
|
|
|
|
2017-02-02 16:22:09 +01:00
|
|
|
elements_array=()
|
2016-11-17 16:03:09 +01:00
|
|
|
|
|
|
|
#nfs.v4.op data
|
2017-01-23 20:15:56 +01:00
|
|
|
# [nasadmin@mnemonic0 ~]$ server_stats server_2 -monitor nfs.v4.op -count 1 -terminationsummary no
|
2018-08-02 02:03:42 +02:00
|
|
|
# server_2 NFS Op NFS NFS Op NFS NFS Op %
|
|
|
|
# Timestamp Op Errors Op
|
|
|
|
# Calls/s diff uSec/Call
|
2017-01-23 20:15:56 +01:00
|
|
|
# 22:13:14 v4Compound 2315 0 7913 30
|
|
|
|
# v4Access 246 0 5 3
|
|
|
|
# v4Close 133 0 11 2
|
|
|
|
# v4Commit 2 0 6928 0
|
|
|
|
# v4Create 1 0 881 0
|
|
|
|
# v4DelegRet 84 0 19 1
|
|
|
|
# v4GetAttr 1330 0 7 17
|
|
|
|
# v4GetFh 164 0 3 2
|
|
|
|
# v4Lookup 68 0 43 1
|
|
|
|
# v4Open 132 0 1061 2
|
|
|
|
# v4PutFh 2314 0 11 30
|
|
|
|
# v4Read 359 0 15561 5
|
|
|
|
# v4ReadDir 1 0 37 0
|
|
|
|
# v4Remove 62 0 1096 1
|
|
|
|
# v4Rename 1 0 947 0
|
|
|
|
# v4Renew 2 0 3 0
|
|
|
|
# v4SaveFh 1 0 3 0
|
|
|
|
# v4SetAttr 9 0 889 0
|
|
|
|
# v4Write 525 0 16508 7
|
|
|
|
|
2017-02-02 16:22:09 +01:00
|
|
|
member_elements_by_line=$(run_remote server_stats "$server" -monitor nfs.v4.op -count 1 -terminationsummary no -titles never | sed -ne 's/^.*v4/v4/p')
|
|
|
|
NUMCOL=5
|
|
|
|
LINES=$(wc -l <<< "$member_elements_by_line")
|
|
|
|
while IFS=$'\n' read -ra graphs ; do
|
|
|
|
elements_array+=( $graphs )
|
|
|
|
done <<< "$member_elements_by_line"
|
2016-11-17 16:03:09 +01:00
|
|
|
|
2017-02-02 16:22:09 +01:00
|
|
|
if [ "${#elements_array[@]}" -eq "0" ]; then LINES=0; fi
|
2017-01-23 20:00:52 +01:00
|
|
|
|
2017-02-02 16:22:09 +01:00
|
|
|
echo -e "\nmultigraph vnx_emc_v4_calls_s"
|
|
|
|
for ((i=0; i<$((LINES)); i++ )); do
|
|
|
|
echo "${server}_${elements_array[i*$NUMCOL]}".value "${elements_array[i*$NUMCOL+1]}"
|
|
|
|
done
|
2016-11-17 16:03:09 +01:00
|
|
|
|
2017-02-02 16:22:09 +01:00
|
|
|
echo -e "\nmultigraph vnx_emc_v4_usec_call"
|
|
|
|
for ((i=0; i<$((LINES)); i++ )); do
|
|
|
|
echo "${server}_${elements_array[i*$NUMCOL]}".value "${elements_array[i*$NUMCOL+3]}"
|
|
|
|
done
|
2016-11-17 16:03:09 +01:00
|
|
|
|
2017-02-02 16:22:09 +01:00
|
|
|
echo -e "\nmultigraph vnx_emc_v4_op_percent"
|
|
|
|
for ((i=0; i<$((LINES)); i++ )); do
|
|
|
|
echo "${server}_${elements_array[i*$NUMCOL]}".value "${elements_array[i*$NUMCOL+4]}"
|
|
|
|
done
|
2016-11-17 16:03:09 +01:00
|
|
|
|
2017-02-02 16:22:09 +01:00
|
|
|
elements_array=()
|
2016-11-17 16:03:09 +01:00
|
|
|
|
2016-11-14 18:16:25 +01:00
|
|
|
#nfs.client data
|
2018-08-02 02:03:42 +02:00
|
|
|
# [nasadmin@mnemonic0 ~]$ server_stats server_2 -monitor nfs.client -count 1 -terminationsummary no
|
|
|
|
# server_2 Client NFS NFS NFS NFS NFS NFS NFS NFS
|
|
|
|
# Timestamp Total Read Write Suspicious Total Read Write Avg
|
2017-01-23 20:00:52 +01:00
|
|
|
# Ops/s Ops/s Ops/s Ops diff KiB/s KiB/s KiB/s uSec/call
|
|
|
|
# 20:26:38 id=192.168.1.223 2550 20 2196 13 4673 159 4514 1964
|
|
|
|
# id=192.168.1.2 691 4 5 1 1113 425 688 2404
|
|
|
|
# id=192.168.1.1 159 0 0 51 0 0 0 6017
|
|
|
|
# id=192.168.1.6 37 4 2 0 586 295 291 5980
|
|
|
|
# id=192.168.1.235 21 1 0 0 0 0 0 155839
|
|
|
|
# id=192.168.1.224 5 0 5 0 20 0 20 704620
|
|
|
|
|
2017-02-02 16:22:09 +01:00
|
|
|
member_elements_by_line=$(run_remote server_stats server_2 -monitor nfs.client -count 1 -terminationsummary no -titles never | sed -ne 's/^.*id=//p')
|
|
|
|
echo -e "\nmultigraph vnx_emc_nfs_client_ops_s"
|
|
|
|
NUMCOL=9
|
|
|
|
LINES=$(wc -l <<< "$member_elements_by_line")
|
|
|
|
while IFS=$'\n' read -ra graphs; do
|
|
|
|
elements_array+=($graphs)
|
|
|
|
done <<< "$member_elements_by_line"
|
|
|
|
|
|
|
|
#Not drawing elements in case of empty set
|
|
|
|
if [ "${#elements_array[@]}" -eq "0" ]; then LINES=0; fi
|
|
|
|
|
|
|
|
for (( i=0; i<$((LINES)); i++ )); do
|
|
|
|
client="$(clean_fieldname "_${elements_array[i*$NUMCOL]}")"
|
|
|
|
echo "${server}${client}_r".value "${elements_array[$i*$NUMCOL+2]}"
|
|
|
|
echo "${server}${client}_w".value "${elements_array[$i*$NUMCOL+3]}"
|
|
|
|
echo "${server}${client}_t".value "${elements_array[$i*$NUMCOL+1]}"
|
|
|
|
echo "${server}${client}_s".value "${elements_array[$i*$NUMCOL+4]}"
|
|
|
|
done
|
|
|
|
echo -e "\nmultigraph vnx_emc_nfs_client_b_s"
|
|
|
|
for (( i=0; i<$((LINES)); i++ )); do
|
|
|
|
client="$(clean_fieldname "_${elements_array[i*$NUMCOL]}")"
|
|
|
|
echo "${server}${client}_r".value "$((${elements_array[$i*$NUMCOL+6]} * 1024))"
|
|
|
|
echo "${server}${client}_w".value "$((${elements_array[$i*$NUMCOL+7]} * 1024))"
|
|
|
|
echo "${server}${client}_t".value "$((${elements_array[$i*$NUMCOL+5]} * 1024))"
|
|
|
|
done
|
|
|
|
echo -e "\nmultigraph vnx_emc_nfs_client_avg_usec"
|
|
|
|
for (( i=0; i<$((LINES)); i++ )); do
|
|
|
|
client="$(clean_fieldname "_${elements_array[i*$NUMCOL]}")"
|
|
|
|
echo "${server}${client}".value "${elements_array[$i*$NUMCOL+8]}"
|
|
|
|
done
|
|
|
|
|
|
|
|
#nfs-std
|
|
|
|
# bash-3.2$ server_stats server_2 -monitor nfs-std
|
2018-08-02 02:03:42 +02:00
|
|
|
# server_2 Total NFS NFS NFS Avg NFS NFS NFS Avg NFS
|
|
|
|
# Timestamp NFS Read Read Read Size Write Write Write Size Active
|
|
|
|
# Ops/s Ops/s KiB/s Bytes Ops/s KiB/s Bytes Threads
|
2017-02-02 16:22:09 +01:00
|
|
|
# 18:14:52 688 105 6396 62652 1 137 174763 3
|
|
|
|
member_elements_by_line=$(run_remote server_stats "$server" -monitor nfs-std -count 1 -terminationsummary no -titles never | grep '^[^[:space:]]')
|
|
|
|
IFS=$' ' read -ra graphs <<< "$member_elements_by_line"
|
|
|
|
# echo "$member_elements_by_line"
|
|
|
|
# echo "${graphs[@]}"
|
|
|
|
|
|
|
|
echo -e "\nmultigraph vnx_emc_nfs_std_nfs_ops"
|
|
|
|
echo "${filtered_server}_rops.value ${graphs[2]}"
|
|
|
|
echo "${filtered_server}_wops.value ${graphs[5]}"
|
|
|
|
echo "${filtered_server}_tops.value ${graphs[1]}"
|
2018-08-02 02:03:42 +02:00
|
|
|
|
2017-02-02 16:22:09 +01:00
|
|
|
echo -e "\nmultigraph vnx_emc_nfs_std_nfs_b_s"
|
2017-02-03 23:34:35 +01:00
|
|
|
echo "${filtered_server}_rbs.value $((graphs[3] * 1024))"
|
|
|
|
echo "${filtered_server}_wbs.value $((graphs[6] * 1024))"
|
2017-02-02 16:22:09 +01:00
|
|
|
echo "${filtered_server}_tbs.value 0"
|
2018-08-02 02:03:42 +02:00
|
|
|
|
2017-02-02 16:22:09 +01:00
|
|
|
|
|
|
|
echo -e "\nmultigraph vnx_emc_nfs_std_nfs_avg"
|
|
|
|
echo "${filtered_server}_avg_readsize.value ${graphs[4]}"
|
|
|
|
echo "${filtered_server}_avg_writesize.value ${graphs[7]}"
|
|
|
|
|
|
|
|
|
|
|
|
echo -e "\nmultigraph vnx_emc_nfs_std_nfs_threads"
|
|
|
|
echo "${filtered_server}_threads.value ${graphs[8]}"
|
2016-12-16 02:00:33 +01:00
|
|
|
fi
|
2016-11-14 18:16:25 +01:00
|
|
|
done
|
2017-01-26 16:13:12 +01:00
|
|
|
if [ -z "$nas_server_ok" ]; then
|
2017-01-19 00:27:39 +01:00
|
|
|
echo "No active data movers!" 1>&2
|
2016-11-14 18:16:25 +01:00
|
|
|
fi
|
|
|
|
exit 0
|
|
|
|
|