Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
strace: Rauskriegen, welche Dateien ein Programm öffnet...
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
tomiondrums
n00b
n00b


Joined: 02 Feb 2007
Posts: 54
Location: Unterleinleiter

PostPosted: Tue Sep 23, 2008 7:41 am    Post subject: strace: Rauskriegen, welche Dateien ein Programm öffnet... Reply with quote

Hi!
Ich würd gern von einem Programm, das nicht Open-Source ist rauskriegen, welche Dateien es liest/schreibt. Irgendwo hab ich mal mitgekriegt, daß man sowas mit strace machen kann.
Wenn ich aber
Code:
strace komischesprogramm

laufen lasse, krieg ich ein unmenschlich langes Log, bei dem kein Mensch mehr durchblickt. Das wundert mich auch nicht, weil hier ja alle System-Calls abgefangen werden, was ich dran merke, daß das Log u.A. auch dann weitergeschrieben wird, wenn ich die Maus über eins der Fenster des zu überwachenden Programms bewege...

Was für Parameter muß ich strace mitgeben, um nur "richtige" Datei-Ops zu überwachen?

Danke schonmal!
MfG
Tom
Back to top
View user's profile Send private message
schachti
Advocate
Advocate


Joined: 28 Jul 2003
Posts: 3765
Location: Gifhorn, Germany

PostPosted: Tue Sep 23, 2008 8:05 am    Post subject: Reply with quote

Steht eigentlich ziemlich ausführlich in der man page - für Eilige:

Code:
-e trace=file


dürfte die von Dir gesuchte Option sein.
_________________
Never argue with an idiot. He brings you down to his level, then beats you with experience.

How-To: Daten verschlüsselt auf DVD speichern.
Back to top
View user's profile Send private message
manuels
Advocate
Advocate


Joined: 22 Nov 2003
Posts: 2146
Location: Europe

PostPosted: Tue Sep 23, 2008 9:24 am    Post subject: Reply with quote

lsof ist auch ein nettes Programm fuer sowas.
_________________
Build your own live cd with catalyst 2.0!
Back to top
View user's profile Send private message
Anarcho
Advocate
Advocate


Joined: 06 Jun 2004
Posts: 2970
Location: Germany

PostPosted: Tue Sep 23, 2008 12:06 pm    Post subject: Reply with quote

manuels wrote:
lsof ist auch ein nettes Programm fuer sowas.


Zeigt allerdings nur gerade geöffnete Dateien an. strace ist da sicher geeigneter.

Such dir eine Stelle aus den Logs raus und benutze grep um nur solche Zeilen zu bekommen.
_________________
...it's only Rock'n'Roll, but I like it!
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