I want to find out by which file and line the */temp/environment
script is run or sourced.
As a am always interested in a general way to solve something, I ask
if there is a tool, that displays me the order in which files are
read by a process.
Al
10-01-2010, 04:29 PM
Dale
oder of files opened by a process
Al wrote:
Hello,
I want to find out by which file and line the */temp/environment
script is run or sourced.
As a am always interested in a general way to solve something, I ask
if there is a tool, that displays me the order in which files are
read by a process.
Al
I'm not sure but you may want to check into strace. It may be what you
are looking for.
* dev-util/strace
Available versions: 4.5.18 4.5.19 ~4.5.20 {aio static}
Homepage: http://sourceforge.net/projects/strace/
Description: A useful diagnostic, instructional, and
debugging tool
Hope that helps.
Dale
:-) :-)
10-01-2010, 05:00 PM
Darren Kirby
oder of files opened by a process
On Fri, Oct 1, 2010 at 10:29 AM, Dale <rdalek1967@gmail.com> wrote:
> Al wrote:
>>
>> Hello,
>>
>> I want to find out by which file and line the */temp/environment
>> script is run or sourced.
>>
>> As a am always interested in a general way to solve something, I ask
>> if there is a tool, that displays me the order in which *files are
>> read by a process.
>>
>> Al
>>
>>
>
> I'm not sure but you may want to check into strace. *It may be what you are
> looking for.
>
strace may do the job in a pinch, but there is almost certainly
something better suited to the task...however I don't know what it is.
You may want to use like this:
$ strace YourScript 2>&1 | grep open
which will run YourScript and print all open() system calls to the
console. You will have to sort through many unrelated calls (such as
reading shared library calls) but it will show the order in which your
script is opening external files. Presumably you could key in on the
relevant files using more grep calls and pipes...
>
> Dale
>
> :-) *:-)
>
>
D
--
--
Support the mob or mysteriously disappear...
I'm on flickr: http://www.flickr.com/photos/badcomputer/
10-01-2010, 05:25 PM
Al
oder of files opened by a process
>
> I'm not sure but you may want to check into strace. *It may be what you are
> looking for.
>
> * dev-util/strace
> * * Available versions: *4.5.18 4.5.19 ~4.5.20 {aio static}
> * * Homepage: * * * * * *http://sourceforge.net/projects/strace/
> * * Description: * * * * A useful diagnostic, instructional, and debugging
> tool
>
> Hope that helps.
Arrrgh,
configure: error: operating system cygwin is not supported by strace
Any windows alternative?
Al
10-01-2010, 05:51 PM
walt
oder of files opened by a process
On 10/01/2010 10:25 AM, Al wrote:
configure: error: operating system cygwin is not supported by strace
Any windows alternative?
This may be overkill for your purpose, but it's a great tool:
I'm not sure but you may want to check into strace. It may be what you are
looking for.
* dev-util/strace
Available versions: 4.5.18 4.5.19 ~4.5.20 {aio static}
Homepage: http://sourceforge.net/projects/strace/
Description: A useful diagnostic, instructional, and debugging
tool
Hope that helps.
Arrrgh,
configure: error: operating system cygwin is not supported by strace
Any windows alternative?
Al
I have no ideas on windoze. I don't have it here and try to stay away
from it when possible. I just assumed since you posted on a Linux list
and there was no mention of windoze in the original post that you were
looking for a Linux tool.
Can't help you there. Sorry.
Dale
:-) :-)
10-01-2010, 06:35 PM
Grant Edwards
oder of files opened by a process
On 2010-10-01, Dale <rdalek1967@gmail.com> wrote:
> Al wrote:
>> Hello,
>>
>> I want to find out by which file and line the */temp/environment
>> script is run or sourced.
>>
>> As a am always interested in a general way to solve something, I ask
>> if there is a tool, that displays me the order in which files are
>> read by a process.
> I'm not sure but you may want to check into strace. It may be what you
> are looking for.
strace fills the bill if you know what process (or its children) you
want to watch, and you can start that process manually.
If you don't know what process you want to watch, or there are a set
of unrelated processes, strace isn't very useful. In that case you
can use systemtap to monitor open operations on a particular file.
It takes a bit more work to use systemtap than it does to use strace,
but in many ways it's a lot more flexible and powerful:
http://sourceware.org/systemtap/
--
Grant Edwards grant.b.edwards Yow! And then we could sit
at on the hoods of cars at
gmail.com stop lights!
10-01-2010, 06:36 PM
Grant Edwards
oder of files opened by a process
On 2010-10-01, Al <oss.elmar@googlemail.com> wrote:
>>
>> I'm not sure but you may want to check into strace. ?It may be what you are
>> looking for.
>>
>> * dev-util/strace
>> ? ? Available versions: ?4.5.18 4.5.19 ~4.5.20 {aio static}
>> ? ? Homepage: ? ? ? ? ? ?http://sourceforge.net/projects/strace/
>> ? ? Description: ? ? ? ? A useful diagnostic, instructional, and debugging
>> tool
>>
>> Hope that helps.
>
> Arrrgh,
>
> configure: error: operating system cygwin is not supported by strace
>
> Any windows alternative?
Perhaps you'd be better off asking in a Cygwin/Windows forum than a
Linux one?
--
Grant Edwards grant.b.edwards Yow! I'm reporting for duty
at as a modern person. I want
gmail.com to do the Latin Hustle now!
10-01-2010, 06:38 PM
Al
oder of files opened by a process
Thanks, it was a good suggestion anyway and I will use it the next
time I run on Linux.
>
> I have no ideas on windoze. *I don't have it here and try to stay away from
> it when possible. *I just assumed since you posted on a Linux list and there
> was no mention of windoze in the original post that you were looking for a
> Linux tool.
Ooops, I was convinced this was the Gentoo user list.
You know Gentoo != Linux. But there is an intersection.
Al
10-01-2010, 06:47 PM
Al
oder of files opened by a process
>
> Perhaps you'd be better off asking in a Cygwin/Windows forum than a
> Linux one?
>
Again, Gentoo != Linux.
But, you are right to suggest the Cygwin list. I didn't anticipate
that such a tool would depend on the kernel architecture. The posix
layer is there.