stress-ng writes all outputs to stderr
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Stress-ng |
Confirmed
|
High
|
Colin Ian King |
Bug Description
Hi,
stress-ng writes all outputs to stderr.
Test:
root@debian:~# stress-ng --cpu 1 --timeout 3 >info.txt 2>err.txt
Expected result: successful command execution should be recorded to the info.txt
Actual result: successful command execution recorded to the err.txt file
root@debian:~# stress-ng --cpu 1 --timeout 3 >info.txt 2>err.txt
root@debian:~# ls -al *.txt
-rw-r--r-- 1 root root 106 Apr 29 08:14 err.txt
-rw-r--r-- 1 root root 0 Apr 29 08:14 info.txt
root@debian:~# cat err.txt
stress-ng: info: [591] dispatching hogs: 1 cpu
stress-ng: info: [591] successful run completed in 3.00s
root@debian:~# stress-ng --cpu badcpu --timeout 3 >info.txt 2>err.txt
root@debian:~# ls -al *.txt
-rw-r--r-- 1 root root 44 Apr 29 08:15 err.txt
-rw-r--r-- 1 root root 0 Apr 29 08:15 info.txt
root@debian:~# cat err.txt
Value badcpu contains non-numeric: 'badcpu'
$ stress-ng --version
stress-ng, version 0.11.07 (gcc 9.3, x86_64 Linux 4.9.0-12-amd64)
root@debian:~# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_
ID=debian
HOME_URL="https:/
SUPPORT_URL="https:/
BUG_REPORT_URL="https:/
Thank you!
Regards, Serhii
description: | updated |
Try using the --stdout option.