Helper Commands for Kubernetes
load | stat | help | version
warm up cache
$ kubectl exec <pod-name> -- mapfs load <filename>
display volume detailed status
$ kubectl exec <pod-name> -- mapfs stat
============ Volume ============
VolumeName: vol1
MountPoint: /mnt/fuse
=== Memory Usage ===
Write Buffer: 0 Bytes
Read Buffer: 0 Bytes
ReadAhead Buffer: 0 Bytes
MetaCache: 144.00 MB
=== Requests ===
Total Request: 28
COMMAND Request Total(ms) Avg(ms) Min(ms) Max(ms)
lookup: 0 0 0 0 0
getattr: 3 17 5 0 17
readdir: 4 33 8 2 18
create: 0 0 0 0 0
unlink: 0 0 0 0 0
mkdir: 0 0 0 0 0
rmdir: 0 0 0 0 0
open: 1 0 0 0 0
=== IO Statistics ===
Total Read: 1.03 MB
Read Cloud: 1.16 MB
Write IO: 0 Bytes
=== Network Statistics ===
dns: 0 ms
connect: 0 ms
ssl: 0 ms
pretransfer: 1 ms
starttransfer: 41 ms
total: 45 ms
INDEX CPU%
=== Cache Statistics ===
Data Cache Hits: -
ReadAhead Hits: 87%
MetaData Query: 26
Meta Cache Hits: 100%
help & versison
$ kubectl exec <pod-name> -- mapfs help
$ kubectl exec <pod-name> -- mapfs version
Show ChannelServer connected clients
This one runs against the ChannelServer (channeld) itself -- the cache-invalidation fan-out server
every mount-daemon pod connects to (see channel-server.yaml) -- not a per-volume mount-daemon
pod like the commands above:
$ kubectl -n kube-system exec deploy/mapfs-channel -- channeld show
Channel Index IP Joined
a1b2c3d4e5f6a7b8 5 10.0.1.23 Yes
a1b2c3d4e5f6a7b8 7 10.0.2.45 Yes
c9d8e7f6a5b4c3d2 9 10.0.3.12 No
Each row is one mapfs client (a mount-daemon pod, somewhere in the cluster) currently exchanging cache-invalidation metadata through this ChannelServer:
Channel-- hex fingerprint identifying the cache-invalidation group. Clients mounting the same volume share a fingerprint, so an invalidation fans out only within that group, not to every connected client.Index-- the client's internal socket index.IP-- the connecting mount-daemon pod's IP.Joined-- whether the client has completed its join handshake yet; brieflyNoright after it connects, before its first fingerprint announcement.
The total number of mapfs clients currently connected is just the row count below the header, e.g.:
$ kubectl -n kube-system exec deploy/mapfs-channel -- channeld show | tail -n +2 | wc -l
If nothing is connected, the command prints No clients connected instead of the table.