一、介绍
Stressful Application Test(或stressapptest)试图最大化处理器和I/O到内存的随机流量,目的是创建一个现实的高负载情况。
stressapptest可以用于各种目的:
- 压力测试
- 硬件鉴定和调试。
- 内存接口测试。
- 磁盘测试
二、移植
下载:
https://github.com/stressapptest/stressapptest
或者
https://gitcode.net/mirrors/stressapptest/stressapptest?utm_source=csdn_github_accelerator
编译:
ubuntu下编译:
#1、添加交叉编译工具链到环境变量:XXX是你交叉编译工具链路径
export PATH=/XXX/usr/bin:$PATH
#注意:这样添加的环境变量只在当前窗口可用。
#2、编译
cd stressapptest-master/
./configure --host=XXX
#注意:XXX是你的目标主机。也就是你交叉编译工具链gnu前缀。比如你的交叉编译工具链是:aarch64-linux-gnu-gcc,那XXX就是aarch64-linux-gnu
make
测试:
编译生成的工具在src目录下的stressapptest,push到开发板上进行测试:
要执行,典型的命令是:
./stressapptest -s 20 -M 256 -m 8 -W # Test 256MB, running 8 "warm copy" threads. Exit after 20 seconds.
./stressapptest --help # list the available arguments.
常见参数:
- -M mbytes : megabytes of ram to test (auto-detect all memory available)
- -s seconds : number of seconds to run (20)
- -m threads : number of memory copy threads to run (auto-detect to number of CPUs)
- -W : Use more CPU-stressful memory copy (false)
- -n ipaddr : add a network thread connecting to system at 'ipaddr'. (none)
- --listen : run a thread to listen for and respond to network threads. (0)
- -f filename : add a disk thread with tempfile 'filename' (none)
- -F : don't result check each transaction, use libc memcpy instead. (false)
错误处理:文章来源:https://www.toymoban.com/news/detail-721810.html
- -l logfile : log output to file 'logfile' (none)
- -v level : verbosity (0-20) (default: 8)
./stressapptest -s 20 -M 256 -m 8 -C 8 -W # Allocate 256MB of memory and run 8 "warm copy" threads, and 8 cpu load threads. Exit after 20 seconds.
./stressapptest -f /tmp/file1 -f /tmp/file2 # Run 2 file IO threads, and autodetect memory size and core count to select allocated memory and memory copy threads.
结果:
文章来源地址https://www.toymoban.com/news/detail-721810.html
到了这里,关于DDR压力测试--stressapptest开源工具编译的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!