NFStash
NFS client CLI toolkit
Install / Use
/learn @mprovost/NFStashREADME
NFStash ⏞ : NFS client CLI tools
NFStash (pronounced "en-ef stash") is a suite of command line tools for Linux and other POSIX operating systems which implement Network File System (NFS) client procedures. These utilities can be used for testing, debugging, monitoring and benchmarking the responses from an NFS server in a composable and reproducible way, either interactively or in scripts.
The suite consists of these tools:
| Command | Protocol | RPC | Description |
| ------- | -------- | --- | ----------- |
| nfsping | NFS, MOUNT, RPCBIND, NLM, KLM, ACL, RQUOTA, NSM | NULL | Checks status and response time of various RPC protocols on NFS servers |
| nfsmount | MOUNT | MNT, EXPORT | Finds NFS filesystem root filehandles |
| nfsdf | NFS | FSSTAT | Reports NFS server disk space usage |
| nfsls | NFS | READDIRPLUS, GETATTR, READLINK | Lists files and directories on an NFS server |
| nfscat | NFS | READ | Reads and prints files using NFS |
| nfslock | NLM | TEST | Checks if an NFS client can lock a file |
| clear_locks | NSM, NLM | NOTIFY, FREE_ALL | Clears stuck file locks on an NFS server |
| nfsup | RPCBIND, MOUNT, NFS | NULL, EXPORT | Nagios-compatible plugin for checking NFS server status |
The goal of the project is to eventually support all 22 NFS version 3 client procedures.
Main Features
- Free and Open Source software (BSD licensed)
- Written in C for portability and speed
- Built from the original Sun RPC protocol specification files
- No dependencies on the operating system's NFS client
- Easily readable and parseable JSON output
- Timing output compatible with fping, Graphite or StatsD
Installation
$ git clone git://github.com/mprovost/NFStash.git
$ cd NFStash && make
$ sudo make install
make installwill copy the binaries to/usr/local/bin/and manpages to/usr/local/share/man/. To change this runprefix=<path> make install.- Requires
gmake. - Uses some
gcc-isms which may mean it won't compile with other C compilers. - Manpages are built with
ronn. - RPC code is generated with
rpcgen(available in therpcsvc-protoDebian package). glibcremoved the Sun RPC functions in release 2.26. These functions are now provied bylibtirpclibrary (available in thelibtirpc-devDebian package).- It doesn't compile on OSX yet due to a missing
clock_gettime()- this will take some porting effort (probably using monotonic_clock). - The Makefile uses a test in the
/configdirectory to check whether it needs to link the realtime library (-lrt) to pull inclock_gettime(). This is included in libc itself in glibc > 2.17.
Roadmap
Development of NFStash is paused, but the current version is stable.
- [ ] convert internal time calculations to nanoseconds
- [ ] HDRHistogram support
- [ ] Workaround Coordinated Omission like wrk2
- [ ] OSX support (clock_gettime)
- [ ] Multithreaded so slow responses don't block other requests?
- [ ] A simplified version of NFSping for Nagios-compatible monitoring checks
- [ ] Simplify output formats and move output conversion to a utility
- [ ] Privilege separation to drop root privileges after binding to reserved ports for "secure" NFS servers
Contributing
Patches and bug reports are welcome. If someone is interested in contributing code to the project, sponsorship for a development environment in Google Cloud Engine or Amazon Web Services is available. Please contact the author for more details.
Related Skills
node-connect
342.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
85.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
342.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
