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?
How do I implement a wrapper script pstrace in bash that changees the interface of
[sudo] strace -c -p [PID]
to
[sudo] pstrace -c -p [PROCESS-NAME]
similar to how
killall [PROCESS-NAME]
is used. With completion and everything.
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'm currently fascinated by strace so, being new to it, I decided to play around a little. As suggested by the question title, I tried both strace su and strace ssh. Both commands displayed the password I typed in the strace output. su kept complaining of an incorrect password while ssh managed to log in normally.
My questions:
Is this a security flaw or am I missing something?
I login as root but stace give me this:
root@kyznecov-System:/home/kyznecov# whoami
root
root@kyznecov-System:/home/kyznecov# ps -e | grep 111
3807 pts/2 00:00:00 111
3810 pts/2 00:00:00 111
root@kyznecov-System:/home/kyznecov# strace -p 3810
attach: ptrace(PTRACE_ATTACH, ...): Operation not permitted
Could not attach to process.
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 aware about the powerful /proc file system. If I have a process id, I can easily see the details about it by browsing the /proc/<process-id>/. Consider I have a process that starts, does some job and ends. Something like "grep" or "find". How do you see the details of this process?
progandy wrote:felixonmars wrote:I've tried strace -f -eopen, but it shows that file was not opened during installation of xplc, but did exist after then.You traced the wrong system call: sudo strace -f -esymlink pacman -S xplcOops, thanks a lot.I finally know that it is ldconfig which creates the symlink, by using:# strace -f -e trace=file,process pacman -S xplc
felixonmars
https://
I am looking for a way to profile a single process including time spent for CPU, I/O, system calls and optionally memory usage over time.
I already know callgrind offering some basic profiling features but only with debugging information and lacking most of the other mentioned information.
I know strace -c providing a summary about all system calls and their required CPU time.
I know several IO