'프로그램 사용'에 해당되는 글 2389건

  1. 2023.07.28 iperf3
  2. 2023.07.20 gcov와 gcovr
  3. 2023.07.19 gdbserver taget
  4. 2023.07.19 tek.com fft 관련 문서
  5. 2023.07.19 gdb conditional break
  6. 2023.07.13 audacity spectrogram 설정
  7. 2023.07.12 octave audioread wav
  8. 2023.07.12 sfft
  9. 2023.07.10 gcovr - gocv 를 html로
  10. 2023.07.10 gprof gui
프로그램 사용/iperf2023. 7. 28. 11:52

iperf/iperf2/ipef3 간에는 서로 호환성이 없는 듯. 기본 포트도 다르게 잡힌다.

 

크로스 컴파일

/configure --build=i686-linux --host=arm-linux CC={크로스 컴파일러GCC 경로} CXX={크로스 컴파일러G++ 경로}

[링크 : http://forum.falinux.com/zbxe/index.php?document_srl=869098&mid=lecture_tip]

 

대역폭 설정은 초당 얼마나 많은 데이터를 보내냐를 테스트 하는데 쓰이는데

$ iperf3 --help
Usage: iperf3 [-s|-c host] [options]
       iperf3 [-h|--help] [-v|--version]

Server or Client:
  -p, --port      #         server port to listen on/connect to
  -f, --format   [kmgtKMGT] format to report: Kbits, Mbits, Gbits, Tbits
  -i, --interval  #         seconds between periodic throughput reports
  -F, --file name           xmit/recv the specified file
  -A, --affinity n/n,m      set CPU affinity
  -B, --bind      <host>    bind to the interface associated with the address <host>
  -V, --verbose             more detailed output
  -J, --json                output in JSON format
  --logfile f               send output to a log file
  --forceflush              force flushing output at every interval
  --timestamps    <format>  emit a timestamp at the start of each output line
                            (using optional format string as per strftime(3))
  -d, --debug               emit debugging output
  -v, --version             show version information and quit
  -h, --help                show this message and quit
Server specific:
  -s, --server              run in server mode
  -D, --daemon              run the server as a daemon
  -I, --pidfile file        write PID file
  -1, --one-off             handle one client connection then exit
  --server-bitrate-limit #[KMG][/#]   server's total bit rate limit (default 0 = no limit)
                            (optional slash and number of secs interval for averaging
                            total data rate.  Default is 5 seconds)
  --rsa-private-key-path    path to the RSA private key used to decrypt
                            authentication credentials
  --authorized-users-path   path to the configuration file containing user
                            credentials
Client specific:
  -c, --client    <host>    run in client mode, connecting to <host>
  --sctp                    use SCTP rather than TCP
  -X, --xbind <name>        bind SCTP association to links
  --nstreams      #         number of SCTP streams
  -u, --udp                 use UDP rather than TCP
  --connect-timeout #       timeout for control connection setup (ms)
  -b, --bitrate #[KMG][/#]  target bitrate in bits/sec (0 for unlimited)
                            (default 1 Mbit/sec for UDP, unlimited for TCP)
                            (optional slash and packet count for burst mode)
  --pacing-timer #[KMG]     set the timing for pacing, in microseconds (default 1000)
  --fq-rate #[KMG]          enable fair-queuing based socket pacing in
                            bits/sec (Linux only)
  -t, --time      #         time in seconds to transmit for (default 10 secs)
  -n, --bytes     #[KMG]    number of bytes to transmit (instead of -t)
  -k, --blockcount #[KMG]   number of blocks (packets) to transmit (instead of -t or -n)
  -l, --length    #[KMG]    length of buffer to read or write
                            (default 128 KB for TCP, dynamic or 1460 for UDP)
  --cport         <port>    bind to a specific client port (TCP and UDP, default: ephemeral port)
  -P, --parallel  #         number of parallel client streams to run
  -R, --reverse             run in reverse mode (server sends, client receives)
  --bidir                   run in bidirectional mode.
                            Client and server send and receive data.
  -w, --window    #[KMG]    set window size / socket buffer size
  -C, --congestion <algo>   set TCP congestion control algorithm (Linux and FreeBSD only)
  -M, --set-mss   #         set TCP/SCTP maximum segment size (MTU - 40 bytes)
  -N, --no-delay            set TCP/SCTP no delay, disabling Nagle's Algorithm
  -4, --version4            only use IPv4
  -6, --version6            only use IPv6
  -S, --tos N               set the IP type of service, 0-255.
                            The usual prefixes for octal and hex can be used,
                            i.e. 52, 064 and 0x34 all specify the same value.
  --dscp N or --dscp val    set the IP dscp value, either 0-63 or symbolic.
                            Numeric values can be specified in decimal,
                            octal and hex (see --tos above).
  -L, --flowlabel N         set the IPv6 flow label (only supported on Linux)
  -Z, --zerocopy            use a 'zero copy' method of sending data
  -O, --omit N              omit the first n seconds
  -T, --title str           prefix every output line with this string
  --extra-data str          data string to include in client and server JSON
  --get-server-output       get results from server
  --udp-counters-64bit      use 64-bit counters in UDP test packets
  --repeating-payload       use repeating pattern in payload, instead of
                            randomized payload (like in iperf2)
  --username                username for authentication
  --rsa-public-key-path     path to the RSA public key used to encrypt
                            authentication credentials

[KMG] indicates options that support a K/M/G suffix for kilo-, mega-, or giga-

iperf3 homepage at: https://software.es.net/iperf/
Report bugs to:     https://github.com/esnet/iperf

 

'프로그램 사용 > iperf' 카테고리의 다른 글

iperf3 jumbo packet?  (0) 2025.02.15
iperf 파일로 바로바로 떨궈서 tail로 보기  (0) 2025.02.10
iperf udp 테스트  (0) 2022.03.14
iperf로 100M 랜 / IEEE1394 대역폭 측정  (2) 2011.12.07
iperf - 대역폭 측정  (0) 2009.10.22
Posted by 구차니

gcc 에서 빌드시에 아래의 플래그를 설정하고

-fprofile-arcs -ftest-coverage

 

빌드시에 생성되는 *.gnco 파일을 바이너리와 동일 경로에 두고 프로그램을 실행하면 *.gcda 파일이 생성된다.

그리고 gcovr을 아래 옵션을 주고 실행하면 html로 결과가 나온다.

소스 디렉토리 내에 bin/ 이 하위 디렉토리로 있어서

bin 에서 covr을 실행하였기에 상위 디렉토리(소스 디렉토리)를 지정해야 해서 "-r .." 을 사용해야 한다.

$ gcovr -r.. --html-details -o gcov.html

 

다만 크로스컴파일 환경에서 실행경로가 다르면 이래저래 번거로우니

profile-dir 플래그로 실행환경에 맞추어서 넣어주어야 편리할 듯 하다.

gcov uses two files for profiling. The names of these files are derived from the original object file by substituting the file suffix with either .gcno, or .gcda. The files contain coverage and profile data stored in a platform-independent format. The .gcno files are placed in the same directory as the object file. By default, the .gcda files are also stored in the same directory as the object file, but the GCC -fprofile-dir option may be used to store the .gcda files in a separate directory.

[링크 : https://gcc.gnu.org/onlinedocs/gcc/Gcov-Data-Files.html]

 

 

+

gcovr로 html 리포트를 생성하면 아래와 같이 나오는데

파일을 클릭하면 파일내에 branch 와 coverage가 나온다.

 

단일 파일 내에서는 Exec가 실행횟수 x는 실행이 한번도 되지 않은 영역이고

 

1/2 라고 나와서 눌러보면 머라고 나오는데 좀 이해가 안되네

'프로그램 사용 > gcov, gprof' 카테고리의 다른 글

gcovr - gocv 를 html로  (0) 2023.07.10
gprof gui  (0) 2023.07.10
gcc -p -pg  (0) 2016.02.25
gprof flat view 이해하기  (0) 2010.01.24
gcov, gprof  (0) 2010.01.23
Posted by 구차니

target remote를 이용하여 접속을 할때 사용하는 명령인데

target remote 이후에 포트를 적어주면 된다.

(gdb) help target
Connect to a target machine or process.
The first argument is the type or protocol of the target machine.
Remaining arguments are interpreted by the target protocol.  For more
information on the arguments for a particular protocol, type
`help target ' followed by the protocol name.

List of target subcommands:

target core -- Use a core file as a target.
target ctf -- (Use a CTF directory as a target.
target exec -- Use an executable file as a target.
target extended-remote -- Use a remote computer via a serial line, using a gdb-specific protocol.
target native -- Native process (started by the "run" command).
target record-btrace -- Collect control-flow trace and provide the execution history.
target record-core -- Log program while executing and replay execution from log.
target record-full -- Log program while executing and replay execution from log.
target remote -- Use a remote computer via a serial line, using a gdb-specific protocol.
target tfile -- Use a trace file as a target.

Type "help target" followed by target subcommand name for full documentation.
Type "apropos word" to search for commands related to "word".
Type "apropos -v word" for full documentation of commands related to "word".
Command name abbreviations are allowed if unambiguous.

(gdb) help target remote
Use a remote computer via a serial line, using a gdb-specific protocol.
Specify the serial device it is connected to
(e.g. /dev/ttyS0, /dev/ttya, COM1, etc.).

(gdb) help monitor
Send a command to the remote monitor (remote targets only).

 

monitor는 remote로 붙었을때만 보내는 명령인데 reset은 검색되진 않는다.

(gdb) file C:/temp/Blinky.elf
Reading symbols from C:/temp/Blinky.elf...done.
(gdb) target remote localhost:2331
Remote debugging using localhost:2331
0x00000000 in ?? ()
(gdb) monitor reset
Resetting target
(gdb) load

[링크 : https://wiki.segger.com/J-Link_GDB_Server]

'프로그램 사용 > gdb & insight' 카테고리의 다른 글

gdb attach  (0) 2025.11.11
gdb conditional break  (0) 2023.07.19
gdb 디버깅 타겟을 인자와 함께 실행하기  (0) 2022.10.17
gdb break  (0) 2021.04.09
gdb/insight target window  (0) 2010.05.19
Posted by 구차니

 

 

Fundamentals of Real-Time Spectrum Analysis

[링크 : https://download.tek.com/document/37W_17249_5_HR_Letter.pdf]

 

Understanding FFT Overlap Processing Fundamentals

[링크 : https://download.tek.com/document/37W_18839_1.pdf]

 

FFT 오버랩 프로세싱의 이해

[링크 : https://download.tek.com/document/37K_18839_0.pdf]

 

'프로그램 사용 > fft, fftw' 카테고리의 다른 글

fft 결과에 N(입력 샘플 갯수)로 나누는 이유  (0) 2023.09.21
FFT RBW  (0) 2023.09.19
sfft  (0) 2023.07.12
fft window type과 진폭 보정계수  (0) 2023.07.04
fft window 함수  (0) 2023.07.03
Posted by 구차니

 

Set a breakpoint
The first step in setting a conditional breakpoint is to set a breakpoint as you normally would. I.e.

(gdb) break <file_name> : <line_number>
(gdb) break <function_name>
This will set a breakpoint and output the breakpoint number

Check breakpoints
If you forget which breakpoints you can add a condition to, you can list the breakpoints using:

(gdb) info breakpoints
Set a condition for a breakpoint
Set an existing breakpoint to only break if a certain condition is true:

(gdb) condition <breakpoint_number> condition
The condition is written in syntax similar to c using operators such as == != and <.

 

break 줄여서 br

$ gdb factorial
Reading symbols from factorial...done.
(gdb) br 28
Breakpoint 1 at 0x11bf: file factorial.c, line 28.
(gdb) condition 1 i > 5

 

아래 소스에서 28라인 i++ 에 break를 걸고, 해당 라인에서 i > 5 인 조건에서 잡히게 한다.

반복문의 경우 확실히 디버깅 할 때 편할 듯.

//This program calculates and prints out the factorials of 5 and 17


#include <stdio.h>
#include <stdlib.h>

int factorial(int n);

int main(void) {

int n = 5;
int f = factorial(n);
printf("The factorial of %d is %d.\n", n, f);
n = 17;
f = factorial(n);
printf("The factorial of %d is %d.\n", n, f);

return 0;

}
//A factorial is calculated by n! = n * (n - 1) * (n - 2) * ... * 1
//E.g. 5! = 5 * 4 * 3 * 2 * 1 = 120
int factorial(int n) {
int f = 1;
int i = 1;
while (i <= n) {
f = f * i;
i++; // 28 line
}
return f;
}

 

[링크 : https://www.cse.unsw.edu.au/~learn/debugging/modules/gdb_conditional_breakpoints/]

'프로그램 사용 > gdb & insight' 카테고리의 다른 글

gdb attach  (0) 2025.11.11
gdbserver taget  (0) 2023.07.19
gdb 디버깅 타겟을 인자와 함께 실행하기  (0) 2022.10.17
gdb break  (0) 2021.04.09
gdb/insight target window  (0) 2010.05.19
Posted by 구차니

스펙트로그램 설정에 들어가면 fft 설정을 바꿀수 있다.

 

아쉽게도.. FFT Window Type / Size는 있는데 overlap 관련된 내용은 없네..

 

윈도우 크기가 커질수록

RBW(Resolution Band Width)가 낮아지면서 그래프가 더 세밀해지는 대신

시간축에 대해서는 현 시점으로 부터 더 뒤의 값을 보기 때문에

더 일찍 부터 다른 주파수의 값들이(아래 그림에서 하얗고 빨간 부분)이 먼저 나오게 된다.

즉, 윈도우 크기와 반응성은 반비례 라고 보면 되려나?

 

128

256

 

512

 

1024

[링크 : https://manual.audacityteam.org/man/spectrogram_view.html]

 

그래.. 12년 지났으면 까먹어도 인정해줘야지. 음!

2011.05.23 - [프로그램 사용/audacity] - audacity - spectrum analyze + Frequency Width

Posted by 구차니
프로그램 사용/octave2023. 7. 12. 11:30

various 치고는 wav, flac, ogg 세개는 너무하지 않냐.. mp3는 어디갔어 ㅠㅠ

 

33.1 Audio File Utilities
The following functions allow you to read, write and retrieve information about audio files. Various formats are supported including wav, flac and ogg vorbis.

Loadable Function: info = audioinfo (filename)
Return information about an audio file specified by filename.

Loadable Function: [y, fs] = audioread (filename)
Loadable Function: [y, fs] = audioread (filename, samples)
Loadable Function: [y, fs] = audioread (filename, datatype)
Loadable Function: [y, fs] = audioread (filename, samples, datatype)

[링크 : https://docs.octave.org/v4.0.0/Audio-File-Utilities.html]

'프로그램 사용 > octave' 카테고리의 다른 글

octave csv에서 읽어들이기  (0) 2024.11.26
공짜 matlab? octave  (0) 2015.11.05
Posted by 구차니

'프로그램 사용 > fft, fftw' 카테고리의 다른 글

FFT RBW  (0) 2023.09.19
tek.com fft 관련 문서  (0) 2023.07.19
fft window type과 진폭 보정계수  (0) 2023.07.04
fft window 함수  (0) 2023.07.03
pFFFT 사용법  (0) 2023.06.15
Posted by 구차니

 

$ gcovr 
(WARNING) GCOV produced the following errors processing /proj/bin/app-config.gcno:
/proj/bin/app-config.gcda:cannot open data file, assuming not executed
Cannot open source file config.c

 

 

gcovr -r ../.. --html-details -o ../../../coverage.html ...

[링크 : https://github.com/gcovr/gcovr/issues/368]

 

GCOVR(1)                                                    User Commands                                                    GCOVR(1)

NAME
       gcovr - generate simple coverage reports

DESCRIPTION
       usage: gcovr [options] [search_paths...]

       A utility to run gcov and summarize the coverage in simple reports.

OPTIONS
       -h, --help
              Show this help message, then exit.

       --version
              Print the version number, then exit.

       -v, --verbose
              Print progress messages. Please include this output in bug reports.

       -r ROOT, --root ROOT
              The  root  directory  of your source files. Defaults to '.', the current directory. File names are reported relative to
              this root. The --root is the default --filter.

 

You can use __gcov_flush() method inside your code. You will need to invoke this from registered signal handler.

[링크 : https://stackoverflow.com/questions/13957649/gcov-not-showing-any-coverage-data]

 

Note the comment by Paweł Bylica -- __gcov_flush() has been removed in GCC 11, you should use __gcov_dump().

[링크 : https://stackoverflow.com/questions/19655479/undefined-reference-to-gcov-flush]

 

 

[링크 : https://educoder.tistory.com/entry/소프트웨어-공학gcov테스트-커버리지-측정]

  [링크 : https://gcovr.com/en/stable/guide.html]

[링크 : https://jchern.tistory.com/16]

[링크 : https://velog.io/@kongsub/GCOV-사용해보기-Lab1-Triangle]

'프로그램 사용 > gcov, gprof' 카테고리의 다른 글

gcov와 gcovr  (0) 2023.07.20
gprof gui  (0) 2023.07.10
gcc -p -pg  (0) 2016.02.25
gprof flat view 이해하기  (0) 2010.01.24
gcov, gprof  (0) 2010.01.23
Posted by 구차니

 

gprof 의 텍스트 결과는 솔찍히 보기 편하다고는 할 수 없는데, 그래서 gui를 찾아보는 중

 

[링크 : https://github.com/jrfonseca/gprof2dot]

   [링크 : https://stackoverflow.com/questions/2439060]

 

역시 역사와 전통의(?) k접두인가..

[링크 : https://kprof.sourceforge.net/]

 

solaris나 motif 같네? 아무튼 cgprof 라는 툴은 call graph로 그려준다.

[링크 : http://mvertes.free.fr/]

'프로그램 사용 > gcov, gprof' 카테고리의 다른 글

gcov와 gcovr  (0) 2023.07.20
gcovr - gocv 를 html로  (0) 2023.07.10
gcc -p -pg  (0) 2016.02.25
gprof flat view 이해하기  (0) 2010.01.24
gcov, gprof  (0) 2010.01.23
Posted by 구차니