Code Monkey home page Code Monkey logo

colinianking / stress-ng Goto Github PK

View Code? Open in Web Editor NEW
1.4K 33.0 260.0 33.31 MB

This is the stress-ng upstream project git repository. stress-ng will stress test a computer system in various selectable ways. It was designed to exercise various physical subsystems of a computer as well as the various operating system kernel interfaces.

Home Page: https://github.com/ColinIanKing/stress-ng

License: GNU General Public License v2.0

Makefile 0.31% C 94.42% Roff 4.76% Shell 0.36% Dockerfile 0.02% C++ 0.12%
stress-testing kernel memory disk cpu overheating linux freebsd posix openbsd

stress-ng's Introduction

stress-ng (stress next generation)

Packaging status

stress-ng will stress test a computer system in various selectable ways. It was designed to exercise various physical subsystems of a computer as well as the various operating system kernel interfaces. Stress-ng features:

  • 330+ stress tests
  • 80+ CPU specific stress tests that exercise floating point, integer, bit manipulation and control flow
  • 20+ virtual memory stress tests
  • 40+ file system stress tests
  • 30+ memory/CPU cache stress tests
  • portable: builds on Linux (Debian, Devuan, RHEL, Fedora, Centos, Slackware OpenSUSE, Ubuntu, etc..), Solaris, FreeBSD, NetBSD, OpenBSD, DragonFlyBSD, Minix, Android, MacOS X, Serenity OS, GNU/Hurd, Haiku, Windows Subsystem for Linux, Cygwin and SunOs/Dilos/Solaris. with gcc, musl-gcc, clang, icc, icx, tcc and pcc.
  • tested on alpha, armel, armhf, arm64, hppa, i386, loong64, m68k, mips32, mips64, power32, ppc64el, risc-v, sh4, s390x, sparc64, x86-64

stress-ng was originally intended to make a machine work hard and trip hardware issues such as thermal overruns as well as operating system bugs that only occur when a system is being thrashed hard. Use stress-ng with caution as some of the tests can make a system run hot on poorly designed hardware and also can cause excessive system thrashing which may be difficult to stop.

stress-ng can also measure test throughput rates; this can be useful to observe performance changes across different operating system releases or types of hardware. However, it has never been intended to be used as a precise benchmark test suite, so do NOT use it in this manner.

Running stress-ng with root privileges will adjust out of memory settings on Linux systems to make the stressors unkillable in low memory situations, so use this judiciously. With the appropriate privilege, stress-ng can allow the ionice class and ionice levels to be adjusted, again, this should be used with care.

Tarballs

Tarballs of each version of stress-ng can be downloaded using the URL:

https://github.com/ColinIanKing/stress-ng/tarball/version

where version is the relevant version number, for example:

https://github.com/ColinIanKing/stress-ng/tarball/V0.13.05

Running latest stress-ng snapshot in a container

docker run --rm ghcr.io/colinianking/stress-ng --help

or

docker run --rm colinianking/stress-ng --help

Debian packages for Ubuntu

Recent versions of stress-ng are available in the Ubuntu stress-ng ppa for various Ubuntu releases:

https://launchpad.net/~colin-king/+archive/ubuntu/stress-ng

sudo add-apt-repository ppa:colin-king/stress-ng
sudo apt update
sudo apt install stress-ng

Building stress-ng

To build, the following libraries will ensure a fully functional stress-ng build: (note libattr is not required for more recent disto releases).

Debian, Ubuntu:

  • gcc
  • g++
  • libacl1-dev
  • libaio-dev
  • libapparmor-dev
  • libatomic1
  • libattr1-dev
  • libbsd-dev
  • libcap-dev
  • libeigen3-dev
  • libgbm-dev
  • libgcrypt-dev
  • libglvnd-dev
  • libipsec-mb-dev
  • libjpeg-dev
  • libjudy-dev
  • libkeyutils-dev
  • libkmod-dev
  • libmd-dev
  • libmpfr-dev
  • libsctp-dev
  • libxxhash-dev
  • zlib1g-dev

RHEL, Fedora, Centos:

  • gcc
  • g++
  • eigen3-devel
  • Judy-devel
  • keyutils-libs-devel
  • kmod-devel
  • libacl-devel
  • libaio-devel
  • libatomic
  • libattr-devel
  • libbsd-devel
  • libcap-devel
  • libgbm-devel
  • libgcrypt-devel
  • libglvnd-core-devel
  • libglvnd-devel
  • libjpeg-devel
  • libmd-devel
  • mpfr-devel
  • libX11-devel
  • libXau-devel
  • libxcb-devel
  • lksctp-tools-devel
  • xorg-x11-proto-devel
  • xxhash-devel
  • zlib-devel

RHEL, Fedora, Centos (static builds):

  • gcc
  • g++
  • eigen3-devel
  • glibc-static
  • Judy-devel
  • keyutils-libs-devel
  • libacl-devel
  • libaio-devel
  • libatomic-static
  • libattr-devel
  • libbsd-devel
  • libcap-devel
  • libgbm-devel
  • libgcrypt-devel
  • libglvnd-core-devel
  • libglvnd-devel
  • libjpeg-devel
  • libmd-devel
  • libX11-devel
  • libXau-devel
  • libxcb-devel
  • lksctp-tools-devel
  • mpfr-devel
  • xorg-x11-proto-devel
  • xxhash-devel
  • zlib-devel

SUSE:

  • gcc
  • gcc-c++
  • eigen3-devel
  • keyutils-devel
  • libaio-devel
  • libapparmor-devel
  • libatomic1
  • libattr-devel
  • libbsd-devel
  • libcap-devel
  • libgbm-devel
  • libglvnd-devel
  • libjpeg-turbo
  • libkmod-devel
  • libmd-devel
  • libseccomp-devel
  • lksctp-tools-devel
  • mpfr-devel
  • xxhash-devel
  • zlib-devel

ClearLinux:

  • devpkg-acl
  • devpkg-eigen
  • devpkg-Judy
  • devpkg-kmod
  • devpkg-attr
  • devpkg-libbsd
  • devpkg-libgcrypt
  • devpkg-libjpeg-turbo
  • devpkg-libsctp
  • devpkg-mesa

Alpine Linux:

  • build-base
  • eigen-dev
  • jpeg-dev
  • judy-dev
  • keyutils-dev
  • kmod-dev
  • libacl-dev
  • libaio-dev
  • libatomic
  • libattr
  • libbsd-dev
  • libcap-dev
  • libgcrypt-dev
  • libmd-dev
  • libseccomp-dev
  • lksctp-tools-dev
  • mesa-dev
  • mpfr-dev
  • xxhash-dev
  • zlib-dev

Snaps:

  • stress-ng is not intended to be snap'd with snapcraft. Doing so is strictly against the wishes of the project maintainer and main developer.

NOTE: the build will try to detect build dependencies and will build an image with functionality disabled if the support libraries are not installed.

At build-time stress-ng will detect kernel features that are available on the target build system and enable stress tests appropriately. Stress-ng has been build-tested on Ubuntu, Debian, Debian GNU/Hurd, Slackware, RHEL, SLES, Centos, kFreeBSD, OpenBSD, NetBSD, FreeBSD, Debian kFreeBSD, DragonFly BSD, OS X, Minix, Solaris 11.3, OpenIndiana and Hiaku. Ports to other POSIX/UNIX like operating systems should be relatively easy.

NOTE: ALWAYS run make clean after fetching changes from the git repository to force the build to regenerate the build configuration file. Parallel builds using make -j are supported.

To build on BSD systems, one requires gcc and GNU make:

        CC=gcc gmake clean
	CC=gcc gmake

To build on OS X systems, just use:

	make clean
	make -j

To build on MINIX, gmake and clang are required:

	CC=clang gmake clean
	CC=clang gmake

To build on SunOS, one requires GCC and GNU make, build using:

	CC=gcc gmake clean
	CC=gcc gmake

To build on Dilos, one requires GCC and GNU make, build using:

	CC=gcc gmake clean
	CC=gcc gmake

To build on Haiku Alpha 4:

	make clean
	make

To build a static image (example, for Android), use:

	make clean
	STATIC=1 make

To build with full warnings enabled:

	make clean
	PEDANTIC=1 make

To build with the Tiny C compiler:

	make clean
	CC=tcc make

To build with the PCC portable C compiler use:

	make clean
	CC=pcc make

To build with the musl C library:

	make clean
	CC=musl-gcc

To build with the Intel C compiler icc use:

	make clean
	CC=icc make

To build with the Intel C compiler icx use:

	make clean
	CC=icx make

To perform a cross-compilation using gcc, use a static build, specify the toolchain (both CC and CXX). For example, a mips64 cross build:

	make clean
	STATIC=1 CC=mips64-linux-gnuabi64-gcc CXX=mips64-linux-gnuabi64-g++ make -j $(nproc)

To build with debug (-g) enabled use:

	make clean
	DEBUG=1 make

Contributing to stress-ng:

Send patches to [email protected] or merge requests at https://github.com/ColinIanKing/stress-ng

Quick Start Reference Guide

The Ubuntu stress-ng reference guide contains a brief overview and worked examples.

Examples

Run 4 CPU, 2 virtual memory, 1 disk and 8 fork stressors for 2 minutes and print measurements:

stress-ng --cpu 4 --vm 2 --hdd 1 --fork 8 --timeout 2m --metrics
stress-ng: info:  [573366] setting to a 120 second (2 mins, 0.00 secs) run per stressor
stress-ng: info:  [573366] dispatching hogs: 4 cpu, 2 vm, 1 hdd, 8 fork
stress-ng: info:  [573366] successful run completed in 123.78s (2 mins, 3.78 secs)
stress-ng: info:  [573366] stressor       bogo ops real time  usr time  sys time   bogo ops/s     bogo ops/s CPU used per
stress-ng: info:  [573366]                           (secs)    (secs)    (secs)   (real time) (usr+sys time) instance (%)
stress-ng: info:  [573366] cpu              515396    120.00    453.02      0.18      4294.89        1137.24        94.42
stress-ng: info:  [573366] vm              2261023    120.01    223.80      1.80     18840.15       10022.27        93.99
stress-ng: info:  [573366] hdd              367558    123.78     10.63     11.67      2969.49       16482.42        18.02
stress-ng: info:  [573366] fork             598058    120.00     68.24     65.88      4983.80        4459.13        13.97

Run matrix stressor on all online CPUs for 60 seconds and measure temperature:

stress-ng --matrix -1 --tz -t 60
stress-ng: info:  [1171459] setting to a 60 second run per stressor
stress-ng: info:  [1171459] dispatching hogs: 8 matrix
stress-ng: info:  [1171459] successful run completed in 60.01s (1 min, 0.01 secs)
stress-ng: info:  [1171459] matrix:
stress-ng: info:  [1171459]               acpitz0   75.00 C (348.15 K)
stress-ng: info:  [1171459]               acpitz1   75.00 C (348.15 K)
stress-ng: info:  [1171459]          pch_skylake   60.17 C (333.32 K)
stress-ng: info:  [1171459]         x86_pkg_temp   62.72 C (335.87 K)

Run a mix of 4 I/O stressors and check for changes in disk S.M.A.R.T. metadata:

sudo stress-ng --iomix 4 --smart -t 30s
stress-ng: info:  [1171471] setting to a 30 second run per stressor
stress-ng: info:  [1171471] dispatching hogs: 4 iomix
stress-ng: info:  [1171471] successful run completed in 30.37s
stress-ng: info:  [1171471] Device     ID S.M.A.R.T. Attribute                 Value      Change
stress-ng: info:  [1171471] sdc        01 Read Error Rate                   88015771       71001
stress-ng: info:  [1171471] sdc        07 Seek Error Rate                   59658169          92
stress-ng: info:  [1171471] sdc        c3 Hardware ECC Recovered            88015771       71001
stress-ng: info:  [1171471] sdc        f1 Total LBAs Written               481904395         877
stress-ng: info:  [1171471] sdc        f2 Total LBAs Read                 3768039248        5139
stress-ng: info:  [1171471] sdd        be Temperature Difference             3670049           1

Benchmark system calls using the VDSO:

stress-ng --vdso 1 -t 5 --metrics
stress-ng: info:  [1171584] setting to a 5 second run per stressor
stress-ng: info:  [1171584] dispatching hogs: 1 vdso
stress-ng: info:  [1171585] stress-ng-vdso: exercising vDSO functions: clock_gettime time gettimeofday getcpu
stress-ng: info:  [1171585] stress-ng-vdso: 9.88 nanoseconds per call (excluding 1.73 nanoseconds test overhead)
stress-ng: info:  [1171584] successful run completed in 5.10s
stress-ng: info:  [1171584] stressor       bogo ops real time  usr time  sys time   bogo ops/s     bogo ops/s CPU used per
stress-ng: info:  [1171584]                           (secs)    (secs)    (secs)   (real time) (usr+sys time) instance (%)
stress-ng: info:  [1171584] vdso          430633496      5.10      5.10      0.00  84375055.96    84437940.39        99.93
stress-ng: info:  [1171584] vdso               9.88 nanoseconds per call (average per stressor)

Generate and measure branch misses using perf metrics:

sudo stress-ng --branch 1 --perf -t 10 --stdout | grep Branch
stress-ng: info:  [1171714]                604,703,327 Branch Instructions            53.30 M/sec
stress-ng: info:  [1171714]                598,760,234 Branch Misses                  52.77 M/sec (99.02%)

Bugs and regressions found with stress-ng

stress-ng has found Kernel and QEMU bugs/regressions and appropriate fixes have been landed to address these issues:

2015:

2016:

2017:

2018:

2019:

2020:

2021:

2022:

2023:

2024:

Kernel improvements that used stress-ng

2020:

2021:

2022:

2023:

Presentations

Citations

2015:

2016:

2017:

2018:

2019:

2020:

2021:

2022:

2023:

2024:

I am keen to add to the stress-ng project page any citations to research or projects that use stress-ng. I also appreciate information concerning kernel bugs or performance regressions found with stress-ng.

Contributors

Many thanks to the following contributors to stress-ng (in alphabetical order):

Abdul Haleem, Aboorva Devarajan, Adriand Martin, Adrian Ratiu, Aleksandar N. Kostadinov, Alexander Kanavin, Alexandru Ardelean, Alfonso Sánchez-Beato, Allen H, Amit Singh Tomar, Andrey Gelman, André Wild, Anisse Astier, Anton Eliasson, Arjan van de Ven, Baruch Siach, Bryan W. Lewis, Camille Constans, Carlos Santos, Christian Ehrhardt, Christopher Brown, Chunyu Hu, Danilo Krummrich, Davidson Francis, David Turner, Dominik B Czarnota, Dorinda Bassey, Eder Zulian, Eric Lin, Erik Stahlman, Erwan Velu, Fabien Malfoy, Fabrice Fontaine, Fernand Sieber, Florian Weimer, Francis Laniel, Guilherme Janczak, Hui Wang, Hsieh-Tseng Shen, Iyán Méndez Veiga, James Hunt, Jan Luebbe, Jianshen Liu, John Kacur, Jules Maselbas, Julien Olivain, Kenny Gong, Khalid Elmously, Khem Raj, Luca Pizzamiglio, Luis Chamberlain, Luis Henriques, Matthew Tippett, Mauricio Faria de Oliveira, Maxime Chevallier, Max Kellermann, Maya Rashish, Mayuresh Chitale, Meysam Azad, Mike Koreneff, Munehisa Kamata, Nick Hanley, Nikolas Kyx, Paul Menzel, Piyush Goyal, Ralf Ramsauer, Rosen Penev, Rulin Huang, Sascha Hauer, Siddhesh Poyarekar, Shoily Rahman, Stian Onarheim, Thadeu Lima de Souza Cascardo, Thia Wyrod, Thinh Tran, Tim Gardner, Tim Gates, Tim Orling, Tommi Rantala, Witold Baryluk, Yiwei Lin, Yong-Xuan Wang, Zhiyi Sun.

stress-ng's People

Contributors

akostadinov avatar baruchsiach avatar chunyu-hu avatar colinianking avatar cpaelzer avatar derekye avatar eiffel-fl avatar estahlman-intel avatar ffontaine avatar fweimer-rh avatar jmaselbas avatar jodh-intel avatar jolivain avatar kamatam9 avatar kanavin avatar kraj avatar meysam81 avatar mfoliveira avatar mingkwind avatar neheb avatar njhanley avatar paulmenzel avatar piyushgoyal16 avatar rantala avatar rralf avatar saschahauer avatar thinhtrtran avatar woodrow-shen avatar xes0r avatar zhiyisun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stress-ng's Issues

perf counters are not available on this device

Hi,
I'm running Ubuntu 20.04 on a baremetal physical machine with an Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz CPU (disabled Hyperthreading, TurboBoost, C states, and SpeedStep in the BIOS for a specific reason). Here is the output of lscpu:

m@node2:~/stress-ng/stress-ng$ lscpu
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   36 bits physical, 48 bits virtual
CPU(s):                          4
On-line CPU(s) list:             0-3
Thread(s) per core:              1
Core(s) per socket:              4
Socket(s):                       1
NUMA node(s):                    1
Vendor ID:                       GenuineIntel
CPU family:                      6
Model:                           58
Model name:                      Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
Stepping:                        9
CPU MHz:                         2903.844
CPU max MHz:                     3400.0000
CPU min MHz:                     1600.0000
BogoMIPS:                        6784.58
Virtualization:                  VT-x
L1d cache:                       128 KiB
L1i cache:                       128 KiB
L2 cache:                        1 MiB
L3 cache:                        8 MiB
NUMA node0 CPU(s):               0-3
Vulnerability Itlb multihit:     KVM: Mitigation: Split huge pages
Vulnerability L1tf:              Mitigation; PTE Inversion; VMX conditional cache flushes, SMT disabl
                                 ed
Vulnerability Mds:               Mitigation; Clear CPU buffers; SMT disabled
Vulnerability Meltdown:          Mitigation; PTI
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Full generic retpoline, IBPB conditional, IBRS_FW, RSB f
                                 illing
Vulnerability Srbds:             Vulnerable: No microcode
Vulnerability Tsx async abort:   Not affected
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat ps
                                 e36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtsc
                                 p lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nons
                                 top_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx
                                  est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_d
                                 eadline_timer aes xsave avx f16c rdrand lahf_lm cpuid_fault epb pti 
                                 ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase 
                                 smep erms xsaveopt dtherm arat pln pts md_clear flush_l1d

I'm getting "perf counters are not available on this device" error when I'm running the following command:

m@node2:~/stress-ng$ sudo stress-ng --matrix 1 -t 5s --perf
stress-ng: info:  [180638] dispatching hogs: 1 matrix
stress-ng: info:  [180638] successful run completed in 5.00s
stress-ng: info:  [180638] perf counters are not available on this device

Here is an example output when I run perf stat ls:

root@node2:/home/m/stress-ng# sudo perf stat ls
perf.data  perf.data.old  stress-ng

 Performance counter stats for 'ls':

              0.77 msec task-clock                #    0.787 CPUs utilized          
                 0      context-switches          #    0.000 K/sec                  
                 0      cpu-migrations            #    0.000 K/sec                  
               113      page-faults               #    0.147 M/sec                  
           2599230      cycles                    #    3.379 GHz                    
           1706654      stalled-cycles-frontend   #   65.66% frontend cycles idle   
           1789684      instructions              #    0.69  insn per cycle         
                                                  #    0.95  stalled cycles per insn
            360401      branches                  #  468.489 M/sec                  
             16805      branch-misses             #    4.66% of all branches        

       0.000977981 seconds time elapsed

       0.001001000 seconds user
       0.000000000 seconds sys

Why I'm getting such an error?
Thanks

Failing to compile on centos 6

I'm not sure what information to provide to help you best. The build output is as below:

[root@ip-10-0-1-107 stress-ng-build]# make clean
[root@ip-10-0-1-107 stress-ng-build]# make
make -f Makefile.config
autoconfig: using -lcrypt
autoconfig: using pthread spinlock
autoconfig: using -lrt
autoconfig: using -ldl
autoconfig: using -lpthread
autoconfig: using wchar.h
autoconfig: using grp.h
autoconfig: using sys/xattr.h
autoconfig: using sys/syscall.h
autoconfig: using linux/dm-ioctl.h
autoconfig: using linux/fiemap.h
autoconfig: using linux/perf_event.h
autoconfig: using linux/random.h
autoconfig: using linux/vt.h
autoconfig: using linux/videodev2.h
autoconfig: using scsi/scsi.h
autoconfig: using scsi/sg.h
autoconfig: using float decimal32 support
autoconfig: using float decimal64 support
autoconfig: using float decimal128 support
autoconfig: using float80 support
autoconfig: using float128 support
autoconfig: using nop assembler instruction
autoconfig: using 64 byte alignment attribute
autoconfig: using 128 byte alignment attribute
autoconfig: using 64K byte alignment attribute
autoconfig: using accept4
autoconfig: using sched affinity CPU masks
autoconfig: using madvise
autoconfig: using nanosleep
autoconfig: using POSIX semaphores
autoconfig: using POSIX message queues
autoconfig: using SYSV message queues
autoconfig: using SYSV shared memory
autoconfig: using faccessat
autoconfig: using inotify
autoconfig: using swapcontext
autoconfig: using chroot
autoconfig: using eventfd
autoconfig: using cabsl
autoconfig: using lgammal
autoconfig: using ccosl
autoconfig: using csinl
autoconfig: using cpow
autoconfig: using powl
autoconfig: using rintl
autoconfig: using logl
autoconfig: using expl
autoconfig: using cosl
autoconfig: using sinl
autoconfig: using coshl
autoconfig: using sinhl
autoconfig: using sqrtl
autoconfig: using dup3
autoconfig: using epoll_create1
autoconfig: using getpagesize
autoconfig: using setpgrp
autoconfig: using getpgid
autoconfig: using setpgid
autoconfig: using mlock
autoconfig: using personality
autoconfig: using ppoll
autoconfig: using pselect
autoconfig: using setreuid
autoconfig: using setregid
autoconfig: using setresuid
autoconfig: using setresgid
autoconfig: using sigaltstack
autoconfig: using sigqueue
autoconfig: using sigwaitinfo
autoconfig: using modify_ldt
autoconfig: using mprotect
autoconfig: using msync
autoconfig: using mincore
autoconfig: using posix_fadvise
autoconfig: using posix_openpt
autoconfig: using posix_memalign
autoconfig: using pwritev
autoconfig: using uname
autoconfig: using ustat
autoconfig: using utimensat
autoconfig: using waitid
autoconfig: using cpuid
autoconfig: using getmntent
autoconfig: using futimes
autoconfig: using futimens
autoconfig: using fsync
autoconfig: using fdatasync
autoconfig: using lockf
autoconfig: using clone
make[1]: Entering directory `/tmp/stress-ng-build'
make[1]: Leaving directory `/tmp/stress-ng-build'
make stress-ng
make[1]: Entering directory `/tmp/stress-ng-build'
CFLAGS: -Wall -Wextra -DVERSION='0.09.30' -O2 -std=gnu99 -DHAVE_LIB_CRYPT -DHAVE_LIB_PTHREAD_SPINLOCK -DHAVE_LIB_RT -DHAVE_LIB_DL -DHAVE_LIB_PTHREAD -DHAVE_WCHAR -DHAVE_GRP_H -DHAVE_SYS_XATTR_H -DHAVE_SYSCALL_H -DHAVE_LINUX_DM_IOCTL_H -DHAVE_LINUX_FIEMAP_H -DHAVE_LINUX_PERF_EVENT_H -DHAVE_LINUX_RANDOM_H -DHAVE_LINUX_VT_H -DHAVE_LINUX_VIDEODEV2_H -DHAVE_SCSI_SCSI_H -DHAVE_SCSI_SG_H -DHAVE_FLOAT_DECIMAL32 -DHAVE_FLOAT_DECIMAL64 -DHAVE_FLOAT_DECIMAL128 -DHAVE_FLOAT80 -DHAVE_FLOAT128 -DHAVE_ASM_NOP -DHAVE_ALIGNED_64 -DHAVE_ALIGNED_128 -DHAVE_ALIGNED_64K -DHAVE_ACCEPT4 -DHAVE_AFFINITY -DHAVE_MADVISE -DHAVE_NANOSLEEP -DHAVE_SEM_POSIX -DHAVE_MQ_POSIX -DHAVE_MQ_SYSV -DHAVE_SHM_SYSV -DHAVE_FACCESSAT -DHAVE_INOTIFY -DHAVE_SWAPCONTEXT -DHAVE_CHROOT -DHAVE_EVENTFD -DHAVE_CABSL -DHAVE_LGAMMAL -DHAVE_CCOSL -DHAVE_CSINL -DHAVE_CPOW -DHAVE_POWL -DHAVE_RINTL -DHAVE_LOGL -DHAVE_EXPL -DHAVE_COSL -DHAVE_SINL -DHAVE_COSHL -DHAVE_SINHL -DHAVE_SQRTL -DHAVE_DUP3 -DHAVE_EPOLL_CREATE1 -DHAVE_GETPAGESIZE -DHAVE_SETPGRP -DHAVE_GETPGID -DHAVE_SETPGID -DHAVE_MLOCK -DHAVE_PERSONALITY -DHAVE_PPOLL -DHAVE_PSELECT -DHAVE_SETREUID -DHAVE_SETREGID -DHAVE_SETRESUID -DHAVE_SETRESGID -DHAVE_SIGALTSTACK -DHAVE_SIGQUEUE -DHAVE_SIGWAITINFO -DHAVE_MODIFY_LDT -DHAVE_MPROTECT -DHAVE_MSYNC -DHAVE_MINCORE -DHAVE_POSIX_FADVISE -DHAVE_POSIX_OPENPT -DHAVE_POSIX_MEMALIGN -DHAVE_PWRITEV -DHAVE_UNAME -DHAVE_USTAT -DHAVE_UTIMENSAT -DHAVE_WAITID -DHAVE_CPUID -DHAVE_GETMNTENT -DHAVE_FUTIMES -DHAVE_FUTIMENS -DHAVE_FSYNC -DHAVE_FDATASYNC -DHAVE_LOCKF -DHAVE_CLONE
CC stress-access.c
CC stress-affinity.c
CC stress-af-alg.c
CC stress-aio.c
CC stress-aio-linux.c
CC stress-apparmor.c
CC stress-atomic.c
CC stress-bigheap.c
CC stress-bind-mount.c
CC stress-branch.c
CC stress-brk.c
CC stress-bsearch.c
CC stress-cache.c
CC stress-cap.c
CC stress-chdir.c
CC stress-chmod.c
CC stress-chown.c
CC stress-chroot.c
CC stress-clock.c
CC stress-clone.c
CC stress-context.c
CC stress-copy-file.c
CC stress-cpu.c
CC stress-cpu-online.c
CC stress-crypt.c
CC stress-cyclic.c
CC stress-daemon.c
CC stress-dccp.c
CC stress-dentry.c
CC stress-dev.c
CC stress-dir.c
CC stress-dirdeep.c
CC stress-dnotify.c
CC stress-dup.c
CC stress-dynlib.c
CC stress-efivar.c
CC stress-enosys.c
stress-enosys.c:44: warning: expected [error|warning|ignored] after ‘#pragma GCC diagnostic’
stress-enosys.c:61: warning: expected [error|warning|ignored] after ‘#pragma GCC diagnostic’
CC stress-epoll.c
CC stress-eventfd.c
CC stress-exec.c
CC stress-fallocate.c
CC stress-fanotify.c
CC stress-fault.c
CC stress-fcntl.c
CC stress-file-ioctl.c
CC stress-fiemap.c
CC stress-fifo.c
CC stress-filename.c
CC stress-flock.c
CC stress-fork.c
CC stress-fp-error.c
CC stress-fstat.c
CC stress-full.c
CC stress-funccall.c
CC stress-futex.c
CC stress-get.c
CC stress-getrandom.c
CC stress-getdent.c
CC stress-handle.c
CC stress-hdd.c
CC stress-heapsort.c
CC stress-hrtimers.c
CC stress-hsearch.c
CC stress-icache.c
CC stress-icmp-flood.c
CC stress-inode-flags.c
CC stress-inotify.c
CC stress-iomix.c
CC stress-ioport.c
CC stress-ioprio.c
CC stress-iosync.c
CC stress-itimer.c
CC stress-kcmp.c
CC stress-key.c
CC stress-kill.c
CC stress-klog.c
CC stress-lease.c
CC stress-lsearch.c
CC stress-link.c
CC stress-lockbus.c
CC stress-locka.c
CC stress-lockf.c
CC stress-lockofd.c
CC stress-longjmp.c
CC stress-madvise.c
CC stress-malloc.c
CC stress-matrix.c
CC stress-mcontend.c
CC stress-membarrier.c
CC stress-memcpy.c
CC stress-memfd.c
CC stress-memrate.c
CC stress-memthrash.c
CC stress-mergesort.c
CC stress-mincore.c
CC stress-mknod.c
CC stress-mlock.c
CC stress-mmap.c
CC stress-mmapaddr.c
CC stress-mmapfixed.c
CC stress-mmapfork.c
CC stress-mmapmany.c
CC stress-mremap.c
CC stress-msg.c
CC stress-msync.c
CC stress-mq.c
CC stress-netdev.c
CC stress-netlink-proc.c
CC stress-nice.c
CC stress-nop.c
CC stress-null.c
CC stress-numa.c
CC stress-oom-pipe.c
CC stress-opcode.c
CC stress-open.c
CC stress-personality.c
CC stress-physpage.c
CC stress-pipe.c
CC stress-poll.c
CC stress-prctl.c
CC stress-procfs.c
CC stress-pthread.c
CC stress-ptrace.c
CC stress-pty.c
CC stress-quota.c
CC stress-qsort.c
CC stress-radixsort.c
CC stress-rawdev.c
CC stress-rdrand.c
CC stress-readahead.c
CC stress-remap-file-pages.c
CC stress-rename.c
CC stress-resources.c
CC stress-revio.c
CC stress-rlimit.c
CC stress-rmap.c
CC stress-rtc.c
CC stress-sctp.c
CC stress-schedpolicy.c
CC stress-seal.c
CC stress-seccomp.c
CC stress-seek.c
CC stress-sem.c
CC stress-sem-sysv.c
CC stress-sendfile.c
CC stress-set.c
CC stress-shm.c
CC stress-shm-sysv.c
CC stress-sigfd.c
CC stress-sigfpe.c
CC stress-sigio.c
CC stress-sigpending.c
CC stress-sigpipe.c
CC stress-sigq.c
CC stress-sigrt.c
CC stress-sigsegv.c
CC stress-sigsuspend.c
CC stress-sleep.c
CC stress-socket.c
CC stress-socket-diag.c
CC stress-socket-fd.c
CC stress-socketpair.c
CC stress-softlockup.c
CC stress-spawn.c
CC stress-splice.c
CC stress-stack.c
CC stress-stackmmap.c
CC stress-str.c
CC stress-stream.c
CC stress-swap.c
CC stress-switch.c
CC stress-sync-file.c
CC stress-sysbadaddr.c
CC stress-sysinfo.c
CC stress-sysfs.c
CC stress-tee.c
CC stress-timer.c
CC stress-timerfd.c
CC stress-tlb-shootdown.c
CC stress-tmpfs.c
CC stress-tree.c
CC stress-tsc.c
CC stress-tsearch.c
CC stress-udp.c
CC stress-udp-flood.c
CC stress-unshare.c
CC stress-urandom.c
CC stress-userfaultfd.c
CC stress-utime.c
CC stress-vecmath.c
CC stress-vforkmany.c
CC stress-vm.c
CC stress-vm-addr.c
CC stress-vm-rw.c
CC stress-vm-segv.c
CC stress-vm-splice.c
CC stress-wait.c
CC stress-wcstr.c
CC stress-xattr.c
CC stress-yield.c
CC stress-zero.c
CC stress-zlib.c
CC stress-zombie.c
CC affinity.c
CC cache.c
CC cpu.c
CC helper.c
helper.c: In function ‘deconstify’:
helper.c:1325: error: #pragma GCC diagnostic not allowed inside functions
helper.c:1326: error: #pragma GCC diagnostic not allowed inside functions
helper.c:1326: error: #pragma GCC diagnostic not allowed inside functions
helper.c:1326: error: #pragma GCC diagnostic not allowed inside functions
helper.c:1328: error: #pragma GCC diagnostic not allowed inside functions
make[1]: *** [helper.o] Error 1
make[1]: Leaving directory `/tmp/stress-ng-build'
make: *** [all_config] Error 2
[root@ip-10-0-1-107 stress-ng-build]# cat /etc/redhat-release
CentOS release 6.9 (Final)
[root@ip-10-0-1-107 stress-ng-build]# uname -a
Linux ip-10-0-1-107...... 2.6.32-696.28.1.el6.x86_64 #1 SMP Wed May 9 23:09:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Let me know if there is anything else I can help you with.

glibc-2.28 compatability

It's currently not possible to build stress-ng-0.09.36 with glibc-2.28 and kernel 4.14.59:

  1. error: redefinition of 'struct statx_timestamp'
CC stress-atomic.c
CC stress-aio-linux.c
CC stress-bigheap.c
In file included from stress-aio-linux.c:25:
stress-ng.h:2935:8: error: redefinition of 'struct statx_timestamp'
 struct statx_timestamp {
        ^~~~~~~~~~~~~~~
In file included from /home/ubuntu/projects/LibreELEC.tv/build.LibreELEC-RPi2.arm-9.0-devel/toolchain/armv7ve-libreelec-linux-gnueabi/sysroot/usr/include/sys/stat.h:446,
                 from stress-ng.h:98,
                 from stress-aio-linux.c:25:
/home/ubuntu/projects/LibreELEC.tv/build.LibreELEC-RPi2.arm-9.0-devel/toolchain/armv7ve-libreelec-linux-gnueabi/sysroot/usr/include/bits/statx.h:25:8: note: originally defined here
 struct statx_timestamp
        ^~~~~~~~~~~~~~~
In file included from stress-bigheap.c:25:
stress-ng.h:2935:8: error: redefinition of 'struct statx_timestamp'
 struct statx_timestamp {
        ^~~~~~~~~~~~~~~
In file included from /home/ubuntu/projects/LibreELEC.tv/build.LibreELEC-RPi2.arm-9.0-devel/toolchain/armv7ve-libreelec-linux-gnueabi/sysroot/usr/include/sys/stat.h:446,
                 from stress-ng.h:98,
                 from stress-bigheap.c:25:
/home/ubuntu/projects/LibreELEC.tv/build.LibreELEC-RPi2.arm-9.0-devel/toolchain/armv7ve-libreelec-linux-gnueabi/sysroot/usr/include/bits/statx.h:25:8: note: originally defined here
 struct statx_timestamp
        ^~~~~~~~~~~~~~~
make[1]: *** [Makefile:335: stress-aio-linux.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:335: stress-bigheap.o] Error 1
  1. ustat.h is deprecated, and no longer available
CC stress-ng.c
CC stress-personality.c
CC perf.c
stress-sysbadaddr.c:32:10: fatal error: ustat.h: No such file or directory
 #include <ustat.h>
          ^~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:335: stress-sysbadaddr.o] Error 1
make[1]: Leaving directory '/home/ubuntu/projects/LibreELEC.tv/build.LibreELEC-RPi2.arm-9.0-devel/stress-ng-0.09.36'
make: *** [Makefile:323: all_config] Error 2

Please let me know if there's anything I can test (eg. pastebin patches) that might help towards a solution.

Not able to load constant cpu load on ARM architectures..

Basically I am trying to use stress-ng on Nitrogen 6x and rasberry pi both are ARM architecture.
I am trying to load cpu with 40 % But its not constant it varies from 0 to 100 percent always

Commands I am using are
stress-ng --cpu 1 --cpu-load 40 --timeout 1m
stress-ng -c 4 -l 40

Running on CentOS 7.5

Hi all.

I'm trying to run this on a CentOS 7.5 system.

Downloaded and compiled version 0.09.39 but the command is failing with the following log:
stress-ng --cpu 4 --io 2 --vm 1 --vm-bytes 1G --timeout 60s --metrics-brief

stress-ng: info:  [21071] disabled 'cpu-online' as it may hang or reboot the machine (enable it with the --pathological option)
stress-ng: info:  [21071] dispatching hogs: 12 aio, 12 aiol, 12 hdd, 12 rawdev, 12 readahead, 12 revio, 12 seek, 12 sync-file, 12 af-alg, 12 atomic, 12 branch, 12 bsearch, 12 context, 12 cpu, 12 crypt, 12 fp-error, 12 funccall, 12 getrandom, 12 heapsort, 12 hsearch, 12 ioport, 12 longjmp, 12 lsearch, 12 matrix, 12 mergesort, 12 nop, 12 numa, 12 opcode, 12 qsort, 12 radixsort, 12 rdrand, 12 str, 12 stream, 12 tree, 12 tsc, 12 tsearch, 12 vecmath, 12 wcs, 12 zlib
stress-ng: info:  [21073] stress-ng-aiol: this stressor is not implemented on this system: x86_64 Linux 3.10.0-862.6.3.el7.x86_64 (gcc 4.8)
stress-ng: info:  [21114] stress-ng-wcs: this stressor is not implemented on this system: x86_64 Linux 3.10.0-862.6.3.el7.x86_64 (gcc 4.8)
stress-ng: info:  [21118] stress-ng-aiol: this stressor is not implemented on this system: x86_64 Linux 3.10.0-862.6.3.el7.x86_64 (gcc 4.8)
stress-ng: info:  [21093] stress-ng-heapsort: this stressor is not implemented on this system: x86_64 Linux 3.10.0-862.6.3.el7.x86_64 (gcc 4.8)
stress-ng: info:  [21101] stress-ng-mergesort: this stressor is not implemented on this system: x86_64 Linux 3.10.0-862.6.3.el7.x86_64 (gcc 4.8)
stress-ng: info:  [21138] stress-ng-heapsort: this stressor is not implemented on this system: x86_64 Linux 3.10.0-862.6.3.el7.x86_64 (gcc 4.8)
stress-ng: info:  [21106] stress-ng-radixsort: this stressor is not implemented on this system: x86_64 Linux 3.10.0-862.6.3.el7.x86_64 (gcc 4.8)

Missing flags for decimal32,64,128

I found the stress-ng binary some cpu-methods are missing like (decimal32, decimal64, decimal128, int128decimal32, int128decimal64, int128decimal128)

I checked the decimal support flags are in stress-cpu.c file
#if defined(HAVE_FLOAT_DECIMAL32) && !defined(clang)

I checked the stress-ng config file but i did not found the "HAVE_FLOAT_DECIMAL32 , HAVE_FLOAT_DECIMAL64, HAVE_FLOAT_DECIMAL128" these flags not available.

If those flags are not available for MUSL toolchain so is there any workaround.

Kindly help me.

Thanks
Viswa

Failing to compile on rhel 5.3

stress-ng-0.09.60

cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.3 (Tikanga)

gcc --version
gcc (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3)

stress-fork.c:173: error: #pragma GCC diagnostic not allowed inside functions
stress-fork.c:174: error: #pragma GCC diagnostic not allowed inside functions
stress-fork.c:174: error: #pragma GCC diagnostic not allowed inside functions
stress-fork.c:174: error: #pragma GCC diagnostic not allowed inside functions
stress-fork.c:174: error: #pragma GCC diagnostic not allowed inside functions
stress-fork.c:176: error: #pragma GCC diagnostic not allowed inside functions
make[1]: *** [stress-fork.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/local/home/atlis/workplace/ws_SDETool/build/Stress-ng/Stress-ng-0.x/RHEL5_64/DEV.STD.PTHREAD/build/private/src'
make: *** [all] Error 2

LMK if you need any more input. Thanks

How can I get the PID of the children processes?

I need to execute stress-ng and get the pid of the children processes (that do the actual work), not the main process.

I'm trying to do this:

stress-ng -c 1 -l 90 --timeout 10s &
pid=$(pidof -o $! stress-ng)

But does not work, I guess it's because it takes some time to create the children process.
If I wait between the commands, it works:

stress-ng -c 1 -l 90 --timeout 10s &
#wait a second...
pid=$(pidof -o $! stress-ng)

There is a better way to do it?

stress-ng-memrate memrate-bytes below 1M metrics 0 MB/s

Hello,

I was trying to use memrate starting from 8k chunk size but unfortunately the metrics output show 0 MB/s below 1M chunk size.

Version:
stress-ng, version 0.10.00 (gcc 9.1, x86_64 Linux 5.1.16-300.local.fc30.x86_64)

Example:
stress-ng --memrate 2 -t 10 --memrate-bytes 8k -v

Log:

# stress-ng --memrate 2 -t 10 --memrate-bytes 8k -v
stress-ng: debug: [19455] 16 processors online, 16 processors configured
stress-ng: info:  [19455] dispatching hogs: 2 memrate
stress-ng: debug: [19455] cache allocate: default cache size: 8192K
stress-ng: debug: [19455] starting stressors
stress-ng: debug: [19455] 2 stressors spawned
stress-ng: debug: [19456] stress-ng-memrate: started [19456] (instance 0)
stress-ng: debug: [19457] stress-ng-memrate: started [19457] (instance 1)
stress-ng: info:  [19456] stress-ng-memrate: write64: 0.00 MB/sec
stress-ng: info:  [19456] stress-ng-memrate:  read64: 0.00 MB/sec
stress-ng: info:  [19456] stress-ng-memrate: write32: 0.00 MB/sec
stress-ng: info:  [19456] stress-ng-memrate:  read32: 0.00 MB/sec
stress-ng: info:  [19456] stress-ng-memrate: write16: 0.00 MB/sec
stress-ng: info:  [19456] stress-ng-memrate:  read16: 0.00 MB/sec
stress-ng: info:  [19456] stress-ng-memrate:  write8: 0.00 MB/sec
stress-ng: info:  [19456] stress-ng-memrate:   read8: 0.00 MB/sec
stress-ng: info:  [19457] stress-ng-memrate: write64: 0.00 MB/sec
stress-ng: info:  [19457] stress-ng-memrate:  read64: 0.00 MB/sec
stress-ng: info:  [19457] stress-ng-memrate: write32: 0.00 MB/sec
stress-ng: info:  [19457] stress-ng-memrate:  read32: 0.00 MB/sec
stress-ng: info:  [19457] stress-ng-memrate: write16: 0.00 MB/sec
stress-ng: info:  [19457] stress-ng-memrate:  read16: 0.00 MB/sec
stress-ng: info:  [19457] stress-ng-memrate:  write8: 0.00 MB/sec
stress-ng: info:  [19457] stress-ng-memrate:   read8: 0.00 MB/sec
stress-ng: debug: [19456] stress-ng-memrate: exited [19456] (instance 0)
stress-ng: debug: [19457] stress-ng-memrate: exited [19457] (instance 1)
stress-ng: debug: [19455] process [19456] terminated
stress-ng: debug: [19455] process [19457] terminated
stress-ng: info:  [19455] successful run completed in 10.00s

Compile issue: stress-dccp.c:193:23: error: dereferencing pointer to incomplete type ‘struct sockaddr_un’

I'm trying to cross compile with command:
CC=aarch64-xyz-linux-gcc CFLAGS=--sysroot=/tmp/sdk/sysroots/aarch64-xyz-linux STATIC=1 make

I get following compile error:
stress-dccp.c: In function ‘stress_dccp_client’:
stress-dccp.c:193:23: error: dereferencing pointer to incomplete type ‘struct sockaddr_un’
(void)unlink(addr_un->sun_path);

I use workaround:
diff --git a/stress-ng.h b/stress-ng.h
index 4f2497cc..001f2158 100644
--- a/stress-ng.h
+++ b/stress-ng.h
@@ -68,6 +68,7 @@
#include <string.h>
#include <time.h>
#include <unistd.h>
+#include <sys/un.h>

/*

  • Networking includes that are part of

ecb(aes) of af-alg failed on a MTK armhf platform

I ran the af-alg test on a MTK armhf platform (MT8516) and the ecb(aes) cipher test was failed.
It showed sendmsg using ecb(aes) failed: errno=22 (Invalid argument). The following is the output of af-alg test.

$ ./stress-ng --af-alg 1 -t 1 -v --af-alg-dump
stress-ng: debug: [4242] 1 processor online, 4 processors configured
stress-ng: info:  [4242] dispatching hogs: 1 af-alg
stress-ng: info:  [4242] cache allocate: using defaults, can't determine cache details from sysfs
stress-ng: debug: [4242] cache allocate: default cache size: 2048K
stress-ng: debug: [4242] starting stressors
stress-ng: debug: [4242] 1 stressor spawned
stress-ng: debug: [4246] stress-ng-af-alg: started [4246] (instance 0)
stress-ng: info:  [4246] stress-ng-af-alg: dumping cryptographic algorithms found in /proc/crypto to stdout
{ .crypto_type = CRYPTO_AKCIPHER, .type = "akcipher", .name = "rsa" },
{ .crypto_type = CRYPTO_CIPHER, .type = "cipher", .name = "cipher_null",	.block_size = 1 },
{ .crypto_type = CRYPTO_SHASH, .type = "shash", .name = "digest_null",	.block_size = 1 },
{ .crypto_type = CRYPTO_SHASH, .type = "shash", .name = "md5",	.block_size = 64,	.digest_size = 16 },
{ .crypto_type = CRYPTO_SHASH, .type = "shash", .name = "sha1",	.block_size = 64,	.digest_size = 20 },
{ .crypto_type = CRYPTO_SHASH, .type = "shash", .name = "sha256",	.block_size = 64,	.digest_size = 32 },
{ .crypto_type = CRYPTO_SHASH, .type = "shash", .name = "sha224",	.block_size = 64,	.digest_size = 28 },
{ .crypto_type = CRYPTO_SHASH, .type = "shash", .name = "sha512",	.block_size = 128,	.digest_size = 64 },
{ .crypto_type = CRYPTO_SHASH, .type = "shash", .name = "sha384",	.block_size = 128,	.digest_size = 48 },
{ .crypto_type = CRYPTO_CIPHER, .type = "cipher", .name = "des",	.block_size = 8,	.max_key_size = 8 },
{ .crypto_type = CRYPTO_CIPHER, .type = "cipher", .name = "des3_ede",	.block_size = 8,	.max_key_size = 24 },
{ .crypto_type = CRYPTO_CIPHER, .type = "cipher", .name = "twofish",	.block_size = 16,	.max_key_size = 32 },
{ .crypto_type = CRYPTO_CIPHER, .type = "cipher", .name = "aes",	.block_size = 16,	.max_key_size = 32 },
{ .crypto_type = CRYPTO_CIPHER, .type = "cipher", .name = "arc4",	.block_size = 1,	.max_key_size = 256 },
{ .crypto_type = CRYPTO_SHASH, .type = "shash", .name = "crc32c",	.block_size = 1,	.digest_size = 4 },
{ .crypto_type = CRYPTO_SHASH, .type = "shash", .name = "crct10dif",	.block_size = 1,	.digest_size = 2 },
{ .crypto_type = CRYPTO_RNG, .type = "rng", .name = "stdrng" },
{ .crypto_type = CRYPTO_RNG, .type = "rng", .name = "jitterentropy_rng" },
{ .crypto_type = CRYPTO_SHASH, .type = "shash", .name = "ghash",	.block_size = 16,	.digest_size = 16 },
{ .crypto_type = CRYPTO_SHASH, .type = "shash", .name = "hmac(sha256)",	.block_size = 64,	.digest_size = 32 },
{ .crypto_type = CRYPTO_SHASH, .type = "shash", .name = "md4",	.block_size = 64,	.digest_size = 16 },
{ .crypto_type = CRYPTO_SHASH, .type = "shash", .name = "rmd128",	.block_size = 64,	.digest_size = 16 },
{ .crypto_type = CRYPTO_SHASH, .type = "shash", .name = "rmd160",	.block_size = 64,	.digest_size = 20 },
{ .crypto_type = CRYPTO_SHASH, .type = "shash", .name = "rmd256",	.block_size = 64,	.digest_size = 32 },
{ .crypto_type = CRYPTO_SHASH, .type = "shash", .name = "rmd320",	.block_size = 64,	.digest_size = 40 },
{ .crypto_type = CRYPTO_SHASH, .type = "shash", .name = "wp512",	.block_size = 64,	.digest_size = 64 },
{ .crypto_type = CRYPTO_SHASH, .type = "shash", .name = "wp384",	.block_size = 64,	.digest_size = 48 },
{ .crypto_type = CRYPTO_SHASH, .type = "shash", .name = "wp256",	.block_size = 64,	.digest_size = 32 },
{ .crypto_type = CRYPTO_SHASH, .type = "shash", .name = "tgr192",	.block_size = 64,	.digest_size = 24 },
{ .crypto_type = CRYPTO_SHASH, .type = "shash", .name = "tgr160",	.block_size = 64,	.digest_size = 20 },
{ .crypto_type = CRYPTO_SHASH, .type = "shash", .name = "tgr128",	.block_size = 64,	.digest_size = 16 },
{ .crypto_type = CRYPTO_SHASH, .type = "shash", .name = "poly1305",	.block_size = 16,	.digest_size = 16 },
{ .crypto_type = CRYPTO_SHASH, .type = "shash", .name = "michael_mic",	.block_size = 8,	.digest_size = 8 },
{ .crypto_type = CRYPTO_SHASH, .type = "shash", .name = "hmac(sha1)",	.block_size = 64,	.digest_size = 20 },
{ .crypto_type = CRYPTO_CIPHER, .type = "cipher", .name = "serpent",	.block_size = 16,	.max_key_size = 32 },
{ .crypto_type = CRYPTO_CIPHER, .type = "cipher", .name = "tnepres",	.block_size = 16,	.max_key_size = 32 },
{ .crypto_type = CRYPTO_CIPHER, .type = "cipher", .name = "cast6",	.block_size = 16,	.max_key_size = 32 },
{ .crypto_type = CRYPTO_CIPHER, .type = "cipher", .name = "camellia",	.block_size = 16,	.max_key_size = 32 },
{ .crypto_type = CRYPTO_CIPHER, .type = "cipher", .name = "cast5",	.block_size = 8,	.max_key_size = 16 },
{ .crypto_type = CRYPTO_CIPHER, .type = "cipher", .name = "blowfish",	.block_size = 8,	.max_key_size = 56 },
{ .crypto_type = CRYPTO_CIPHER, .type = "cipher", .name = "tea",	.block_size = 8,	.max_key_size = 16 },
{ .crypto_type = CRYPTO_CIPHER, .type = "cipher", .name = "xtea",	.block_size = 8,	.max_key_size = 16 },
{ .crypto_type = CRYPTO_CIPHER, .type = "cipher", .name = "xeta",	.block_size = 8,	.max_key_size = 16 },
{ .crypto_type = CRYPTO_CIPHER, .type = "cipher", .name = "seed",	.block_size = 16,	.max_key_size = 16 },
{ .crypto_type = CRYPTO_CIPHER, .type = "cipher", .name = "khazad",	.block_size = 8,	.max_key_size = 16 },
{ .crypto_type = CRYPTO_CIPHER, .type = "cipher", .name = "fcrypt",	.block_size = 8,	.max_key_size = 8 },
{ .crypto_type = CRYPTO_CIPHER, .type = "cipher", .name = "anubis",	.block_size = 16,	.max_key_size = 40 },
{ .crypto_type = CRYPTO_AEAD, .type = "aead", .name = "gcm(aes)",	.block_size = 1,	.max_auth_size = 16,	.iv_size = 12 },
{ .crypto_type = CRYPTO_AEAD, .type = "aead", .name = "rfc4106(gcm(aes))",	.block_size = 1,	.max_auth_size = 16,	.iv_size = 8 },
stress-ng: info:  [4246] stress-ng-af-alg: 49 cryptographic algorithms found in /proc/crypto
stress-ng: info:  [4246] stress-ng-af-alg: 102 cryptographic algorithms max (with defconfigs)
stress-ng: debug: [4246] stress_af_alg_cipher (193): alg_cipher_info->name=ecb(aes), salg_type=skcipher
stress-ng: fail:  [4246] stress-ng-af-alg: sendmsg using ecb(aes) failed: errno=22 (Invalid argument)
stress-ng: debug: [4246] stress_af_alg_cipher (193): alg_cipher_info->name=ecb(aes), salg_type=skcipher
stress-ng: debug: [4246] stress-ng-af-alg: exited [4246] (instance 0)
stress-ng: debug: [4242] process [4246] terminated
stress-ng: info:  [4242] successful run completed in 1.33s

After some checks, I found that in /proc/crypto, the type of ecb(aes) cipher is ablkcipher.
I'm not familiar with the Crypto API and didn't find what's the difference between skcipher and ablkcipher. Is this something missing in the MTK's kernel? or a case that stress-ng doesn't cover?

YAML file not generated depending on --yaml parameter position

I just noticed that this command doesn't generate any YAML output file:

stress-ng --cpu 0 --cpu-method all --timeout 10 --yaml gst.yaml --metrics --times --no-rand-seed --verify --matrix 0 --str 0 --af-alg 0

But if I move the --yaml parameter in 1st position, it works fine:

stress-ng --yaml gst.yaml --cpu 0 --cpu-method all --timeout 10 --metrics --times --no-rand-seed --verify --matrix 0 --str 0 --af-alg 0
$ stress-ng --version
stress-ng, version 0.10.07 (gcc 9.2, x86_64 Linux 5.3.0-26-generic) 💻🔥

Cross-Compile Report

I'm cross-compiling stress-ng for an embedded device. It took most of a day to do this, because I had to insert the device manufacturer's make rules into the project's makefile. I also had to hard-code a few defines in stress-ng.h, and fixed a few bugs.

The goal is to use stress-ng to test our network and device monitoring software. We want to generate alerts of various kinds, and stress-ng allows us to validate that our project is working properly.

Want to run the test without time bound/timeout parameters

Hi ColinIanKing,

I need your help on running the test without any time bound/timeout

Example: I want run basic cpu method like
stress-ng --cpu 0 --cpu-method int8 -t 1s
stress-ng --cpu 0 --cpu-method int8

In the first command if you see the last 2 commands are specifying the timeout period, and if you see second command we are not specifying the time means that it will run for a whole day.

So here we go, is there any way to run above or other test these time bound parameters. So my intention is i just want to complete my test and i dont want any time to run my test to that particular time.

Please help me if there is a way to implement my requirement.
Thanks in Advance.

Best Regards,
Vasu

cannot compile stress-ng on redhat 6.x

On redhat 6.x with gcc 4.4.7 and glibc 2.12-1.192 trying to compile stress-ng fails with the below. I think this used to work until recently.

Thank you for maintaining stress-ng!

stress-aio.o: In function stress_aio': stress-aio.c:(.text+0x2f7): undefined reference toaio_write'
stress-aio.c:(.text+0x3a6): undefined reference to aio_error' stress-aio.c:(.text+0x3ce): undefined reference toaio_write'
stress-aio.c:(.text+0x40f): undefined reference to aio_read' stress-aio.c:(.text+0x490): undefined reference toaio_cancel'
stress-aio-linux.o: In function stress_aio_linux': stress-aio-linux.c:(.text+0x81): undefined reference toio_setup'
stress-aio-linux.c:(.text+0x2c9): undefined reference to io_submit' stress-aio-linux.c:(.text+0x2e2): undefined reference toclock_gettime'
stress-aio-linux.c:(.text+0x328): undefined reference to io_getevents' stress-aio-linux.c:(.text+0x39e): undefined reference toio_destroy'
stress-clock.o: In function stress_clock': stress-clock.c:(.text+0x3e): undefined reference toclock_gettime'
stress-clock.c:(.text+0x70): undefined reference to clock_getres' stress-clock.c:(.text+0xcd): undefined reference toclock_gettime'
stress-clock.c:(.text+0x166): undefined reference to clock_nanosleep' stress-clock.c:(.text+0x1ad): undefined reference totimer_create'
stress-clock.c:(.text+0x1f3): undefined reference to timer_settime' stress-clock.c:(.text+0x244): undefined reference totimer_gettime'
stress-clock.c:(.text+0x2c9): undefined reference to timer_delete' stress-crypt.o: In functionstress_crypt_id':
stress-crypt.c:(.text+0x49): undefined reference to crypt_r' stress-epoll.o: In functionepoll_timer_handler':
stress-epoll.c:(.text+0x51): undefined reference to timer_settime' stress-epoll.o: In functionepoll_client':
stress-epoll.c:(.text+0x1d2): undefined reference to timer_create' stress-epoll.c:(.text+0x222): undefined reference totimer_settime'
stress-epoll.c:(.text+0x289): undefined reference to timer_delete' stress-get.o: In functionstress_get':
stress-get.c:(.text+0x263): undefined reference to prlimit' stress-get.c:(.text+0x284): undefined reference toprlimit'
stress-get.c:(.text+0x299): undefined reference to prlimit' stress-mq.o: In functionstress_mq':
stress-mq.c:(.text+0x158): undefined reference to mq_open' stress-mq.c:(.text+0x353): undefined reference tomq_send'
stress-mq.c:(.text+0x3a6): undefined reference to mq_send' stress-mq.c:(.text+0x3d4): undefined reference tomq_close'
stress-mq.c:(.text+0x3e4): undefined reference to mq_unlink' stress-mq.c:(.text+0x420): undefined reference tomq_getattr'
stress-mq.c:(.text+0x4fc): undefined reference to mq_receive' stress-mq.c:(.text+0x55a): undefined reference tomq_timedreceive'
stress-procfs.o: In function stress_proc_dir': stress-procfs.c:(.text+0x146): undefined reference topthread_create'
stress-procfs.c:(.text+0x261): undefined reference to pthread_join' stress-pthread.o: In functionstress_pthread':
stress-pthread.c:(.text+0x125): undefined reference to pthread_create' stress-pthread.c:(.text+0x1d8): undefined reference topthread_join'
stress-sem.o: In function stress_sem_posix': stress-sem.c:(.text+0x215): undefined reference toclock_gettime'
stress-sem.c:(.text+0x244): undefined reference to sem_post' stress-sem.c:(.text+0x27a): undefined reference tosem_timedwait'
stress-sem.o: In function stress_semaphore_posix_destroy': stress-sem.c:(.text+0x320): undefined reference tosem_destroy'
stress-sem.o: In function stress_semaphore_posix_init': stress-sem.c:(.text+0x37a): undefined reference tosem_init'
stress-sem-sysv.o: In function stress_sem_sysv': stress-sem-sysv.c:(.text+0x21a): undefined reference toclock_gettime'
stress-shm.o: In function stress_shm_posix': stress-shm.c:(.text+0x2da): undefined reference toshm_unlink'
stress-shm.c:(.text+0x4c7): undefined reference to shm_open' stress-shm.c:(.text+0x7a8): undefined reference toshm_unlink'
stress-sleep.o: In function stress_sleep': stress-sleep.c:(.text+0xd1): undefined reference topthread_create'
stress-sleep.c:(.text+0x181): undefined reference to pthread_join' stress-sysfs.o: In functionstress_sys_dir':
stress-sysfs.c:(.text+0x19f): undefined reference to pthread_create' stress-sysfs.c:(.text+0x3ab): undefined reference topthread_join'
stress-timer.o: In function stress_timer': stress-timer.c:(.text+0x1f0): undefined reference totimer_create'
stress-timer.c:(.text+0x223): undefined reference to timer_settime' stress-timer.c:(.text+0x281): undefined reference totimer_delete'
stress-timer.o: In function stress_timer_handler': stress-timer.c:(.text+0x400): undefined reference totimer_settime'
stress-timer.c:(.text+0x478): undefined reference to timer_getoverrun' perf.o: In functionperf_open':
perf.c:(.text+0xd38): undefined reference to pthread_spin_lock' perf.c:(.text+0xd54): undefined reference topthread_spin_unlock'
stress-ng.o: In function main': stress-ng.c:(.text+0x258f): undefined reference topthread_spin_init'
collect2: ld returned 1 exit status
make: *** [stress-ng] Error 1

Getting Cpu Usage

Hi ColinlanKing,

I am running the below command in my PC. (ubntu-x86). My pc have total 4 cores.

#stress-ng --taskset 3 --pipe 1 -t 1m -v --metrics --times
for a 60.00s run time:
240.00s available CPU time
13.52s user time ( 5.63%)
46.47s system time ( 19.36%)
59.99s total time ( 25.00%)
load average: 1.09 0.37 0.33

#stress-ng --pipe 1 -t 1m -v --metrics --times
for a 60.00s run time:
240.00s available CPU time
23.54s user time ( 9.81%)
86.77s system time ( 36.15%)
110.31s total time ( 45.96%)
load average: 1.35 0.59 0.41

When ever i am using the with --taskset option i see the total_time is (25.00%) and without --taskset option total time is (45.96%) what is difference i did not understand would you please explain me.

When ever running the stress-ng command i observed the top command output each cpu untilazation is going to 100% but i did not see stress-ng output log.

Thanks
Viswa

stress-ng run rk3288 Android5.1

build command:
github/stress-ng$ export $(dpkg-architecture -aarmhf)
github/stress-ng$ export CROSS_COMPILE=arm-linux-gnueabihf-
github/stress-ng$ export CCPREFIX=${CROSS_COMPILE}
github/stress-ng$ export CC=${CROSS_COMPILE}
github/stress-ng$ STATIC=1 make ARCH=arm
make makeconfig
make[1]: Entering directory '/opt/repo/github/stress-ng'
make[2]: Entering directory '/opt/repo/github/stress-ng'
make[2]: Leaving directory '/opt/repo/github/stress-ng'
make[1]: Leaving directory '/opt/repo/github/stress-ng'
make stress-ng
make[1]: Entering directory '/opt/repo/github/stress-ng'
CC stress-access.c
make[1]: arm-linux-gnueabihf-: Command not found
Makefile:340: recipe for target 'stress-access.o' failed
make[1]: *** [stress-access.o] Error 127
make[1]: Leaving directory '/opt/repo/github/stress-ng'
Makefile:331: recipe for target 'all' failed
make: *** [all] Error 2

modify build command:
github/stress-ng$ export $(dpkg-architecture -aarmhf)
dpkg-architecture: warning: specified GNU system type arm-linux-gnueabihf does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
github/stress-ng$ export CROSS_COMPILE=arm-linux-gnueabihf-gcc
github/stress-ng$ export CCPREFIX=${CROSS_COMPILE}
github/stress-ng$ export CC=${CROSS_COMPILE}
github/stress-ng$ STATIC=1 make ARCH=arm
......
......
CC shim.c
CC thermal-zone.c
CC time.c
CC thrash.c
CC stress-ng.c
LD stress-ng
stress-dynlib.o: In function `stress_dynlib':
stress-dynlib.c:(.text+0xe4): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
make[1]: Leaving directory '/opt/repo/github/stress-ng'

run stress-ng for rk3288 board:
root@rk3288:/ # stress-ng -c 4 --cpu-method pi -t 30
stress-ng: info: [1925] Working directory / is not read/writeable, some I/O tests may fail
stress-ng: info: [1925] dispatching hogs: 4 cpu
stress-ng: info: [1925] cache allocate: using built-in defaults as unable to determine cache details
stress-ng: info: [1925] successful run completed in 30.00s
......

when i run stress-ng --all -4 -t 10, my rk3288 board reboot!

1|root@rk3288:/ # stress-ng --all -4 -t 10
stress-ng: info: [1366] apparmor stressor will be skipped, AppArmor is not available
stress-ng: info: [1366] efivar stressor will be skipped, need to have access to EFI vars in /sys/firmware/efi/vars
stress-ng: info: [1366] exec stressor must not run as root, skipping the stressor
stress-ng: info: [1366] exec stressor must not run as root, skipping the stressor
stress-ng: info: [1366] disabled 'bind-mount' as it may hang or reboot the machine (enable it with the --pathological option)
stress-ng: info: [1366] disabled 'cpu-online' as it may hang or reboot the machine (enable it with the --pathological option)
stress-ng: info: [1366] disabled 'oom-pipe' as it may hang or reboot the machine (enable it with the --pathological option)
stress-ng: info: [1366] disabled 'watchdog' as it may hang or reboot the machine (enable it with the --pathological option)
stress-ng: info: [1366] Working directory / is not read/writeable, some I/O tests may fail
stress-ng: info: [1366] dispatching hogs: 4 access, 4 af-alg, 4 affinity, 4 aio, 4 aiol, 4 atomic, 4 bigheap, 4 branch, 4 brk, 4 bsearch, 4 cache, 4 cap, 4 chdir, 4 chmod, 4 chown, 4 chroot, 4 clock, 4 clone,
4 context, 4 copy-file, 4 cpu, 4 crypt, 4 cyclic, 4 daemon, 4 dccp, 4 dentry, 4 dev, 4 dev-shm, 4 dir, 4 dirdeep, 4 dnotify, 4 dup, 4 dynlib, 4 enosys, 4 epoll, 4 eventfd, 4 fallocate, 4 fanotify, 4 fault, 4 fc
ntl, 4 fiemap, 4 fifo, 4 file-ioctl, 4 filename, 4 flock, 4 fork, 4 fp-error, 4 fstat, 4 full, 4 funccall, 4 futex, 4 get, 4 getdent, 4 getrandom, 4 handle, 4 hdd, 4 heapsort, 4 hrtimers, 4 hsearch, 4 icache, 4
icmp-flood, 4 inode-flags, 4 inotify, 4 io, 4 iomix, 4 ioport, 4 ioprio, 4 itimer, 4 kcmp, 4 key, 4 kill, 4 klog, 4 lease, 4 link, 4 locka, 4 lockbus, 4 lockf, 4 lockofd, 4 longjmp, 4 lsearch, 4 madvise, 4 mal
loc, 4 matrix, 4 mcontend, 4 membarrier, 4 memcpy, 4 memfd, 4 memrate, 4 memthrash, 4 mergesort, 4 mincore, 4 mknod, 4 mlock, 4 mmap, 4 mmapaddr, 4 mmapfixed, 4 mmapfork, 4 mmapmany, 4 mq, 4 mremap, 4 msg, 4 ms
ync, 4 netdev, 4 netlink-proc, 4 nice, 4 nop, 4 null, 4 numa, 4 opcode, 4 open, 4 personality, 4 physpage, 4 pipe, 4 poll, 4 prctl, 4 procfs, 4 pthread, 4 ptrace, 4 pty, 4 qsort, 4 quota, 4 radixsort, 4 rawdev,
4 rdrand, 4 readahead, 4 remap, 4 rename, 4 resources, 4 revio, 4 rlimit, 4 rmap, 4 rtc, 4 schedpolicy, 4 sctp, 4 seal, 4 seccomp, 4 seek, 4 sem, 4 sem-sysv, 4 sendfile, 4 set, 4 shm, 4 shm-sysv, 4 sigfd, 4 si
gfpe, 4 sigio, 4 sigpending, 4 sigpipe, 4 sigq, 4 sigrt, 4 sigsegv, 4 sigsuspend, 4 sleep, 4 sock, 4 sockdiag, 4 sockfd, 4 sockpair, 4 softlockup, 4 splice, 4 stack, 4 stackmmap, 4 str, 4 stream, 4 swap, 4 swit
ch, 4 symlink, 4 sync-file, 4 sysbadaddr, 4 sysinfo, 4 sysfs, 4 tee, 4 timer, 4 timerfd, 4 tlb-shootdown, 4 tmpfs, 4 tree, 4 tsc, 4 tsearch, 4 udp, 4 udp-flood, 4 unshare, 4 urandom, 4 userfaultfd, 4 utime, 4 v
ecmath, 4 vfork, 4 vforkmany, 4 vm, 4 vm-addr, 4 vm-rw, 4 vm-segv, 4 vm-splice, 4 wait, 4 wcs, 4 xattr, 4 yield, 4 zero, 4 zlib, 4 zombie
stress-ng: info: [1366] cache allocate: using built-in defaults as unable to determine cache details
stress-ng: fail: [1370] stress-ng-aio: mkdir './tmp-stress-ng-aio-1370-0' failed, errno=30 (Read-only file system)
stress-ng: info: [1371] stress-ng-aiol: this stressor is not implemented on this system: armv7l Linux 3.10.0 (gcc 5.4)
stress-ng: info: [1378] stress-ng-cap: this stressor is not implemented on this system: armv7l Linux 3.10.0 (gcc 5.4)
stress-ng: fail: [1382] stress-ng-chroot: mkdir failed, errno=30 (Read-only file system)
stress-ng: fail: [1379] stress-ng-chdir: mkdir './tmp-stress-ng-chdir-1379-0' failed, errno=30 (Read-only file system)
stress-ng: fail: [1367] stress-ng-access: mkdir './tmp-stress-ng-access-1367-0' failed, errno=30 (Read-only file system)
stress-ng: fail: [1381] stress-ng-chown: mkdir failed, errno=30 (Read-only file system)
stress-ng: fail: [1380] stress-ng-chmod: mkdir failed, errno=30 (Read-only file system)
stress-ng: fail: [1392] stress-ng-dentry: mkdir './tmp-stress-ng-dentry-1392-0' failed, errno=30 (Read-only file system)
stress-ng: info: [1389] stress-ng-cyclic: for best results, run just 1 instance of this stressor
stress-ng: info: [1386] stress-ng-copy-file: this stressor is not implemented on this system: armv7l Linux 3.10.0 (gcc 5.4)
stress-ng: info: [1394] stress-ng-dev-shm: /dev/shm does not exist, skipping test
stress-ng: fail: [1395] stress-ng-dir: mkdir './tmp-stress-ng-dir-1395-0' failed, errno=30 (Read-only file system)
stress-ng: info: [1391] stress-ng-dccp: DCCP protocol not supported, skipping stressor
stress-ng: info: [1396] stress-ng-dirdeep: 0 inodes available, exercising up to 0 inodes
stress-ng: fail: [1397] stress-ng-dnotify: mkdir './tmp-stress-ng-dnotify-1397-0' failed, errno=30 (Read-only file system)
stress-ng: fail: [1403] stress-ng-fallocate: mkdir './tmp-stress-ng-fallocate-1403-0' failed, errno=30 (Read-only file system)
stress-ng: fail: [1404] stress-ng-fanotify: mkdir './tmp-stress-ng-fanotify-1404-0' failed, errno=30 (Read-only file system)
stress-ng: fail: [1405] stress-ng-fault: mkdir './tmp-stress-ng-fault-1405-0' failed, errno=30 (Read-only file system)
stress-ng: fail: [1406] stress-ng-fcntl: mkdir failed, errno=30 (Read-only file system)
stress-ng: fail: [1407] stress-ng-fiemap: mkdir './tmp-stress-ng-fiemap-1407-0' failed, errno=30 (Read-only file system)
stress-ng: fail: [1407] stress-ng-fiemap: rmdir './tmp-stress-ng-fiemap-1407-0' failed, errno=30 (Read-only file system)
stress-ng: fail: [1408] stress-ng-fifo: mkdir './tmp-stress-ng-fifo-1408-0' failed, errno=30 (Read-only file system)
stress-ng: fail: [1409] stress-ng-file-ioctl: mkdir './tmp-stress-ng-file-ioctl-1409-0' failed, errno=30 (Read-only file system)
stress-ng: fail: [1410] stress-ng-filename: mkdir failed, errno=30 (Read-only file system)
stress-ng: fail: [1411] stress-ng-flock: mkdir './tmp-stress-ng-flock-1411-0' failed, errno=30 (Read-only file system)
stress-ng: fail: [1433] stress-ng-epoll: bind failed, errno=2 (No such file or directory)

Stop using deprecated oom_adj in procfs

When running stress-ng, dmesg shows a complaint from the kernel about using the deprecated oom_adj knob. It should be using oom_score_adj instead.

[ 4833.580694] stress-ng (12778): /proc/12778/oom_adj is deprecated, please use /proc/12778/oom_score_adj instead.

cache issue

Hi All,

I want understand the cpu-cache related test cases and memory test would you please suggest me what are commands and what are the documents for me helpful.

Would please help me .

Thanks
viswa

Stress-ng command --cpu 0 understandd

I ran the some stress-ng tests --cpu 0 option and without --cpu 0 also ran the some tests.
I need to understand the with --cpu 0 and without --cpu 0 option.
Would you please see the below tests the --cpu 0 and without --cpu 0 option.
stress-ng --cpu 0 --pipe 0 -t 1m -v --metrics-brief
stress-ng --pipe 0 -t 1m -v --metrics-brief

If you add the --cpu 0 before the --pipe 0 option what is meaning exactly.

Would you please help me for understand the above commands.

Cannot build on Solaris 10

Hi Colin,

I've tried to build stress-ng on Solaris 10 but have had no luck so far. I get the following output when trying to make:

CC=/usr/sfw/bin/gcc /usr/sfw/bin/gmake

/bin/sh: test: argument expected
gmake: *** [have_apparmor] Error 1
/bin/sh: test: argument expected
gmake: *** [have_keyutils_h] Error 1
/bin/sh: test: argument expected
gmake: *** [have_xattr_h] Error 1
/bin/sh: test: argument expected
gmake: *** [have_lib_bsd] Error 1
/bin/sh: test: argument expected
gmake: *** [have_lib_z] Error 1
/bin/sh: test: argument expected
gmake: *** [have_lib_crypt] Error 1
/bin/sh: test: argument expected
gmake: *** [have_lib_rt] Error 1
/bin/sh: test: argument expected
gmake: *** [have_lib_pthread] Error 1
/bin/sh: test: argument expected
gmake: *** [have_lib_sctp] Error 1
/bin/sh: test: argument expected
gmake: *** [have_float_decimal] Error 1
/bin/sh: test: argument expected
gmake: *** [have_seccomp_h] Error 1
/bin/sh: test: argument expected
gmake: *** [have_lib_aio] Error 1
/bin/sh: test: argument expected
gmake: *** [have_sys_cap_h] Error 1
/bin/sh: test: argument expected
gmake: *** [have_vecmath] Error 1
/bin/sh: test: argument expected
gmake: *** [have_atomic] Error 1
/usr/sfw/bin/gcc -Wall -Wextra -DVERSION="0.07.07" -O2 -std=gnu99 -c -o stress-affinity.o stress-affinity.c
/usr/sfw/bin/gcc -Wall -Wextra -DVERSION="0.07.07" -O2 -std=gnu99 -c -o stress-af-alg.o stress-af-alg.c
/usr/sfw/bin/gcc -Wall -Wextra -DVERSION="0.07.07" -O2 -std=gnu99 -c -o stress-aio.o stress-aio.c
/usr/sfw/bin/gcc -Wall -Wextra -DVERSION="0.07.07" -O2 -std=gnu99 -c -o stress-aio-linux.o stress-aio-linux.c
/usr/sfw/bin/gcc -Wall -Wextra -DVERSION="0.07.07" -O2 -std=gnu99 -c -o stress-apparmor.o stress-apparmor.c
/usr/sfw/bin/gcc -Wall -Wextra -DVERSION="0.07.07" -O2 -std=gnu99 -c -o stress-atomic.o stress-atomic.c
/usr/sfw/bin/gcc -Wall -Wextra -DVERSION="0.07.07" -O2 -std=gnu99 -c -o stress-bigheap.o stress-bigheap.c
/usr/sfw/bin/gcc -Wall -Wextra -DVERSION="0.07.07" -O2 -std=gnu99 -c -o stress-bind-mount.o stress-bind-mount.c
/usr/sfw/bin/gcc -Wall -Wextra -DVERSION="0.07.07" -O2 -std=gnu99 -c -o stress-brk.o stress-brk.c
/usr/sfw/bin/gcc -Wall -Wextra -DVERSION="0.07.07" -O2 -std=gnu99 -c -o stress-bsearch.o stress-bsearch.c
/usr/sfw/bin/gcc -Wall -Wextra -DVERSION="0.07.07" -O2 -std=gnu99 -c -o stress-cache.o stress-cache.c
/usr/sfw/bin/gcc -Wall -Wextra -DVERSION="0.07.07" -O2 -std=gnu99 -c -o stress-cap.o stress-cap.c
/usr/sfw/bin/gcc -Wall -Wextra -DVERSION="0.07.07" -O2 -std=gnu99 -c -o stress-chdir.o stress-chdir.c
/usr/sfw/bin/gcc -Wall -Wextra -DVERSION="0.07.07" -O2 -std=gnu99 -c -o stress-chmod.o stress-chmod.c
/usr/sfw/bin/gcc -Wall -Wextra -DVERSION="0.07.07" -O2 -std=gnu99 -c -o stress-chown.o stress-chown.c
/usr/sfw/bin/gcc -Wall -Wextra -DVERSION="0.07.07" -O2 -std=gnu99 -c -o stress-clock.o stress-clock.c
/usr/sfw/bin/gcc -Wall -Wextra -DVERSION="0.07.07" -O2 -std=gnu99 -c -o stress-clone.o stress-clone.c
/usr/sfw/bin/gcc -Wall -Wextra -DVERSION="0.07.07" -O2 -std=gnu99 -c -o stress-context.o stress-context.c
/usr/sfw/bin/gcc -Wall -Wextra -DVERSION="0.07.07" -O2 -std=gnu99 -c -o stress-copy-file.o stress-copy-file.c
/usr/sfw/bin/gcc -Wall -Wextra -DVERSION="0.07.07" -O2 -std=gnu99 -c -o stress-cpu.o stress-cpu.c
/bin/sh: test: argument expected
gmake: *** [stress-cpu.o] Error 1

I'm using gcc 5.2 and gmake 4.2.1. Any advice would be greatly appreciated, thank you.

CPU Stress-ng Test Results how to cross check cpu has stressed

Hi ColinIanKing,

Could you please help me on providing basic information like Stress-ng test results, apart from these below terminal messages.
#stress-ng1 --cpu 0 --cpu-method int32 -t 1s
RX> stress-ng: info: [330] dispatching hogs: 1 cpu\013 \010
RX> stress-ng: info: [330] successful run completed in 1.00s.

How can i make sure that with above command my CPU had stressed, and is there any CPU parameters which tells CPU has stress tested.

Any logs that has been generated after the test completion, that represent detailed stress information including Pass/Fail Status.

Thanks in Advance,

BR,
Vasu

CPU Cache levels L1, L2 and L3 fetching wrong size in my Ubuntu PC.

Hi ColinIanKing,

Please help me in Understanding these below things on Cache:

1)While I'm running CPU Cache test and specifies the Cache Level as 1 which specifies L1 and CPU shown the print default cache size of 32 Kb, but my PC have 64Kb of L1 I-Cache and 64Kb of L1 Dcache. And If I specify L2 it is showing the 256Kb of cache, but actually my pc has 512Kb, So why is it not showing the actual cache size?

2)In the below command I've specified only Level L1 then on which L1 cache (i.e icache or dcache) the cpu performs the operations
stress-ng --cache 0 --cache-level 1 -t 2s -v --metrics-brief --times --log-brief.

3)All cache operations will done through the stress-ng_cache.c file,
Like Cache Pagehit/Pagemiss also will it perform internally if so how can i capture the results of hit/miss things.

4)If i give below command then will it execute the prefetch, fence, sfence also, or else this command wont cover these things?
stress-ng cpu-cache --cache 0 -t 2s -v --metrics-brief --times --log-brief

Thanks in Advance.

Best Regards,
Vasu.

Missing flags for FFT

I checked the FFT support flags are in stress-cpu.c file
#if defined(HAVE_COMPLEX_H) &&
defined(HAVE_COMPLEX) &&
defined(STDC_IEC_559_COMPLEX) &&
!defined(UCLIBC)

I found 2 flags(HAVE_COMPLEX_H and HAVE_COMPLEX) for MUSL toolchain but STDC_IEC_559_COMPLEX is not available for MUSL toolchain so is there any workaround.

Would you please help me.

Thanks
Viswa

Not able to install

After cloning this, when I try to run make, I get the following error: stress-key.c:36:22: fatal error: keyutils.h: No such file or directory.

Output from ? command differs from documentation

Ouptut from 'stress-ng --class cpu?'

class 'cpu' stressors: af-alg atomic branch bsearch context cpu cpu-online crypt fp-error funccall getrandom heapsort hsearch ioport longjmp lsearch matrix mergesort nop numa opcode pkey qsort radixsort rdrand str stream tree tsc tsearch vecmath wcs zlib

Output from 'stress-ng --cpu 0 --cpu-method wrongmethod'

cpu-method must be one of: all ackermann bitops callfunc cdouble cfloat clongdouble correlate crc16 decimal32 decimal64 decimal128 dither djb2a double euler explog fft factorial fibonacci float float32 float80 float128 fnv1a gamma gcd gray hamming hanoi hyperbolic idct int128 int64 int32 int16 int8 int128float int128double int128longdouble int128decimal32 int128decimal64 int128decimal128 int64float int64double int64longdouble int32float int32double int32longdouble jenkin jmp ln2 longdouble loop matrixprod nsqrt omega parity phi pi pjw prime psi queens rand rand48 rgb sdbm sieve stats sqrt trig union zeta

I think the error message from an incorrect param is more in line with the kernel documentation. The ? also has issues with other classes and it seems like some stressors are listed under multiple classes of tests.

stress-ng-membarrier: this stressor is not implemented on this system: x86_64 Linux 4.19.39-2.x86_64

I am getting this error while running it.

CentOS Linux release 7.6.1810 (Core)
Linux srlinux 4.19.39-2.x86_64 #1 SMP PREEMPT Mon Mar 23 16:47:19 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

[root@mypc tmp]# sudo stress-ng --all 2 --timeout 2s
stress-ng: info: [20389] dispatching hogs: 2 af-alg, 2 affinity, 2 aio, 2 aiol, 2 apparmor, 2 atomic, 2 bigheap, 2 brk, 2 bsearch, 2 cache, 2 cap, 2 chdir, 2 chmod, 2 chown, 2 chroot, 2 clock, 2 clone, 2 context, 2 copy-file, 2 cpu, 2 cpu-online, 2 crypt, 2 daemon, 2 dccp, 2 dentry, 2 dir, 2 dirdeep, 2 dnotify, 2 dup, 2 epoll, 2 eventfd, 2 exec, 2 fallocate, 2 fanotify, 2 fault, 2 fcntl, 2 fiemap, 2 fifo, 2 filename, 2 flock, 2 fork, 2 fp-error, 2 fstat, 2 full, 2 futex, 2 get, 2 getdent, 2 getrandom, 2 handle, 2 hdd, 2 heapsort, 2 hsearch, 2 icache, 2 icmp-flood, 2 inotify, 2 io, 2 iomix, 2 ioprio, 2 itimer, 2 kcmp, 2 key, 2 kill, 2 klog, 2 lease, 2 link, 2 locka, 2 lockbus, 2 lockf, 2 lockofd, 2 longjmp, 2 lsearch, 2 madvise, 2 malloc, 2 matrix, 2 membarrier, 2 memcpy, 2 memfd, 2 mergesort, 2 mincore, 2 mknod, 2 mlock, 2 mmap, 2 mmapfork, 2 mmapmany, 2 mq, 2 mremap, 2 msg, 2 msync, 2 netlink-proc, 2 nice, 2 nop, 2 null, 2 numa, 2 oom-pipe, 2 opcode, 2 open, 2 personality, 2 pipe, 2 poll, 2 procfs, 2 pthread, 2 ptrace, 2 pty, 2 qsort, 2 quota, 2 rdrand, 2 readahead, 2 remap, 2 rename, 2 resources, 2 rlimit, 2 rmap, 2 rtc, 2 schedpolicy, 2 sctp, 2 seal, 2 seccomp, 2 seek, 2 sem, 2 sem-sysv, 2 sendfile, 2 shm, 2 shm-sysv, 2 sigfd, 2 sigfpe, 2 sigpending, 2 sigq, 2 sigsegv, 2 sigsuspend, 2 sleep, 2 sock, 2 sockfd, 2 sockpair, 2 spawn, 2 splice, 2 stack, 2 stackmmap, 2 str, 2 stream, 2 switch, 2 symlink, 2 sync-file, 2 sysfs, 2 sysinfo, 2 tee, 2 timer, 2 timerfd, 2 tlb-shootdown, 2 tmpfs, 2 tsc, 2 tsearch, 2 udp, 2 udp-flood, 2 unshare, 2 urandom, 2 userfaultfd, 2 utime, 2 vecmath, 2 vfork, 2 vforkmany, 2 vm, 2 vm-rw, 2 vm-splice, 2 wait, 2 wcs, 2 xattr, 2 yield, 2 zero, 2 zlib, 2 zombie
stress-ng: info: [20394] stress-ng-apparmor: this stressor is not implemented on this system: x86_64 Linux 4.19.39-2.x86_64
stress-ng: info: [20412] stress-ng-copy-file: this stressor is not implemented on this system: x86_64 Linux 4.19.39-2.x86_64
stress-ng: info: [20453] stress-ng-getrandom: this stressor is not implemented on this system: x86_64 Linux 4.19.39-2.x86_64
stress-ng: info: [20480] stress-ng-lockofd: this stressor is not implemented on this system: x86_64 Linux 4.19.39-2.x86_64
stress-ng: error: [20433] stress-ng-fanotify: cannot initialize fanotify, errno=38 (Function not implemented)
stress-ng: info: [20483] stress-ng-madvise: this stressor is not implemented on this system: x86_64 Linux 4.19.39-2.x86_64
stress-ng: info: [20486] stress-ng-membarrier: this stressor is not implemented on this system: x86_64 Linux 4.19.39-2.x86_64
stress-ng: info: [20431] stress-ng-exec: running as root, won't run test.
stress-ng: fail: [20470] stress-ng-kcmp: kcmp: KCMP_FILE failed, errno=38 (Function not implemented)
stress-ng: fail: [20470] stress-ng-kcmp: kcmp: KCMP_FILE failed, errno=38 (Function not implemented)
stress-ng: fail: [20470] stress-ng-kcmp: kcmp: KCMP_FILE failed, errno=38 (Function not implemented)
stress-ng: fail: [20470] stress-ng-kcmp: kcmp: KCMP_FILE failed, errno=38 (Function not implemented)
stress-ng: fail: [20470] stress-ng-kcmp: kcmp: KCMP_FILES failed, errno=38 (Function not implemented)
info: 5 failures reached, aborting stress process

Server goes to reboot on cpu-online test

Hi, I spot a problem with my two different servers. When I run stress-ng cpu tests on them - they abruptly go to reboot. Servers with different CPU model is fine. After investigation I found that problem occurs with stress-cpu-online and CPU0 core. I reproduced a problem with the simple script:

#!/usr/bin/env bash

attempts_number=100

for i in $(seq 0 $attempts_number); do
        echo "Disable/enable cpu0. Attempt $i"
        echo 0 > /sys/devices/system/cpu/cpu0/online
        echo 1 > /sys/devices/system/cpu/cpu0/online
done

After a few iterations server goes to reboot.

Dell Support says me that problem probably in that my CPU model does not support turning off CPU0 (or maybe my kernel do not support it, I use stock CentOS 7.4 kernel, was checked on RHEL 7.4 too). They give me two urls to read:

Anyway looks like this is not so rare situation. I think stress-ng must check that it may turn off CPU0 before check (or, at least, should have an option to not stress CPU0).

Technical information below.
Linux distributive:

# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)

Kernel version:

# uname -r
3.10.0-693.el7.x86_64

Kernel related option:

# cat /boot/config-3.10.0-693.el7.x86_64 | grep HOTPLUG_CPU0
CONFIG_BOOTPARAM_HOTPLUG_CPU0=y

Server model: Dell R630

Cpu model:

# lscpu  | grep Model
Model:                 79
Model name:            Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz

stress-ng version:

# yum info stress-ng
Installed Packages
Name        : stress-ng
Arch        : x86_64
Version     : 0.07.29
Release     : 2.el7
Size        : 4.9 M
Repo        : installed
From repo   : epel

If I may provide more information - please let me know.

Static build will fail

hi:
I git clone commit:fdc147478eb8 "stress-sigfpe: " and follow README steps for static build on Ubuntu 14.04.5.
make clean
STATIC=1 make
But I get below error messages, is there anything we need to take care more for static compiling stress-ng?
(I also post my gcc information at the end of post)
appreciate your kind help,

/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/librt.a(timer_routines.o): In function __start_helper_thread': (.text+0x225): undefined reference to pthread_attr_destroy'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/librt.a(timer_routines.o): In function __start_helper_thread': (.text+0x233): undefined reference to pthread_atfork'
collect2: error: ld returned 1 exit status
make[1]: *** [stress-ng] Error 1
make[1]: Leaving directory `/media/sdb1/software/benchmarkLinux/stress/stress-ng'
make: *** [all_config] Error 2


Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.4-2ubuntu114.04.4' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1
14.04.4)

CPU time is getting the very less using --taskset option

Hi ColinlanKing,

I am running the below command in my pc.
#stress-ng --taskset 3 --pipe 1 -t 2s -v -metrics --times
See the log times_dump

stress-ng: info: [3291] for a 2.00s run time:
stress-ng: info: [3291] 8.00s available CPU time
stress-ng: info: [3291] 0.54s user time ( 6.75%)
stress-ng: info: [3291] 1.45s system time ( 18.12%)
stress-ng: info: [3291] 1.99s total time ( 24.87%)
stress-ng: info: [3291] load average: 0.52 0.92 0.73

I observed in the stress-ng code times_dump function in the stress-ng.c file.
times_dump function is getting the total_cpu_time is multiply the total no of cores * duration time right.
I have the 4 cores in my pc and the duration is 2s (4 * 2s) right.
( code : double total_cpu_time = stress_get_processors_configured() * duration;)
I am using the --taskset option only one core (3) but the times_dump function is total_cpu_time calculate the all the cpu cores.

Would you please help me how to solve this issue.

Thanks
Viswa

undeclared vars PERF_COUNT_HW_*

On CentOS 6.0 with gcc 4.4.7 the make process fails with these errors.
I understand that it's an older release, but in case you want to keep it compatible maybe this would help.
Thank you!

cc -Wall -Wextra -DVERSION="0.06.05" -O2 -DHAVE_KEYUTILS_H -DHAVE_XATTR_H -DHAVE_LIB_Z -DHAVE_LIB_CRYPT -DHAVE_LIB_RT -DHAVE_LIB_PTHREAD -DHAVE_FLOAT_DECIMAL -DHAVE_LIB_AIO -c -o perf.o perf.c
perf.c:116: error: ‘PERF_COUNT_HW_STALLED_CYCLES_FRONTEND’ undeclared here (not in a function)
perf.c:117: error: ‘PERF_COUNT_HW_STALLED_CYCLES_BACKEND’ undeclared here (not in a function)
perf.c:121: error: ‘PERF_COUNT_HW_REF_CPU_CYCLES’ undeclared here (not in a function)
make: *** [perf.o] Error 1

Error in stress-sysinval.c file for x86 builds

Hey. Sorry about the bad English.

An error occurs when building for x86 architectures:

lcc: "stress-sysinval.c", line 52: error: identifier "__NR_getresuid" is
undefined
#define SYS(x) _NR ## x, # x
^
in expansion of macro "SYS" at line 645
{ SYS(getresuid), 3, { ARG_PTR, ARG_PTR, 0, 0 } },
^

1 error detected in the compilation of "stress-sysinval.c".

If you look at the file "stress-sysinval.c" you will notice:

#if DEFSYS(getresuid)
        { SYS(getresuid), 3, { ARG_PTR, ARG_PTR, 0, 0 } },
        { SYS(getresuid), 3, { ARG_PTR_WR, ARG_PTR_WR, 0, 0 } },
#endif
#if DEFSYS(getresuid32)
        { SYS(getresuid), 3, { ARG_PTR, ARG_PTR, 0, 0 } },
        { SYS(getresuid), 3, { ARG_PTR_WR, ARG_PTR_WR, 0, 0 } },
#endif

For DEFSYS(getresuid32) SYS(getresuid) is executed.

Although higher in the code:

#if DEFSYS(getresgid)
        { SYS(getresgid), 3, { ARG_PTR, ARG_PTR, 0, 0 } },
        { SYS(getresgid), 3, { ARG_PTR_WR, ARG_PTR_WR, 0, 0 } },
#endif
#if DEFSYS(getresgid32)
        { SYS(getresgid32), 3, { ARG_PTR, ARG_PTR, 0, 0 } },
        { SYS(getresgid32), 3, { ARG_PTR_WR, ARG_PTR_WR, 0, 0 } },
#endif

SYS(getresgid32) is called for getresgid32.

If you fix it on

#if DEFSYS(getresuid32)
        { SYS(getresuid32), 3, { ARG_PTR, ARG_PTR, 0, 0 } },
        { SYS(getresuid32), 3, { ARG_PTR_WR, ARG_PTR_WR, 0, 0 } },
#endif

Then everything works.

Thank you. I hope my remark is helpful.

[Feature request] Add --verify output to --yaml output

According to the documentation, the parameter --verify will output only on standard error.
I think it would make easier parsing the results if this information would be included also to the --yaml output, the same way that --perf and --metrics do.

An additional questions:

  1. is there an example of the --verifiy output? I'm not sure how to parse it since I have no idea how it looks like.
  2. is it possible to simulate a verification error in some way?
  3. what is going to be the process exit code in case of verification error?

Membarrier Test Execution Seeing D state in the htop Window

Hi ColinIanKing Sir,

Could you please help me on the membarrier test, while i'm running no load i'm seeing on the cpu in the htop window and also obsered the D state.

What i can do to remove this D state and getting the more load on user space and kernel space.

Thanks in Advance.

Best Regards,
Vasu.

Can't compile in Oracle Linux 6

I'm compiling this on an oracle linux 6 and I get the following error

stress-fallocate.c:160: warning: division by zero
cc -Wall -Wextra -DVERSION="0.05.15" -O2 -DHAVE_LIB_CRYPT -DHAVE_LIB_RT -DHAVE_LIB_PTHREAD -DHAVE_FLOAT_DECIMAL -c -o stress-fault.o stress-fault.c
cc -Wall -Wextra -DVERSION="0.05.15" -O2 -DHAVE_LIB_CRYPT -DHAVE_LIB_RT -DHAVE_LIB_PTHREAD -DHAVE_FLOAT_DECIMAL -c -o stress-fcntl.o stress-fcntl.c
cc -Wall -Wextra -DVERSION="0.05.15" -O2 -DHAVE_LIB_CRYPT -DHAVE_LIB_RT -DHAVE_LIB_PTHREAD -DHAVE_FLOAT_DECIMAL -c -o stress-fiemap.o stress-fiemap.c
cc -Wall -Wextra -DVERSION="0.05.15" -O2 -DHAVE_LIB_CRYPT -DHAVE_LIB_RT -DHAVE_LIB_PTHREAD -DHAVE_FLOAT_DECIMAL -c -o stress-fifo.o stress-fifo.c
cc -Wall -Wextra -DVERSION="0.05.15" -O2 -DHAVE_LIB_CRYPT -DHAVE_LIB_RT -DHAVE_LIB_PTHREAD -DHAVE_FLOAT_DECIMAL -c -o stress-filename.o stress-filename.c
cc -Wall -Wextra -DVERSION="0.05.15" -O2 -DHAVE_LIB_CRYPT -DHAVE_LIB_RT -DHAVE_LIB_PTHREAD -DHAVE_FLOAT_DECIMAL -c -o stress-flock.o stress-flock.c
cc -Wall -Wextra -DVERSION="0.05.15" -O2 -DHAVE_LIB_CRYPT -DHAVE_LIB_RT -DHAVE_LIB_PTHREAD -DHAVE_FLOAT_DECIMAL -c -o stress-fork.o stress-fork.c
cc -Wall -Wextra -DVERSION="0.05.15" -O2 -DHAVE_LIB_CRYPT -DHAVE_LIB_RT -DHAVE_LIB_PTHREAD -DHAVE_FLOAT_DECIMAL -c -o stress-fstat.o stress-fstat.c
cc -Wall -Wextra -DVERSION="0.05.15" -O2 -DHAVE_LIB_CRYPT -DHAVE_LIB_RT -DHAVE_LIB_PTHREAD -DHAVE_FLOAT_DECIMAL -c -o stress-futex.o stress-futex.c
cc -Wall -Wextra -DVERSION="0.05.15" -O2 -DHAVE_LIB_CRYPT -DHAVE_LIB_RT -DHAVE_LIB_PTHREAD -DHAVE_FLOAT_DECIMAL -c -o stress-get.o stress-get.c
cc -Wall -Wextra -DVERSION="0.05.15" -O2 -DHAVE_LIB_CRYPT -DHAVE_LIB_RT -DHAVE_LIB_PTHREAD -DHAVE_FLOAT_DECIMAL -c -o stress-getrandom.o stress-getrandom.c
cc -Wall -Wextra -DVERSION="0.05.15" -O2 -DHAVE_LIB_CRYPT -DHAVE_LIB_RT -DHAVE_LIB_PTHREAD -DHAVE_FLOAT_DECIMAL -c -o stress-handle.o stress-handle.c
stress-handle.c: In function 'stress_handle':
stress-handle.c:121: error: dereferencing pointer to incomplete type
stress-handle.c:124: error: dereferencing pointer to incomplete type
stress-handle.c:125: warning: implicit declaration of function 'name_to_handle_at'
stress-handle.c:132: error: invalid application of 'sizeof' to incomplete type 'struct file_handle'
stress-handle.c:132: error: dereferencing pointer to incomplete type
stress-handle.c:163: warning: implicit declaration of function 'open_by_handle_at'
RPM build errors:
make: *** [stress-handle.o] Error 1

it compiles fine in oracle linux 7.

Cache Stress

Hi
I use stress-ng for CPU and Memory to stress my server. Now I am traing to use the
stress-ng --cache N --timeout 60
Regarding the 'N', I am not sure how can i chose the best value for my case. I have read in the manual about 'N' in the cache option, whcich say ( start N processes that perform random wide spread memory read and writes to thrash the CPU cache).
How can i know what is the maxumum number that i can choos fo 'N' ?

Failing to cross compile on Debian

I'm currently trying to cross compile on Debian in order to execute stress-ng on a Rpi 3:

export $(dpkg-architecture -aarmhf)
export CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf-gcc
export CCPREFIX=${CROSS_COMPILE}
export CC=${CROSS_COMPILE}
STATIC=1 make -B VERBOSE=1 ARCH=arm

I get the following error:

In file included from stress-access.c:25:0:
stress-ng.h:134:21: fatal error: asm/ldt.h: No such file or directory
 #include <asm/ldt.h>
                     ^
compilation terminated.
Makefile:335: recipe for target 'stress-access.o' failed

Platform:

uname -a
Linux debian 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64 GNU/Linux

Any idea?

stress-ng contains writable and executable sections

Hi, currently I am trying to update stress-ng on Gentoo. It seems, newer versions trigger a Gentoo QA Warning.

  • QA Notice: The following files contain writable and executable sections
  • Files with such sections will not work properly (or at all!) on some
  • architectures/operating systems.
  • --- --- RWX usr/bin/stress-ng

This seems not to be the GNU stack. Any ideas?

stress-ng on Mojave MacOS

Hello!
I am trying to compile on MacOS Mojave (10.14.4) Using Xcode 10.1.
running into these errors on the sockabuse.c
`
CC stress-sockabuse.c

stress-sockabuse.c:78:57: error: too few arguments to function call, expected 6, have 5
VOID_RET(fsetxattr(fd, "test", "value", 5, XATTR_CREATE));
~~~~~~~~~ ^
stress-sockabuse.c:37:12: note: expanded from macro 'VOID_RET'
int ret = x;
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/sys/xattr.h:67:1: note: 'fsetxattr' declared
here
int fsetxattr(int fd, const char *name, const void *value, size_t size, u_int32_t position, int options);
^
stress-sockabuse.c:88:45: error: too few arguments to function call, expected 4, have 3
VOID_RET(flistxattr(fd, list, sizeof(list)));
~~~~~~~~~~ ^
stress-sockabuse.c:37:12: note: expanded from macro 'VOID_RET'
int ret = x;
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/sys/xattr.h:75:1: note: 'flistxattr' declared
here
ssize_t flistxattr(int fd, char *namebuff, size_t size, int options);
^
2 errors generated.
make[1]: *** [stress-sockabuse.o] Error 1
make: *** [all] Error 2

Much appreciate your input.
regards,
Eric

Compilation fails with AppArmor not enabled in Kernel

I am not sure, if this is really a bug. But when I do compile stress-ng and have installed apparmor userland utils, but not enabled in the kernel (kernel options not set), the compilation will fail:

[..]
CC perf.c
CC sched.c
CC setting.c
CC shim.c
CC thermal-zone.c
CC time.c
CC thrash.c
CC stress-ng.c
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
AppArmor parser error for usr.bin.pulseaudio.eg in usr.bin.pulseaudio.eg at line 2: Could not open 'tunables/global'
make[1]: *** [Makefile:339: apparmor-data.o] Error 1
make[1]: Leaving directory '/home/stress-ng-0.09.30'
make: *** [Makefile:310: all_config] Error 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.