Questions tagged [strace]
44 questions
13
votes
1 answer
Will strace watch system calls recursively on child processes of the main process being observed?
If I run strace on a program and that program spawns a subprocess (e.g. perl's system() call), will strace report the system calls for the child process as well?
Ross Rogers
- 4,807
8
votes
6 answers
Linux equivalent to Mac OS X's fs_usage
Is there a Linux equivalent to the Mac OS X command fs_usage? According to the man page it does the following: "report system calls and page faults related to filesystem activity in real-time".
I suppose one option would be to use strace and filter…
Khai
- 156
8
votes
0 answers
What’s the command line equivalent of strace on Windows?
I need to | findstr SomePATH in order to search if a program access and close immediately a specific path. On Linux, I would use myprogram | strace 2>&1 | grep SomPATH.
But what’s the equivalent on Windows ?
user2284570
- 2,020
7
votes
2 answers
Debugging connection timeouts using strace?
I'm trying to figure out why is Eclipse spinning, so I decided to fire up strace.
I found the eclipse process using:
$ ps ax | grep java
5546 ? Sl 19:04 /usr/bin/java ... [arguments omitted]
By running strace on this process, I see that…
jabalsad
- 1,527
6
votes
3 answers
Interfacing strace with Process Name instead of PID
How do I implement a wrapper script pstrace in bash that changes 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.
Nordlöw
- 217
6
votes
1 answer
Why strace sudo command bombs when sudo command works?
my username is allowed to execute
sudo command
then why does this bomb
strace sudo command
with the error:
sudo: must be setuid root
user322908
- 819
5
votes
1 answer
What can trigger a SIGPWR signal that interrupts a 'sendmsg' system call?
On a RHEL 6 host, I have a Cassandra server listening for TCP connections on localhost. In parallel, I have a client application that sends it requests. The client (C# Mono) uses sendmsg to send the serialized bytes.
I consistently see the sendmsg…
4
votes
0 answers
Understanding the strace output on a mac
I am seeing syscalls that I do not understand. Multiple calls ending with _nocancel. E.g. open_nocancel, close_nocancel. What are these calls and where do I find information about these? Google does not answer this question surprisingly and neither…
user220201
- 161
4
votes
1 answer
What is a SIG_0 when looking at an strace
Attaching strace to a process that is using a lot of cpu, shows that the pid is 'killed' over and over.
The process is using 130% cpu. What is a tgkill( SIG_0) ?
strace -p 3876
nanosleep({0, 100000}, NULL) = 0
tgkill(3876, 3884, SIG_0) = 0…
spuder
- 10,135
4
votes
2 answers
How do I strace the whole system?
strace allows you to monitor the activity of a particular program. How can I monitor the activity of all programs (expect for sshd/bash/strace_itself)?
Currently I'm using a hack like this:
function ppid() { cat /proc/"$1"/status | grep PPid: | grep…
Vi.
- 17,755
4
votes
1 answer
CURL fails with exit code 18 for SFTP with just few bytes remaining for file sizes less than120KB , but not when I add strace to sshd
There is weird issue with curl in Amazon Linux 2 server.
It fails with exit code 18 with just about ~1MB bytes to read. So to troubleshoot the issue, I have setup local SFTP server.
so my curl command is like this:
curl -u testuser:12345 -o…
GP92
- 309
4
votes
1 answer
Why do strace/truss sometimes 'fix' stuck processes?
Sometimes you have a stuck process that's been stuck for a while, and as soon as you go to poke at it with strace/truss just to see what's going on, it gets magically unstuck and continues to run! So from merely 'observing' these programs have some…
Emmel
- 351
3
votes
2 answers
How does 'strace' work?
Recently, I was using mv to move a large amount of files from my hard drive to a flash drive. I forgot to add a verbose flag so I had no idea "where" the move was at and how many transfers remained.
I found the strace utility and decided to use it…
nopcorn
- 16,982
3
votes
1 answer
Is it possible to strace pinging a host?
I am doing this
$ strace -f ping -s 1 www.google.com
execve("/bin/ping", ["ping", "-s", "1", "www.google.com"],
[/* 80 vars */]) = 0
getuid() = 1001
setuid(1001) = 0
getuid() …
socgen hacker
- 437
3
votes
1 answer
docker version hangs before server info
Introduction
I'm attempting to use the following version of docker on a Linux VM (uname -a returns Linux xen 4.1.17-yocto-standard #1 SMP PREEMPT Thu Jun 2 13:29:47 PDT 2016 x86_64 GNU/Linux), built from the docker_git BitBake recipe.
If I try to…
karobar
- 247