Questions tagged [strace]
84 questions
31
votes
3 answers
How to set strace output characters string width to be longer?
Strangely i can't find it any where but when i stdout the output of strace into afile like this:
strace foo.exe | & tee foo.log
the out put is to short, how can i make the width longer?
user61104
- 523
- 1
- 8
- 16
20
votes
6 answers
Find out what high CPU usage apache process is actually doing?
Currently having a few issues with our server where, intermittently, we seem to get apache processes which just run and run, taking up 100% CPU.
When running top, we see the following:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ …
BT643
- 551
- 3
- 9
- 21
13
votes
1 answer
Can strace show me the filename/path for read/write syscalls
If, on Linux, I strace a process, then the reads and writes are shown with the file descriptor handle number. If I look in /proc/$PID/fd I can see the symlinks to the files that correspond to the fd number (if applicable).
Is there anyway to get…
Amandasaurus
- 30,211
- 62
- 184
- 246
13
votes
4 answers
Monitor all newly spawned processes on a Linux machine
Sometimes a process comes and goes faster than I can ps aux, I tried watch -d -n0.1 "ps aux | tail" but again, that's restricted to 1/10th of a second. What I really want is to run a command and follow all new processes, one per line, as they spawn.…
Vasiliy Sharapov
- 233
- 1
- 2
- 8
10
votes
4 answers
How would you simplify this command?
I'm quite new to strace / netstat / etc. I'm using this command to get a trace of the apache process handling my request (telnet), is there a way to simplify it a bit?
sudo strace -o /tmp/strace -f -s4096 -r -p $(netstat -antlp | \
grep $(lsof…
Andrei Serdeliuc
- 895
- 4
- 14
- 26
9
votes
5 answers
"yum clean" hangs - what to try next?
I run a number of CentOS servers. I was recently doing the occasional yum update but this failed on a handful of the servers. On most I have been able to move forward by doing:
# yum clean all
# rm -f /var/lib/rpm/__db*
# rpm --rebuilddb
# yum…
Hamish Downer
- 9,142
- 6
- 36
- 49
9
votes
3 answers
Monitor system CPU / system calls in Linux
I have a couple processes that are eating up a lot of system CPU time (as determined by looking at vmstat). Is there an easy way to find out what kind of system calls are being made?
I know there is strace, but is there a quicker and easier way? …
bajafresh4life
- 613
- 2
- 6
- 8
8
votes
2 answers
tail -f not following log file in Docker container
I am seeing some strange behavior running the tail -f command inside a Docker container in CoreOS.
There are a number of variables I can think of that may be contributing to the problem but I am not sure what I need to do to troubleshoot first. On…
jmreicha
- 791
- 1
- 16
- 29
6
votes
1 answer
strace shows long time reading from mysql socket - mysql takes long time to execute query?
My Apache server takes long time to process request. I attached strace to it and can see the two following delays:
1) Very critical (143 seconds to process)
1335 0.000037 write(16, "\235\0\0\0\3INSERT INTO `br_anonymous_user_tokens`…
Max Koretskyi
- 727
- 1
- 8
- 16
6
votes
1 answer
Java process (OpenDS) consumes all cpu (futex flood) - how to debug futex?
Today I noticed that my LDAP server (OpenDS) consumes 100% CPU on every available core. Fast diagnose showed me that there is a lot of ETIMEDOUT during the futex lock.
How Can I debug it to figure out what is happening and how to fix…
bluszcz
- 409
- 1
- 6
- 16
5
votes
1 answer
Strace poll, trying to diagnose bottleneck
I have no strace skill and knowlegde, but im trying to work through a problem where my clients application is awfully slow. And im trying to find out where the bottleneck / problem may lie.
So I ran
/etc/init.d/apache2 stop && strace -Tf -o…
Brent
- 76
- 1
- 1
- 3
4
votes
1 answer
debugging irssi using 100% cpu
I have a debian VM I'm running on an ESX4.0 server. This VM hosts a number of users, each running an irssi session inside a screen instance.
This is working quite well, except for one user. For some reason, this irssi session keeps peaking at 100%…
zigdon
- 471
- 1
- 4
- 8
4
votes
0 answers
mysql client slow login strace
I am experiencing an issue with slow connections/logins to a loaded mysql server, even when connecting via the unix socket file (CentOS 6.3). Queries are completing very quickly -- (0.00 sec) in this case -- but the login takes up to several…
carillonator
- 805
- 3
- 12
- 22
4
votes
2 answers
How to resolve high CPU + excessive stat("/etc/localtime") and clock_gettime(CLOCK_REALTIME) calls
I've been experiencing really high CPU on a ruby on rails app (see stack below) and have been trying to diagnose the possible causes to no avail.
Stack:
ruby 1.9.3
rails 3.2.6
Apache/2.2.21 (Debian)
Phusion Passenger 3.0.11
Whenever I run strace…
Yemster
- 41
- 1
- 3
4
votes
1 answer
Why does strace open, read 512 bytes, and THEN fstat libncurses?
I've got the following strace output that I'm going through to teach myself a little more about the flow of programs. Here's the section that's confusing me:
16:08:02 open("/lib/libncurses.so.5", O_RDONLY) = 3 <0.000046>
16:08:02 read(3, "\x7f\"...,…
MLACitation
- 43
- 3