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
1 answer
17 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 ...
user avatar
  • 477
-2 votes
2 answers
33 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/...
user avatar
  • 10.9k
0 votes
0 answers
9 views

What kernel settings or configuration do I need to look at for a kernel that will never refuse to suspend?

Sometimes my laptop refuses to suspend, and overheats in its bag. This has been an ongoing issue with some versions of Linux over the years. Usually the reason is nfs shares, other times Wi-Fi or ...
user avatar
  • 226
1 vote
2 answers
60 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 ...
user avatar
  • 226
1 vote
1 answer
1k 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: ...
user avatar
  • 113
-1 votes
2 answers
151 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 | ...
user avatar
  • 10.9k
3 votes
1 answer
972 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 ...
user avatar
6 votes
1 answer
154 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 ...
user avatar
  • 25.2k
1 vote
1 answer
286 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). ...
user avatar
2 votes
2 answers
4k 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 ...
user avatar
0 votes
2 answers
718 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 ...
user avatar
  • 744
1 vote
1 answer
48 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 -...
user avatar
  • 10.9k
4 votes
1 answer
2k 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 ...
user avatar
  • 186
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-...
user avatar
  • 31
0 votes
1 answer
437 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
user avatar
  • 1
6 votes
2 answers
7k 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 ...
user avatar
  • 24.6k
0 votes
1 answer
177 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 ...
user avatar
  • 127
1 vote
1 answer
1k 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 ...
user avatar
  • 4,039
-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 ...
user avatar
3 votes
1 answer
81 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 ...
user avatar
0 votes
1 answer
35 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 ...
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 ...
user avatar
  • 1,752
1 vote
2 answers
497 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:~ # ...
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 ...
user avatar
  • 1,072
6 votes
2 answers
7k 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: ...
user avatar
  • 5,381
4 votes
1 answer
4k 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 ...
user avatar
  • 2,141