Questions tagged [strace]

strace is a Linux/UNIX tool for logging and analysing the system calls made by a user-side process.

strace is a diagnostic, debugging and instructional userspace utility for Linux. It is used to monitor interactions between processes and the Linux kernel, which include system calls, signal deliveries, and changes of process state. The operation of strace is made possible by the kernel feature known as .

Use this tag to ask programming questions related to the strace command and the strace() system call.

Source: Wikipedia

485 questions
-1
votes
1 answer

Trouble understanding strace of a process

I have a perl script running as daemon. It hits a database every 10 seconds and if there are any jobs in the queue, it spawns a separate shell to execute an individual job. But very often script fails to fetch jobs from database. Ideally there…
John
  • 1
  • 1
-1
votes
1 answer

php process LD_LIBRARY_PATH big cpu usage

I'm finding the causes of PHP process using so much CPU , server is Apache mpm worker + suphp below is some output of 'strace php', as you can see, the process is looking for dso in 'incorrect' path, these are just compiled PHP extensions, is there…
-2
votes
2 answers

Bash one-liner that takes the output of pidof and passes them as arguments to strace?

I want to get the PIDs of a given process name and attach to their outputs with strace. I can do this manually like so: $ pidof foobar 1234 2345 $ strace -p1234 -p2345 -s9999 -e write Great! But I want to automate this from Ansible, so I need to…
deed02392
  • 4,799
  • 2
  • 31
  • 48
-2
votes
2 answers

android adb strace not found on windows

I want to log all the system calls of an Android app. When I run the command adb shell strace I get /system/bin/sh: strace: not found I am on windows 10 and I have installed the Android platform tools 28.0.1. I have tried to use the command make on…
-2
votes
2 answers

Inline Assembler Syscall PTRACE(Operation not permitted)

Hello I´ve got a Problem #include #include #include #define SYS_PTRACE 101 long my_ptrace(long pid) { long ret; __asm__ volatile( "mov $0x10, %%rdi\n" "mov %0, %%rsi\n" "xor %%rdx,%%rdx\n" "xor %%r10, %%r10\n" "mov…
1 2 3
32
33