Last active
March 23, 2018 14:22
-
-
Save blackknight36/9c8b29eb3c0f2bdbb339239d5da5fa6d to your computer and use it in GitHub Desktop.
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
#!/usr/bin/ruby | |
procs="getattr setattr lookup access readlink read write create mkdir symlink mknod remove rmdir rename link readdir readdirplus fsstat fsinfo pathconf commit".split() | |
stats = open('/proc/net/rpc/nfsd') { |f| f.each_line.find { |line| line.include?("proc4ops") } }.split() | |
i = 11 | |
hostname = `hostname -f`.chomp! | |
procs.each do |p| | |
puts "PUTVAL #{hostname}/nfs-v4server/nfs_procedure-#{p} interval=10 N:" + stats[i] | |
i += 1 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment