Operating System - HP-UX
1833857 Members
2320 Online
110063 Solutions
New Discussion

fuser (or lsof) doesnt show anything listening on a pipe

 
Fredrik Uddin-Backman2
Frequent Advisor

fuser (or lsof) doesnt show anything listening on a pipe

Hi

I have an rx8640 11.23 ia64 and have come across a problem. If I do
mkfifo /tmp/fifo1 ; cat /tmp/fifo1 &; fuser /tmp/fifo1

I should see the process listening on that FIFO. I get this working on a 11.00 machine but my 11.23 and 11.11 doesnt show anything?

Any help most appreciated
7 REPLIES 7
Peter Godron
Honored Contributor

Re: fuser (or lsof) doesnt show anything listening on a pipe

Hi,
try "fuser -cu /tmp"

Please also read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33 on how to reward any useful answers given to your questions.

So far you have only awarded points to 2 of 34 answers !
Fredrik Uddin-Backman2
Frequent Advisor

Re: fuser (or lsof) doesnt show anything listening on a pipe

That doesn't help me much. No processes shows up and the "-c" option on fuser only gives me " use of a mount point" and it still doesn't show me opened PIPES
Peter Godron
Honored Contributor

Re: fuser (or lsof) doesnt show anything listening on a pipe

Hi,
in my suggestion the fuser -cu is run against /tmp, NOT /tmp/fifo1, which will avoid the file system message.
And the cat process is listed if you use the above command.

# ./a.sh
root 4947 4945 0 08:47:44 pts/tb 0:00 cat /tmp/fifo1
cat process is 4947
/tmp: 1999o(root) 1278o(root) 1331o(root) 4947c(root) 1309o(root) 1347o(root) 4945co(root) 4534c(root) )

# cat a.sh
#!/usr/bin/sh
mkfifo /tmp/fifo1
cat /tmp/fifo1 &
ps -ef | grep fifo | grep -v grep
process=`ps -ef | grep fifo | grep -v grep | awk '{print $2}'`
echo "cat process is $process"
fuser -cu /tmp
Dennis Handly
Acclaimed Contributor

Re: fuser (or lsof) doesnt show anything listening on a pipe

>Peter :in my suggestion the fuser -cu is run against /tmp, NOT /tmp/fifo1, which will avoid the file system message.

I'm not sure how that is helpful. Your output just shows "c", that cat(1) has /tmp as the current working directory. If you were somewhere else, fuser wouldn't show anything. (Yes, that's what happens.)

And it still works this way on 11.31.
Fredrik Uddin-Backman2
Frequent Advisor

Re: fuser (or lsof) doesnt show anything listening on a pipe

Ohh i see. Yes It does show upp with fuser -c. However, something is wrong here when I can't point directly to the pipe with "fuser /tmp/pipe1" and see the process.
Fredrik Uddin-Backman2
Frequent Advisor

Re: fuser (or lsof) doesnt show anything listening on a pipe

Thanks Dennis. You are correct that it sees the cat working directory. Do you experience the same issue on 11.31? I have opened a case with HP Support, lets see what it gives.
Dennis Handly
Acclaimed Contributor

Re: fuser (or lsof) doesnt show anything listening on a pipe

>Do you experience the same issue on 11.31? I have opened a case with HP Support, lets see what it gives.

I said I did.
I looked up your problem and there already is an existing bug report: CR JAGaf47940
11.11 fuser(1M) fails to detect processes sleeping in fifo_open()

You still should contact the Response Center since it looks like nothing has been done about it. Mention the above CR number since it a bunch of details.