Questions tagged [tracing]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
3answers
53 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
0answers
27 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
1answer
18 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 ...
1
vote
2answers
99 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
0answers
23 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 ...
4
votes
3answers
90 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
1answer
27 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
1answer
55 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 ...
1
vote
1answer
53 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 ...
0
votes
0answers
28 views

Can zsh be configured to print all the files it executes or sources at logon time? [duplicate]

Some of the files which are supposed to be run at login time are not working on my system. It appears they are not run at all. Can zsh be configured to print all the files it executes or sources at ...
2
votes
1answer
76 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 ...
1
vote
0answers
100 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
1answer
141 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:") ...
2
votes
1answer
137 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 ...
6
votes
0answers
392 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
0answers
310 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 ...
6
votes
1answer
2k 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
1answer
45 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
1answer
864 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
1answer
170 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
0answers
183 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
2answers
143 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`...