Skip to main content

Questions tagged [fuser]

fuser is a tool used to identify processes based on the files they're using (eg. regular file, socket, network connection, ...).

Filter by
Sorted by
Tagged with
0 votes
0 answers
25 views

fuser -v /dev/nvidia* and lsof not responding

On our A100 machine, we frequently have zombie processes that still allocate memory when already stopped. I usually used fuser -v /dev/nvidia* to determine the PIDs of all processes and kill them ...
Green绿色's user avatar
0 votes
0 answers
109 views

Fuser shows non-existing processes, so NVIDIA GPU reset fails

I am trying to reset an NVIDIA A100 card that still has memory occupied, but no process is using it. First, I killed all processes using any NVIDIA card with sudo fuser -k /dev/nvidia* then run the ...
Green绿色's user avatar
1 vote
1 answer
67 views

Find number of process running using fuser

We are using fuse to find the logs associated to particular port. fuser /test/log* This results in a list of logs associated with port How to find the number of lines on the output? I tried with |wc -...
Varja's user avatar
  • 69
1 vote
0 answers
190 views

Using the fuser command to kill processes using a mount point is taking a long time

I am trying to kill processes with open file handles on a mount point before performing unmount. We observed for a few mount points, the below fuser command is taking a long time. It took more than 3 ...
Bharath's user avatar
  • 11
0 votes
1 answer
32 views

Can't wrap my head around how to get any useful output from fuser

cd ~ touch test fuser -v -m test Outputs pretty much all processes on my system, including e.g. chromium. Isn't fuser supposed to be showing only the processes that use the file? I tried it on my ...
jojman's user avatar
  • 597
-2 votes
2 answers
125 views

how to kill huge process by killing the daemon itself

on our rhel machine we saw huge lines as ( total lines numbers are 856 ) that cause very high cpu load average root 110490 108840 0 07:32 ? 00:00:00 /usr/bin/python /var/tmp/get_params/...
yael's user avatar
  • 13.2k
3 votes
2 answers
609 views

How can I find out what is holding a file or mount point, when `fuser` shows nothing?

I have a laptop that refuses to suspend. On the latest Ubuntu, the only way I can turn it off is to hold down the power button. The reason is because I have an nfs share that has gone offline, and ...
Dagelf's user avatar
  • 265
3 votes
1 answer
5k views

kill processes shown by sudo fuser filtered by COMMAND column

using the following line I have been able to see processes that use the GPU some of which are mentioned python under the COMMAND column. sudo fuser -v /dev/nvidia* which prints: ...
Alejandro's user avatar
  • 133
-1 votes
2 answers
248 views

kill PID in the bash script

I am using in my bash script the following syntax to kill the PID of the script - AmbariAgent.py kill $( ps -ef | grep AmbariAgent.py | grep -v grep | awk '{print $2 }' ) from ps -ef ps -ef | ...
yael's user avatar
  • 13.2k
3 votes
1 answer
3k views

How to ensure all processes are killed before unmounting a filesystem?

I am trying to unmount a busy file system on which continuous I/O reads and writes are happening by a multithreaded program due to which the umount command fails. root@ubuntu:~ # umount /mount/v1 ...
Vikas Kumar's user avatar
6 votes
1 answer
476 views

How to detect which process has used a file now or in the past

This is a hypothetical question, not a problem I currently have. How do you detect which process has used a file now or in the past? To find out which process is accessing filename right now, lsof ...
dr_'s user avatar
  • 29.7k
1 vote
1 answer
451 views

wget -i notifying when each file finishes (for processing purposes)

I'd like to be able to process multiple files downloaded by wget -i immediately after they are downloaded (instead of waiting for all files in the list to finish--for the entire wget process to exit). ...
Bailey Parker's user avatar
2 votes
2 answers
6k views

SSHFS Error: "Bad SSH2 cipher spec 'arcfour'" & "read: Connection reset by peer"

Hellow world! So I've started developing a project that will run on rPi-3B+. I've run into a problem with SSHFS. Right now I'd really like to be able to edit, and commit, the git repo stored on the ...
AustinFoss's user avatar
0 votes
2 answers
1k views

Kill process by fuser instead of pidfile?

Recently I developed the habit of killing processes with fuser -k -n tcp $PORT which can hardly kill the wrong process. I prefer this over fiddling with a pidfile that may or may not be still there ...
Harald's user avatar
  • 898
1 vote
1 answer
150 views

How to know which script/binary/other running process?

From ps -ef | grep java, I see many process like this that take a lot of memory. hadoop-+ 65369 65322 0 Jul06 ? 00:01:45 /usr/jdk64/jdk1.8.0_112/bin/java -Xmx8024m -Dhdp.version=2.6.4-091 -...
yael's user avatar
  • 13.2k
5 votes
1 answer
3k views

Find processes which have a file open without lsof or fuser

I'm working on a Linux (Scientific Linux CERN SLC release 6.9 (Carbon)) machine on which I am unable to install programs and on which the lsof or fuser commands are not available. I'm trying to ...
Peter's user avatar
  • 205
3 votes
3 answers
1k views

find pid of open tcp port, as a regular user

From local host I'm ssh tunneling some remote host:port to my local host:port, so anybody on a remote host can use their "local" port to access my port via that tunnel. I'm using some regular (non-...
Goran's user avatar
  • 31
0 votes
1 answer
625 views

Fuser returns empty list for opened file

Why when I do: $ kate file.txt & and $ fuser file.txt I've got empty list. After all, kate process opens file.txt
asdas's user avatar
  • 1
6 votes
2 answers
10k views

List current inotify watches (pathname, PID)

How do I get a list of: Pathnames currently being watched by inotify, and PID of the process watching I ask because I have found that syncthing's inotify watches were preventing my disk from being ...
Tom Hale's user avatar
  • 30.6k
0 votes
1 answer
228 views

Killing some processes also kills others that I do not want to kill

I am goofing around in Metasploitable and trying some commands. Whenever I kill a process using fuser -k 23/tcp to close the port, I get other processes also killed by the process and their ports ...
tony9099's user avatar
  • 137
1 vote
1 answer
2k views

How do you tell what the return code of a process is when it exits and where is the value usually documented?

If a process runs and exits it returns a non-zero status (personnaly I prefer the term return code); or even a zero status I know that the value is there (mostly because I've done C++ programming and ...
leeand00's user avatar
  • 4,625
-1 votes
1 answer
2k views

du -sh and df -h are giving different output [duplicate]

I got an alert stating that 3 of my mount points are 91 % full and i need to clear the files. When I run df -h command it states that the mount points are 91% full but when i try to run du -sh * in ...
Raghav Chadha's user avatar
3 votes
1 answer
86 views

Do a command in all open shells

I use sshfs to do useful things on my dev box. I love it. But, I usually forget to fusermount -u before I close my lid (triggering hibernate). Then, when I come back, sshfs is frozen and I have to ...
Rob Kinyon's user avatar
0 votes
1 answer
40 views

Several specific configurations to the file system

Task: "You have to configure the /home's filesystem-mounting-method in such a way, so that all I/O operations will be always done in a synchronic mode, without the possibility of using the SUID ...
dziadek1990's user avatar
2 votes
1 answer
3k views

How do I figure out what is preventing a bind mount from unmounting?

I have a problem with a mountpoint being too busy to unmount. Normally, lsof or fuser would tell me what process is using it, but this is a bind mount, so lsof and fuser show what is using both the ...
Tal's user avatar
  • 2,122
1 vote
2 answers
580 views

Why does fuser use the STDERR?

SERVER:~ # fuser -uc /var/log /var/log: 6824(daemon) 9902(root) 14011(root) 14084(root) 14208(lp) SERVER:~ # fuser -uc /var/log 2>/dev/null 6824 9902 14011 14084 14208SERVER:~ # ...
thequestionthequestion's user avatar
1 vote
2 answers
1k views

fuser output looks ambiguous

I am using fuser the output is like this: $ fuser / /: 1354rc 1362r 1370rc 1371rc 1395rc 1399rc 1403rc 1410rc 1414rc 1428r 1451rc 1458rc 1470rc 1472rc 1477rc 1480rc ...
amir jj's user avatar
  • 1,222
7 votes
2 answers
8k views

fuser vs lsof to check files in use

I've been getting some suggestions on how to figure out why my serial port is busy. Specifically, when I try to start gammu-smsd, it refuses to start on /dev/ttyS0 because it says that port is busy: ...
JohnMerlino's user avatar
  • 6,171
4 votes
1 answer
5k views

umount failed: device busy

I have a folder in /tmp that is mounted as ramfs. After some action that my script does, I delete everything inside said folder with the command: rm -R -f "$tmp_dir"/{*,.*} Then, I try to unmount ...
Dor's user avatar
  • 2,535