I recently had several instances where I had to try and figure out who holds what end of a
unix pipe.
To make this operation a bit more streamlined I created a small script to follow a pipe. I
think it will be useful for other people debugging VDSM especially bugs related to
"out of process" helpers not closing FDs properly.
To see all the exists of a pipe just input a known end of the pipe: stahlband <PID>
<FD>
$ stahlband 5758 5
PID: 5758 FD: 5 KIND: r
PID: 5758 FD: 6 KIND: w
PID: 5770 FD: 5 KIND: r
PID: 5770 FD: 6 KIND: w
The code is available on github:
https://github.com/ficoos/stahlband