strace for QNX

Hi

first, excause my poor english

I’m looking for a tool, named strace in linux for qnx. It shows you each
syscall which is performed by particular aplication.
It’s wery practical when program waiting, and you don’t know why, or when it
needs some files and you don’t know which.

Thanks

For example you can run on linux:

~$ strace ls

and then, in stderr you can see this:

execve("/bin/ls", [“ls”], [/* 26 vars */]) = 0
brk(0) = 0x8053608
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x40014000
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=17713, …}) = 0
old_mmap(NULL, 17713, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40015000
close(3) = 0
open("/lib/libtermcap.so.2", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=12224, …}) = 0
read(3, “\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\16\0”…, 4096)
= 4096
old_mmap(NULL, 15304, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4001a000
mprotect(0x4001d000, 3016, PROT_NONE) = 0
old_mmap(0x4001d000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x2000) = 0x4001d000
close(3) = 0
open("/lib/libc.so.6", O_RDONLY) = 3



There is not such tool. However there is an instrumented kernel
available separatly (not free) that will do just that, and more.

“Ondrej Holecek” <Ondrej.Holecek@aveco.com> wrote in message
news:9n236s$230$1@inn.qnx.com

Hi

first, excause my poor english

I’m looking for a tool, named strace in linux for qnx. It shows you each
syscall which is performed by particular aplication.
It’s wery practical when program waiting, and you don’t know why, or when
it
needs some files and you don’t know which.

Thanks

For example you can run on linux:

~$ strace ls

and then, in stderr you can see this:

execve("/bin/ls", [“ls”], [/* 26 vars */]) = 0
brk(0) = 0x8053608
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0)
= 0x40014000
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=17713, …}) = 0
old_mmap(NULL, 17713, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40015000
close(3) = 0
open("/lib/libtermcap.so.2", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=12224, …}) = 0
read(3, “\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\16\0”…,
4096)
= 4096
old_mmap(NULL, 15304, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4001a000
mprotect(0x4001d000, 3016, PROT_NONE) = 0
old_mmap(0x4001d000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x2000) = 0x4001d000
close(3) = 0
open("/lib/libc.so.6", O_RDONLY) = 3



“Mario Charest” <mcharest@zinformatic.com> wrote in message
news:9n2g3h$9o5$1@inn.qnx.com

There is not such tool. However there is an instrumented kernel
available separatly (not free) that will do just that, and more.

Woops sorry I though I was in a QNX6 newsgroup. There is a tool

call deja-view, it`s never been release but I think you can try
applying in the beta ( beta@qnx.com ?)

“Ondrej Holecek” <> Ondrej.Holecek@aveco.com> > wrote in message
news:9n236s$230$> 1@inn.qnx.com> …
Hi

first, excause my poor english

I’m looking for a tool, named strace in linux for qnx. It shows you each
syscall which is performed by particular aplication.
It’s wery practical when program waiting, and you don’t know why, or
when
it
needs some files and you don’t know which.

Thanks

For example you can run on linux:

~$ strace ls

and then, in stderr you can see this:

execve("/bin/ls", [“ls”], [/* 26 vars */]) = 0
brk(0) = 0x8053608
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1,
0)
= 0x40014000
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=17713, …}) = 0
old_mmap(NULL, 17713, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40015000
close(3) = 0
open("/lib/libtermcap.so.2", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=12224, …}) = 0
read(3, “\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\16\0”…,
4096)
= 4096
old_mmap(NULL, 15304, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0x4001a000
mprotect(0x4001d000, 3016, PROT_NONE) = 0
old_mmap(0x4001d000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3,
0x2000) = 0x4001d000
close(3) = 0
open("/lib/libc.so.6", O_RDONLY) = 3




\

Ondrej Holecek <Ondrej.Holecek@aveco.com> wrote:

Hi

first, excause my poor english

I’m looking for a tool, named strace in linux for qnx. It shows you each
syscall which is performed by particular aplication.
It’s wery practical when program waiting, and you don’t know why, or when it
needs some files and you don’t know which.

Thanks

For example you can run on linux:

~$ strace ls

There isn’t such a trace on a per-application level.

There is a pair of utilities to do this on a system-wide basis.

monitor will collect kernel trace information, and msgprint will display
the contents in a human readable form – but there will be LOTS of data.
msgprint along with normal Unix filtering tools (e.g. grep) can be used
to get a reasonable idea of what is happening.

deja-view is a beta product that provied a GUI for looking at the output
from monitor.

-David

QNX Training Services
dagibbs@qnx.com