Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [trace]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
13 views

Instrumentation Tools for Collecting Data in Memory Accesses

We can use instrumentation tools, such as Pin tool, to collect memory accesses of an application. The type (read or write) and memory address can be collected. How about data? Can we use Pin tool to ...
user avatar
1 vote
0 answers
26 views

How to find all the unclosed files of a process?

I'm trying to debug if my app keeps opened files somewhere in the code. I thought of using strace for that but all of the previous topics (like this one) were talking about only opened files. While ...
user avatar
  • 63
0 votes
1 answer
68 views

/sys/kernel/debug/tracing/trace overwrites itself after a few seconds. How can I collect it without duplicates?

When setting up the function_graph tracer in Linux (Ubuntu 18), the trace that is stored at /sys/kernel/debug/tracing/trace only stores a couple of seconds before overwriting itself. As the period ...
user avatar
  • 103
0 votes
0 answers
19 views

What files should be deleted if i don't want anyone to know if the system has been once linked to the internet?

For certain reasons I have to delete all files that might indicate that the syatem has once been linked to the internet. I have deleted all the records in browser, and the internet ethernet address. ...
user avatar
1 vote
1 answer
356 views

'cannot attach kprobe, probe entry may not exist' when execute trace-bpfcc

I am following bcc Tutorial and trying to execute the trace-bpfcc command: sudo trace-bpfcc 'sys_execve "%s", arg1' The command fails with an error: cannot attach kprobe, probe entry may not ...
user avatar
  • 205
3 votes
0 answers
58 views

Is there any solution to ltrace calls made by libs opened using dlopen()?

I wrote different two different types of queues. Bundled them in different .sos. I have a driver main.c which tests functions offered by those queues. main.c makes use dlfcn.h to load, unload required ...
user avatar
0 votes
1 answer
40 views

Declare non environment variables and print them directly afterwards

I want to declare a few non environment variables and print them directly afterwards. For example: read domain && web_application_root="${HOME}/www" && domain_dir="${...
user avatar
-5 votes
2 answers
109 views

Hunting for a malware

I'm hunting a malware under my linux .mozilla folder. My first step is try to log all opened files during running of firefox. What do you advice me to use for this purpose ? Strace ? Are there other ...
user avatar
  • 156
0 votes
0 answers
116 views

How to trace problem of application not starting in Linux?

I have opensuse leap 15.0. I installed a libero soc application from microsemi. It is giving me a bizarre problem. When installed libero soc v12, after clicking its desktop icon, it starts ...
user avatar
1 vote
1 answer
336 views

Using tcpdump to trace IP of strangers(predators) on omegle

I am using tcpdump to capture packets while being on omegle. However, I have been fairly unsuccessful to get strangers IP. All the IP I see are traced back to either 172...* which is for google 104....
user avatar
  • 244
7 votes
1 answer
2k views

Turn on xtrace with environment variable

Bash has a sometimes-useful feature whereby if you turn on the "-x" option (I believe the symbolic name is xtrace), Bash outputs each line of script as it executes it. I know of two ways to enable ...
user avatar
0 votes
2 answers
425 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-...
user avatar
  • 1,287
1 vote
1 answer
631 views

Fio Replay of Blktrace File Fails due to No Space Left on the Device

I am using fio-3.14 to replay a trace file created by blktrace. My linux version is Mint 18.3 with the kernel 4.10.0-38-generic. As a root, I followed the steps as below: First Step I applied an fio ...
user avatar
2 votes
1 answer
1k views

How to understand Trace from dmesg?

I'm learning linux kernel debugging and dmesg is the tool that output kernel debug log: ... [ 2.988000] Trace: [ 2.988000] [<ffffffff80942810>] __warn+0x160/0x190 [ 2.988000] [<...
user avatar
  • 267
1 vote
1 answer
119 views

Investigation - user's password is lost in every reboot issue

I'm investigating this issue: pi's password is lost in every reboot. Issue summary: Change pi's password by passwd command -> reboot -> the changed password always will be changed to another which we ...
user avatar
0 votes
1 answer
45 views

Performance reduction activating trace-functionality in kernel

Is there any performance reduction to be expected from just activating trace (ftrace) functionality in the Linux kernel, but not using it at run time?
user avatar
1 vote
0 answers
326 views

How to trace a specific historic file in the Linux kernel tree: Git question

I'm currently manually building a Linux image with some specific drivers for a Xilinx Zynqmp device. Aside from the main Linux tree, there are 2 other mirrored Linux repositories, one from Xilinx and ...
user avatar
  • 11
2 votes
2 answers
3k views

Is there a way to use strace to trace different parts of a command pipeline?

I have a pipeline like this: command1 | command2 Is there a way to trace both commands simultaneously?
user avatar
1 vote
1 answer
642 views

How to trace line by line by "gdb" C/C++ code? [closed]

I have installed gdb and added -g option to my compilation command, but when I try (gdb) s or (gdb) n it says: The program is not being run. It only works when I try (gdb) r and goes and stops ...
user avatar
1 vote
0 answers
57 views

Failure of getting Kernel trace logs

"File possibly truncated. Need atleast %ld size but size is %ld". How is this message is invoked? I am seeing this message when I am trying to collect the kernel-trace. Can anyone explain why this ...
user avatar
  • 11
0 votes
1 answer
2k views

Understanding dmesg warning

Could anyone give some insight on what these warnings mean in the below dmesg log? Do they mean that the atl1c module is failing to load completely or merely a warning? Any information that helps ...
user avatar
1 vote
1 answer
342 views

Trace sequence of scripts/commands executed upon ssh

I am executing ssh myuser@myserver. Is there any way to trace all actions performed and the names of files being sourced? (similarly as with bash -x) PS: I executed bash -x at the command prompt ...
user avatar
1 vote
0 answers
220 views

Function profiling on multi-core platform for specific PID using ftrace

I'm trying to use ftrace for function profiling based on function_profile_enabled as described here. I would like to capture function calls only for a certain PID using set_ftrace_pid as described in ...
user avatar
  • 131
3 votes
2 answers
3k views

Tool to print out functions being called during run time?

I am looking for such kind of a tool on either Unix/Linux platform which can achieve: I have the source files and I compiled the application myself (the source code is in C, although I don't really ...
user avatar
  • 251
0 votes
0 answers
65 views

how to enable info layer in syslog?

syslog usually filter out output trace messages with predefined tag types like: dbg, info, note, warn, err, crit, alert, emerg, etc. What is the proper way to enable/disable syslog filtering during ...
user avatar
1 vote
1 answer
1k views

mtr not working from cron

The script below works perfectly when ran from the CLI but when running it from a cron it fails with the error "/usr/local/sbin/mtr: Failure to start mtr-packet: Invalid argument" Here's the cron ...
user avatar
5 votes
3 answers
735 views

Inspect IO operations on FreeBSD system

I would know is there any way to inspect/intercept IO operations on FreeBSD. Like ktrace but if I don't know the process (which takes some big time for example).
user avatar
3 votes
0 answers
247 views

monitoring block access to disk

I am looking for a way to monitor access to disk blocks, and to monitor the access as a bitmap of blocks. I also need the capability to freeze (and queue) the device block access (and also to ...
user avatar
  • 1,317
4 votes
2 answers
2k views

How to find out the reason why ssh processes are hanging?

When I run command like iostat -dkx 2 2 via ssh, I get the expected result, but the processes on the local computer are saying alive in status "interruptible sleep". Why is this happening? Is there a ...
user avatar
8 votes
1 answer
1k views

Tool to trace library calls in Linux/ARM

I am searching for a tool that allows to trace calls to functions in shared libraries in Linux/ARM. Basically, I want to be able to specify a command line and let this tool produce a record of called ...
user avatar
  • 201
3 votes
1 answer
599 views

Trace kernel object calls

We have strace to trace programs, ltrace for dynamic libraries, and others. Is there any equivalent for kernel objects, as in tracing just like strace but for a specific .ko? Thanks
user avatar
  • 383
0 votes
1 answer
2k views

Dtrace on linux

I am trying to install dtrace on Cent OS 6.4 kernel 2.6.32-358.el6.x86_64 with following error [root@mscserver dtrace-20150306]# make all BUILD_DIR=build-2.6.32-358.el6.x86_64 tools/build.pl build-...
user avatar
  • 21
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 ...
user avatar
  • 21
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 ...
user avatar
  • 21
1 vote
2 answers
1k views

Should I use Linux's acct (BSD process accounting) to track a process behavior?

I have a daemon process (slapd) which sometimes stops with no apparent reason. No segfault occurs. Nothing special in the logs. So, I'm trying to use acct to track the process' life, especially its ...
user avatar
  • 17.6k
0 votes
2 answers
1k views

Are there distros with ptrace_scope set to zero by default?

I wanted to use ptrace on a recent version of Ubuntu to inspect the memory of any other process running under the same OS user. However, I quickly stumbled upon Operation not permitted After a ...
user avatar
  • 181
21 votes
2 answers
5k views

How to find out what process is writing to STDOUT?

I have two instances of a process running. One of them is "frEAkIng oUT!" and printing errors non stop to STDOUT. I want to kill the broken process but I have to make sure I don't terminate the wrong ...
user avatar
  • 1,059
5 votes
2 answers
436 views

set verbose prints unrelated extra lines

Using set -x causes my shell to print unrelated stuff. For example: $ set -x ++ printf $'%157s\r' $ echo 'hello' + echo hello hello ++ printf $'%157s\r' The lines starting with '++' are extra. How ...
user avatar
10 votes
2 answers
6k views

FreeBSD 10 trace disk activity

Is there any way to find some process which is periodically writing to disk (according to hdd led) on FreeBSD 10 with ZFS (maybe turn ZFS into verbose logging mode)? lsof and other instantly ...
user avatar
  • 113
6 votes
2 answers
5k views

Why does bash add single quotes to unquoted failed pathname expansions in a command before executing it?

I was exploring the tracing of commands using set -x (set +x to unset) in bash: Print a trace of simple commands, for commands, case commands, select commands, and arithmetic for commands and ...
user avatar
0 votes
1 answer
1k views

How to log all udp packets from port N in readable format?

How to log into file all udp packets (in and out) from port N in readable format (capture packet type (time stamp, name of error if one happens or message type, data size, data))?
user avatar
  • 293
2 votes
1 answer
2k views

Resolving executable user stack trace addresses in ftrace

I'm trying to obtain a user stack trace in ftrace, but for some reason, only my user program cannot resolve the addresses to symbols. First, the OS I'm using is: $ uname -a Linux mypc 2.6.38-16-...
user avatar
  • 6,186
13 votes
2 answers
4k views

Observing a hard-disk write in kernel space (with drivers/modules)

Apologies in advance if this post is a bit dense/messy, but I'm having a hard time formulating it better... Basically, I would like to study what happens upon a hard disk write, and I'd like to know: ...
user avatar
  • 6,186
9 votes
2 answers
8k views

Which file in kernel specifies fork(), vfork()... to use sys_clone() system call

When ltrace is used for tracing the system calls, I could see that fork() uses sys_clone() rather than sys_fork(). But I couldn't find the linux source where it is defined. My program is: #include<...
user avatar
  • 3,978
5 votes
3 answers
372 views

Can I recursively print all current remote shells?

Is there a way to print out all of the local and remote shells I am currently in, recursively? For example, on my local machine, I will ssh into another machine. From there, I may switch users (...
user avatar
3 votes
2 answers
1k views

How to increase ftrace precision to microseconds?

I'm trying to generate FTrace files inside an Android environment, using: root@adroid:# echo 1 > /sys/kernel/debug/tracing/events/sched/sched_switch/enable root@adroid:# echo 1 > /sys/kernel/...
user avatar
1 vote
1 answer
204 views

Wrapper script to list sourced/executed files

Is it possible to write a command which runs my.sh and prints every path sourced or executed by this script recursively - That is, without altering the original code at all? The idea is to verify ...
user avatar
  • 46.9k
27 votes
5 answers
49k views

How to trace a java-program?

As a sysadmin I sometimes face situations, where a program behaves abnormally, while not creating errors at all or creating nonsense error-messages. In the past - before java came in - there were two ...
user avatar
  • 17.4k
3 votes
1 answer
553 views

Is there any way to attach latrace to an already-running process?

I want to trace a running multi-threaded process's library calls. As of 5 November 2012, there's only one way to get ltrace to fully support tracing multi-threaded processes: you must check out and ...
user avatar
4 votes
2 answers
7k views

What does "pollsys" mean? Solaris "truss" output

> truss -p 6482 /2: pollsys(0xE517AD88, 1, 0xE517AE30, 0x00000000) = 0 /2: pollsys(0xE517AD88, 1, 0xE517AE30, 0x00000000) = 0 /2: pollsys(0xE517AD88, 1, 0xE517AE30, 0x00000000) = 0 /...
user avatar
  • 1,457