Published at LXer:
Having trouble figuring out why Apache isn't starting, or another program is crashing and burning, and the logfiles are giving no clue? Time to reach for strace. What's strace? The strace utility is used to run a command and display its system calls, so you can see exactly what the program is doing until it exits.
I am using ptrace to count the syscalls of a program.
The problem is that given a program A, my program prints out the number of the syscalls made (open, close, read, write).
Ran into a weird situation I had not seen before while using strace -f command
I had to strace my 'passwd' command since I needed to debug something.
I'm trying to run strace trough ccze, and the pipe doesn't work as expected.
The command-line I'm running to test is sudo strace -p $(pgrep apache2) | grep open, and all lines are output, ignoring grep.
Is there something special about strace that causes this behavior?
A couple things to check:- are your system clock and timezone right?- is your hostname right, and is /etc/hosts sane?- is your locale correct ("locale" command) and is that locale built on your system ("locale -a" command)?- did you change file permissions or ownerships somewhere you shouldn't have, and apps are frustrated trying to access something they can't?
I'm trying to run this simple program ls under strace and it wouldnt let me. Can you guys think of why this be the case?
[jeffjose@skipper ~]$ strace ls
strace: ptrace(PTRACE_TRACEME, ...): Permission denied
I'm on Fedora 17b, and my shell is tcsh. I can provide more info, if needed.
UPDATE: Christopher points out that there's a bug report on this.
Performed strace on one one of the apache children and its showing 24 seconds between two system calls.How can i determine what is the cause of this behavior.It looks like both children are taking almost same amound of time(24.7 and 23.92) seconds.
we are using apache prefork with php5 and mysql 5
/var/lib/php5/ is the php session folder
strace output of apache children1 with processid -20539
I am tracing the rsh command. Now I understand how it performs.
I was using built-in strace given in /system/xbin/ directory in the emulator and it was giving me wrong set of system calls such as msgget() and msgrecv() which are not supported by Android even.
I downloaded a new strace4.7 from Source Forge and built with the instructions given at this link. Then I pushed it to /system/xbin/ directory after remounting adb.