Created
November 1, 2016 09:42
-
-
Save adaam/548462a0b50308e384d71294285ca1eb to your computer and use it in GitHub Desktop.
Parse "nfsstat -l" file to time serial, for gnuplot using
This file contains 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/sh | |
while true | |
do | |
D=$(date +%s) | |
nfsstat -l > /home/XXX_USER/nfsstat_log/$D | |
sleep 5 | |
done |
This file contains 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/bash | |
# Run below script a while to get data | |
# while true; do D=$(date +%s);nfsstat -l > /home/XXX_USER/nfsstat_log/$D; sleep5;done | |
p="/home/XXX_USER/nfs_plot" | |
files=$(ls ~/nfsstat_log/) | |
for file in $files | |
do | |
while read -r f1 f2 f3 f4 f5 f6; | |
do | |
echo ${file} ${f2}_${f3}_${f4} ${f5} | |
echo ${file} ${f5} >> ${f2}_${f3}_${f4}.txt | |
done < ~/nfsstat_log/${file} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment