Getting Data In

Monitor linux host NFS I/O on local mount points

peterjsouza
New Member

I am new to Splunk and as part of the evaluation i wanted to create a script that poled the NFS stats on one of our busiest CentOS hosts. I took the iostat.sh script that is in *nix app and tried to adapt it. Can someone point me in the right direction? THANKS!!
[Below is the script]

. `dirname $0`/common.sh

HEADER='Mount           rBlk_svrPS       wBlk_svrPS         opsPS         ropsPS   wopsPS'
HEADERIZE="BEGIN {print \"$HEADER\"}"
PRINTF='{printf "%-90s  %11s  %11s  %12s  %12s  %13s\n", mount, rBlk_svrPS, wBlk_svrPS, opsPS, ropsPS, wopsPS}'

    CMD='iostat -n -h'
    assertHaveCommand $CMD
    FILTER='/^$/ {next} /^Filesystem:/ {reportOrd++; next} (reportOrd<2) {next}'
    FORMAT='{mount=$1; rBlk_svrPS=$6; wBlk_svrPS=$7; opsPS=$8; ropsPS=$9; wopsPS=$10}'

$CMD | tee $TEE_DEST | awk "$HEADERIZE $FILTER $FORMAT $PRINTF"  header="$HEADER"
echo "Cmd = [$CMD];  | awk '$HEADERIZE $FILTER $FORMAT $PRINTF' header=\"$HEADER\"" >> $TEE_DEST
Tags (3)
0 Karma

alacercogitatus
SplunkTrust
SplunkTrust

While not directly answering your question, take a look at http://apps.splunk.com/app/870/. This is the Add On for SoS, and includes an NFS iostat input for diagnosing Search Head Pool problems, however can probably be adapted to your needs.

0 Karma
Get Updates on the Splunk Community!

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...