0

I'm using SYSSTAT 12.2.1 built on a generic Linux 5.4 kernel (Yocto build) for STM32MP (Cortex-A7). I've used this utility in the past to do system profiling: Collect data for a time, dump to file, convert file, plot the output in excel. After adding this utility to the Yocto build and loading on the Discovery board, I set about collecting various statistics. The initial CPU Usage (-u) seemed to work just fine, data collected, converted, plotted. All Good. Next I collected data for 13 other characteristics (-q, -b, -B, -w, -v, etc). After converting the files for CSV output to be read by Excel, imagine my surprise when the output file for -q is filled with data for a -u output. The commands work OK interactively. The -o will create the file OK, but the output in the file is ALWAYS for the -u command. Example:

~ $ sar -V
sysstat version 12.2.1
(C) Sebastien Godard (sysstat <at> orange.fr)

\~ $ uname -a
Linux stm32mp157f 5.4.160 #1 SMP PREEMPT Thu Feb 10 19:16:17 UTC 2022 armv7l GNU/Linux

/initlo/data/perf $ sar -q 1 5
Linux 5.4.160 (stm32mp157f)     02/16/22        _armv7l_        (2 CPU)

07:52:44      runq-sz  plist-sz   ldavg-1   ldavg-5  ldavg-15   blocked
07:52:45            2       338      1.86      2.19      2.84         0
07:52:46            2       332      1.86      2.19      2.84         0
07:52:47            0       332      1.86      2.19      2.84         0
07:52:48            0       332      1.86      2.19      2.84         0
07:52:49            1       332      2.19      2.26      2.85         0
Average:            1       333      1.93      2.20      2.84         0

/initlo/data/perf # sar -q -o rq.log 1 5
Linux 5.4.160 (stm32mp157f)     02/16/22        _armv7l_        (2 CPU)

07:54:00      runq-sz  plist-sz   ldavg-1   ldavg-5  ldavg-15   blocked
07:54:01            3       335      1.78      2.10      2.75         0
07:54:02            4       340      1.78      2.10      2.75         0
07:54:03            8       340      1.78      2.10      2.75         0
07:54:04            3       340      2.20      2.18      2.78         0
07:54:05            5       342      2.20      2.18      2.78         3
Average:            5       339      1.95      2.13      2.76         1
/initlo/data/perf # ls -l rq.log
-rw-r--r--    1 root     root         25156 Feb 16 07:54 rq.log

/initlo/data/perf # sadf -dh rq.log > rq.csv
/initlo/data/perf # hexdump -C rq.csv
00000000  23 20 68 6f 73 74 6e 61  6d 65 3b 69 6e 74 65 72  |# hostname;inter|
00000010  76 61 6c 3b 74 69 6d 65  73 74 61 6d 70 3b 43 50  |val;timestamp;CP|
00000020  55 3b 25 75 73 65 72 3b  25 6e 69 63 65 3b 25 73  |U;%user;%nice;%s|
00000030  79 73 74 65 6d 3b 25 69  6f 77 61 69 74 3b 25 73  |ystem;%iowait;%s|
00000040  74 65 61 6c 3b 25 69 64  6c 65 5b 2e 2e 2e 5d 0a  |teal;%idle[...].|
00000050  73 74 6d 33 32 6d 70 31  35 37 66 3b 31 3b 32 30  |stm32mp157f;1;20|
00000060  32 32 2d 30 32 2d 31 36  20 31 32 3a 35 34 3a 30  |22-02-16 12:54:0|
00000070  31 20 55 54 43 3b 2d 31  3b 32 35 2e 38 39 3b 30  |1 UTC;-1;25.89;0|

This is supposed to be a "stable" release. I'm really kind of at my wits end here trying to figure this out. Different parameter orders. The documented version to run in the background produces similar results. So I'm thinking that something internally in the application is having an issue possibly with the kernel?
I've send this information to sysstat, but have not yet received a response, hoping someone here has encountered this issue before?? Thanks for your expertise and time. Regards, Stephen Beckwith

4

0 回答 0