Questions tagged [profiling]
69 questions
684
votes
20 answers
How to get execution time of a script effectively?
I would like to display the completion time of a script.
What I currently do is -
#!/bin/bash
date ## echo the date at start
# the script contents
date ## echo the date at end
This just show's the time of start and end of the script. Would it be…
mtk
- 26,802
- 35
- 91
- 130
51
votes
5 answers
Determining Specific File Responsible for High I/O
This is a simple problem but the first time I've ever had to actually fix it: finding which specific files/inodes are the targets of the most I/O. I'd like to be able to get a general system overview, but if I have to give a PID or TID I'm alright…
Bratchley
- 16,684
- 13
- 64
- 103
17
votes
6 answers
How can I profile a shell script?
I have several programs that I'm executing in a shell script:
./myprogram1
./myprogram2
...
I know that I can profile each individual program by editing the source code, but I wanted to know if there was a way I could measure the total time…
Paul
- 9,163
- 12
- 32
- 30
15
votes
3 answers
Command to measure TLB misses on LINUX?
Could some one direct me to a command to measure TLB misses on LINUX, please? Is it okay to consider (or approximate) minor page faults as TLB misses?
samarasa
- 657
- 1
- 6
- 10
14
votes
2 answers
How to make linux 'perf record' work for libc and libstdc++ symbols?
I'm using perf record -g on x86-64 Linux to profile a program. Several symbols in libc or libstdc++ have 0 as a parent: __GI___strcmp_ssse3 (libc) and strcmp@plt (libstdc++) for example. (I can actually break on these symbols in the debugger and…
Benjamin Redelings
- 141
- 1
- 4
12
votes
1 answer
Security implications of changing “perf_event_paranoid”
I'd like to use the perf utility to gather measurements for my program. It runs on a shared cluster machine with Debian 9 where by default the /proc/sys/kernel/perf_event_paranoid is set to 3, therefore disallowing me to gather measurements. Before…
Martin Ueding
- 2,682
- 3
- 31
- 45
11
votes
2 answers
Locate occasional CPU kernel hog
I have a 2.6.35 PREEMPT kernel running on moderate-speed ARMv7 processor. About once every 100 - 125s, something causes the kernel to fail to process some audio-related drivers sufficiently quickly to avoid underruns. The hold-up are generally in…
awy
- 301
- 2
- 6
11
votes
3 answers
Detect if an ELF binary was built with gprof instrumentation?
Is it possible to check if given program was compiled with GNU gprof instrumentation, i.e. with '-pg' flag passed to both compiler and linker, without running it to check if it would generate a gmon.out file?
Jakub Narębski
- 1,228
- 2
- 17
- 30
8
votes
3 answers
Detailed Per-Process Profiling
I am looking for a way to profile a single process including time spent for CPU, I/O, memory usage over time and optionally system calls.
I already know callgrind offering some basic profiling features but only with debugging information and lacking…
scai
- 10,543
- 2
- 25
- 42
8
votes
3 answers
What are some good profiling tools for Linux?
I'm looking for some good profiling tools for Linux like OProfile. What I would like to see is how the operating system manages the interrupts, cache, read/writes, etc (lots of other intricate operations inside the OS) for different applications and…
0x0
- 260
- 3
- 9
7
votes
1 answer
Time all executions in bash
Is there a way to run all commands in bash as if they were invoked with time in front? I want that I could type $ some_command and this will actually invoke $ time some_command.
Dror
- 171
- 3
7
votes
1 answer
How to get the GPU execution time of a script in the shell?
I would like to display the completion time of a script, in terms of GPU time (not CPU).
For the CPU, I can simply use time:
francky@gimmek80s:~$ time ls -l
total 8
drwxrwxr-x 3 francky francky 4096 Dec 16 22:19 codes
drwxrwxr-x 2 francky francky…
Franck Dernoncourt
- 4,749
- 15
- 48
- 79
6
votes
6 answers
Run program at lower CPU speed?
It would be very useful for me to run specific programs in a Linux environment with a fixed (lower) CPU clock speed (say, runat 400mhz ./my-program --argument-of="my program" for getting that clock speed).
I need it to generate delays between each…
mgarciaisaia
- 252
- 4
- 9
6
votes
1 answer
Record time of every process or thread context switch
I'm trying to get the nearest to real-time processing I can with a Raspbian distribution on a Raspberry Pi for manipulating its GPIO pins. I want to get a "feel" for the kind of performance I can expect.
I was going to do this by writing a simple C…
Jodes
- 197
- 1
- 10
5
votes
0 answers
Memory consumption over variable period of time
There are a number of questions on this StackExchange about memory consumption, notably:
How to check which process is using most memory
How to display top results sorted by memory usage in real time?
How to find which processes are taking all the…
blong
- 209
- 2
- 3
- 13