You are not logged in.

#1 2021-12-15 15:58:10

MS1
Member
Registered: 2018-02-02
Posts: 95

How to see full path to file is being read on HDD

I am using kodi to watch some files on my HDD. How can I use the shell to see which file kodi is playing? I looked into lsof but it isn't showing me the video file I know is being read while it is playing.

Offline

#2 2021-12-15 21:22:47

ib
Member
Registered: 2021-12-11
Posts: 25

Re: How to see full path to file is being read on HDD

Use the command:

lsof -p $(ps axf | grep kodi | grep -v grep | awk '{printf $1 ","}')

Displays a playable file

Offline

#3 2021-12-15 22:04:48

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,160

Re: How to see full path to file is being read on HDD

ib wrote:
lsof -p $(ps axf | grep kodi | grep -v grep | awk '{printf $1 ","}')

https://man.archlinux.org/man/core/procps-ng/pidof.1.en
Though the OP stated that lsof wouldn't list the file - what raises the question how he approached that and whether kodi is using a subprocess (mpv, ffmpeg, …) or hardlinks the file, opens the hardlink and then unlinks it or some shenanigans like that (for whatever reason)

Offline

#4 2021-12-17 06:59:51

MS1
Member
Registered: 2018-02-02
Posts: 95

Re: How to see full path to file is being read on HDD

The lsof command does not give any matches while kodi is playing. Kodi must be hiding things.

Offline

#5 2021-12-17 07:06:45

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,732
Website

Re: How to see full path to file is being read on HDD

grep -r '^.*VideoPlayer::OpenFile: ' /var/lib/kodi/.kodi/temp/kodi.log

If you want to keep a record of watched content, see kodi-logger

Offline

Board footer

Powered by FluxBB