Closed ddowse closed 1 year ago
On my FreeBSD 13.0 system that does not show a lot.
Here with exFAT mounted.
# mount -t fusefs
/dev/fuse on /media/da0 (fusefs)
// AS USER
% fstat /dev/fuse
USER CMD PID FD MOUNT INUM MODE SZ|DV R/W NAME
// AS ROOT
# fstat /dev/fuse
USER CMD PID FD MOUNT INUM MODE SZ|DV R/W NAME
root mount.exfat-fuse 97173 4 /dev 442 crw-rw-rw- fuse rw /dev/fuse
Only with -f option it at least showed da0 device ... but without mountpoint:
# fstat -f /dev/fuse | grep da0
root mount.exfat-fuse 97173 3 /dev 509 crw-rw---- da0 rw
What is the output of these as root on your system:
# fstat -f /dev/fuse
# fstat /dev/fuse
When i run fstat /dev/fuse
user I get the commands and PIDs reported that belong to me.
USER CMD PID FD MOUNT INUM MODE SZ|DV R/W NAME
datasmur sshfs 49537 3 /dev 419 crw-rw---- fuse rw /dev/fuse
datasmur sshfs 51651 3 /dev 419 crw-rw---- fuse rw /dev/fuse
datasmur sshfs 65543 3 /dev 419 crw-rw---- fuse rw /dev/fuse
As root the same as before + from any other user.
fuse-ext2 /dev/da0p1 /mnt
with fusefs
branch as root
da0 1:211 932G GPT - -
Useless information on my box ...
# fuse-ext2 -o force /dev/da0 /media/da0
# mount -f fusefs
/dev/fuse on /media/da0 (fusefs)
% fstat /dev/fuse
USER CMD PID FD MOUNT INUM MODE SZ|DV R/W NAME
# fstat /dev/fuse
USER CMD PID FD MOUNT INUM MODE SZ|DV R/W NAME
vermaden fuse-ext2 58821 3 /dev 442 crw-rw-rw- fuse rw /dev/fuse
That fstat output does not show devices not mountpoints.
I think i do not completely understand, what you mean, now. Sorry
Instead of pgrep
ing for a specific fuse command/daemon, i just use fstat and filter then the PIDs just like before.
Sorry ... I probably did not get what the enhancement here was :)
I was expecting fstat to show devices and mountpoints ... and you wanted to get PIDs the other way ... am I getting that right now? :)
Yes. Getting the PIDs that belong to a fuse mount command by using fstat on /dev/fuse. I guess i have to be more precise in stating the nature of the commit next time to avoid confusion. Sorry.
... or I was too little too 'fast' or hoping for a miracle to know exact mountpoints and devices from fstat :)
Anyway - thank You for your suggestion - I may not directly merge this pull request but I will definitely use that in some form.
Regards.
Yes, not going to happen getting the fuse mountpoints with one shot pretty printed ( I have seen your tweet/ml post :-) , there is an old unresolved Forum Post about this, too. And on the fuse sourceforge ML archives there was also no answer to find to that question. This got me courious, too. So i checked this tool of yours and didn't see any mountpoints from fuse-ext2 (i have no other foreign fs at hand) and then i check the line in your code and came up with this idea.
Best regards.
Hello,
this will show the mount point regardless of what fuse daemon is used.
Best regards
Daniel