Questions tagged [tracing]
The tracing tag has no usage guidance.
31
questions
0
votes
0
answers
16
views
How does perf manages the execution of a process before reporting its statistics?
Suppose I ran following perf command in the terminal to find number of page faults:
perf stat -e page-faults ls
I am not able to understand how perf executable (user space process) controls the ...
0
votes
0
answers
21
views
How to show full string contents in uftrace?
When tracing library calls using uftrace with -a option (autoargs), string arguments of functions are not being shown completely (they are truncated).
Example:
3.073 us [ 1363] | strlen("...
0
votes
0
answers
7
views
Inconsistent output from ftrace trace_pipe
I was trying to trace the kvm:kvm_exit and kvm:kvm_entry events for a few pids. When I do a cat trace_pipe. I noticed that the output format for some of the logs is a bit different from how it ...
0
votes
2
answers
15
views
extract application name from rawpacket
Sounds dumb, but can you extract application name from a packet/pcap.
For eg: If a packet destination is to chrome process, can you extract that information from packet?
2
votes
1
answer
49
views
How can I profile virtual memory accesses made in user mode and kernel mode?
I would like to generate a log of all virtual memory accesses performed in user mode and kernel mode as a result of running some program.
Besides collecting memory access locations, I also want to ...
5
votes
1
answer
515
views
How to trace DMA?
I am working on software that communicates with a PCI card through direct memory access (DMA) transactions. My programs use a suit of drivers and a library that handles the DMA. Everything runs on a ...
0
votes
1
answer
141
views
Suspicious pgrep run as root user on debian bullseye
I experience quite a bit of fan activity on my laptop, even the machine should be idle. When I take a look at my processes with top I have a pgrep process appear once in a while, taking some CPU. It ...
2
votes
1
answer
42
views
Multiple Tracing Events Readers
Question
Does the tracing pipes in Linux, for tracing events, accepts simultaneous readers?
Context
I am trying to get traces from the RAS subsystem while running some benchmarks.
This subsystem ...
3
votes
0
answers
104
views
What is causing this 3s delay in gvim startup?
The gvim program is stuck for 3 seconds before opening any file. This issue is isolated to gvim, vim opens just fine. Therefore, the cause must be somewhere in X or some related service and not vim.
...
0
votes
2
answers
416
views
zsh: Is it possible to trace all functions and commands called and aliases expanded during a command’s execution?
I want something like this:
# source:
a() b mp3 m4a "$@"
b() eval "${1}-to-${2} $@:q"
alias mp3-to-m4a='ffmpeg ...'
#
$ traceall a a.mp3 a.m4a
# should return:
Functions:
a
b
Aliases:
mp3-to-...
4
votes
3
answers
5k
views
How to debug/trace bash function?
I have a bash script myscript.sh, which has a bunch of functions inside. To run one function, I would write
source myscript.sh; myfunction
How debug such a function?
2
votes
0
answers
55
views
Record filesystem activity
I would like to record all filesystem activity so that I can later replay it at will (for benchmarking purposes). What's the best way of doing that?
I considered strace, but rejected that because it ...
0
votes
1
answer
244
views
Why cannot I enable tracing?
According to the README file in /sys/kernel/debug/tracing/README, doing echo 1 > tracing_on should be a quick way to enable tracing. No matter how many times I execute this (as root), the value in ...
2
votes
2
answers
666
views
What is this `gmain` process with these unknown PIDs in my trace file?
Reading up on an answer to find out which process registered inotify watchers, I executed the following commands
echo 1 | sudo tee /sys/kernel/debug/tracing/events/syscalls/...
1
vote
0
answers
49
views
Determine average and maximum execution time of a task by using ftrace/perf
I've gathered some traces containing scheduling events ('sched:*') by using ftrace and perf record. By analyzing the results many of my questions could already be answered.
However, I was wondering ...
5
votes
3
answers
864
views
Define bash function which does not show up in xtrace (set -x)
In a bash script I have a log() function that is used in several places, as well as a logs() function that diverts lots of line to log(). When I run parts of the script with set -x, obviously all ...
0
votes
1
answer
262
views
Is there a command to show tracepoints "live", which includes the PID?
I have tried looking at the documentation for perf script, perf trace, and trace-cmd, including the list of commands in "SEE ALSO".
I can trace e.g. sched:sched_process_exec "live" using perf trace -...
2
votes
1
answer
191
views
How can I diagnose a process which has no executable file name associated with it?
There is a process taking up 100% CPU on a KVM based server I am running.
This is the output of htop.
PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command
22230 ...
2
votes
0
answers
292
views
Tool for displaying timeline view of kernel/userspace execution trace
I've used the ftrace tool trace-cmd for recording scheduling tracepoints and syscall tracepoints. I can inspect them visually using the kernelshark GUI program. It dislays per-core timelines and per-...
3
votes
1
answer
318
views
Can getauxval be used to determine whether or not you're being traced?
Coming off of this question, I patched my kernel in a quest to get SQL Server 2017 on Linux to start up. Now I'm getting further but I'm being shut down,
strstr("TracerPid:\t0\n", "TracerPid:") ...
1
vote
1
answer
68
views
Modifying standard DTT scripts to use -c instead of $1
There are lots of great dtrace programs out there and some of them require a PID to be passed to them, in order for them to trace that PID. Inside the dtrace scripts that argument is stored in $1. Is ...
2
votes
1
answer
247
views
Ftrace time duration
I echoed 1 to tracing_on in /sys/kernel/debug/tracing directory and echoed 0 again after a second. However, the timestamp of the first entry is 216.852 and that of the last entry is 234.136 giving me ...
7
votes
1
answer
737
views
How to capture the xtrace output (only) in a file?
I know that I can redirect the xtrace output to some_file with something like this:
exec 2 >> some_file
set +x
...but this sends to some_file not only the xtrace output, but also any other ...
1
vote
0
answers
348
views
Trace apache server activity for a specific http request
I have a cracker serving fake content to google bot from my Drupal site. They are able to generally bypass my CMS system but bootstrap it just enough catch http request and return a "cloned" page with ...
2
votes
1
answer
65
views
How to measure changes to the filesystem done by a certain application? [closed]
I am using a command line application which creates a great amount of intermediate artifacts to the file system and then at some point deletes them.
On environments where storage space is constrained ...
8
votes
1
answer
3k
views
filter out certain processes and/or pids in ftrace?
I'm not sure if I'm thinking about this the right way (and please correct me if I'm wrong), but the following is my understanding of ftrace.
In /sys/kernel/debug/tracing, there are the following ...
0
votes
1
answer
50
views
Uprobes Status on the present linux kernel
I know uprobes was introduced on kernel 3.5 has it survived or is it dropped, is it still available on kernel 4.x
1
vote
1
answer
1k
views
configure: error: LDFLAGS
I am trying to install LTTng.
I was installing lttng-tools-2.6.0 and got the following error:
configure: error: Cannot find libuuid uuid_generate nor libc uuid_create. Use LDFLAGS=-Ldir to specify ...
1
vote
1
answer
196
views
Function tracing per thread
I have a complex multi threaded application running on a Cent OS 5.8
the application is coded using C and C++
I am searching for a FUNCTION TRACING tool which can help me do the following.
Trace all ...
2
votes
0
answers
209
views
How to reliably and transparently trace process execution
During compilation of most (if not all) software packages, the output on stdout and stderr is created by multiple individual processes and the files that are processed/changed/created in the course of ...
1
vote
2
answers
330
views
`nl` invocation soaking all input before numbering
How can this be done?
I don't see any applicable option in the manual.
I have positively checked that indentation breaks after ten million lines.
You can check it like:
$ (for i in `seq 0 10000000`...