Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Anzeigen, welches Programm noch auf ein Gerät/Datei zugreift
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
Vortex375
Veteran
Veteran


Joined: 03 Mar 2005
Posts: 1739
Location: Deutschland

PostPosted: Thu Apr 03, 2008 5:20 pm    Post subject: Anzeigen, welches Programm noch auf ein Gerät/Datei zugreift Reply with quote

Hallo, ich habe da mal eine kurze Frage:

Hin und wieder kommt es leider vor, dass man eine CD oder ähnliches Wechselmedium auswerfen möchte aber es erscheint nur "mount: device is busy". Mich würde interessieren, wie ich in diesem Fall den Schuldigen herausfinden kann, weil manchmal funktioniert es auch dann nicht, wenn ich wirklich alle Programme, Konsolenfenster etc. geschlossen habe.

Irgendwoher muss mount ja schließlich auch wissen, dass das Gerät noch blockiert ist. Ich würde gerne wissen wie und warum. :)
Back to top
View user's profile Send private message
Dr. Nein
Tux's lil' helper
Tux's lil' helper


Joined: 23 Apr 2005
Posts: 100
Location: Jülich

PostPosted: Thu Apr 03, 2008 6:02 pm    Post subject: Reply with quote

Die offenen Filehandles kann man unter /proc/<PID>/fd anschauen. Einfacher als Benutzer ist aber sys-process/lsof. Das zeigt offene Dateien/Pipes etc von einem oder allen Prozessen an. Du kannst zum Beispiel mit
Code:
lsof|grep /media/cdrom
schauen, welche Prozesse darauf zugreifen.
Back to top
View user's profile Send private message
ok
Guru
Guru


Joined: 11 Jul 2006
Posts: 390
Location: germany

PostPosted: Thu Apr 03, 2008 6:04 pm    Post subject: Reply with quote

Ich nutze lsof | grep $mountpoint zum feststellen was noch offen ist, funktioniert meistens. Manchmal dauert es aber auch einfach einige Sekunden bis das Medium nicht mehr belegt ist.
Back to top
View user's profile Send private message
mastacloak
Apprentice
Apprentice


Joined: 01 Aug 2004
Posts: 174
Location: Berlin / Germany

PostPosted: Thu Apr 03, 2008 6:15 pm    Post subject: Reply with quote

Code:
lsof /dev/cdrom

oder
Code:
lsof /mount/point

sollte reichen. Grep ist hier nicht nötig.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum