Gentoo Archives: gentoo-user

From: Grant Edwards <grant.b.edwards@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: oder of files opened by a process
Date: Fri, 01 Oct 2010 18:36:52
Message-Id: i859mc$rm3$1@dough.gmane.org
In Reply to: Re: [gentoo-user] oder of files opened by a process by Dale
1 On 2010-10-01, Dale <rdalek1967@×××××.com> wrote:
2 > Al wrote:
3 >> Hello,
4 >>
5 >> I want to find out by which file and line the */temp/environment
6 >> script is run or sourced.
7 >>
8 >> As a am always interested in a general way to solve something, I ask
9 >> if there is a tool, that displays me the order in which files are
10 >> read by a process.
11
12 > I'm not sure but you may want to check into strace. It may be what you
13 > are looking for.
14
15 strace fills the bill if you know what process (or its children) you
16 want to watch, and you can start that process manually.
17
18 If you don't know what process you want to watch, or there are a set
19 of unrelated processes, strace isn't very useful. In that case you
20 can use systemtap to monitor open operations on a particular file.
21
22 It takes a bit more work to use systemtap than it does to use strace,
23 but in many ways it's a lot more flexible and powerful:
24
25 http://sourceware.org/systemtap/
26
27 --
28 Grant Edwards grant.b.edwards Yow! And then we could sit
29 at on the hoods of cars at
30 gmail.com stop lights!