Linux压力测试之stressapptest

上一篇谈到使用stress工具进行Linux的压力测试,这篇则使用stressapptest工具进行Linux压测。

1.stressapptest用法

-s: number of second to run the application       测试时间      
-m: number of memory copy threads to run          复制线程数  (Memory Copy)    
-i: number of memory invert threads to run        反转线程数 (Invert Copy)   
-c: CRC check                                     CRC 校验 (Data Check)
-C: number of memory CPU stress threads to run    CPU压力线程数      
-M: Megabytes of ram to run                       尽可能测试最大的可用存储空间,(设置超过了memfree,就会被kill) 

2.使用举例

下面测试100M内存,测试时间100s

stressapptest -M 100 -s 100

测试成功的log

[root@Sweep:/oem]# stressapptest -M 100 -s 3
1970/01/01-00:03:36(UTC) Log: Commandline - stressapptest -M 100 -s 3
1970/01/01-00:03:36(UTC) Stats: SAT revision 1.0.7_autoconf, 64 bit binary
1970/01/01-00:03:36(UTC) Log: hfh @ RobotServer on Sat May  9 12:17:25 CST 2020 from open source release
1970/01/01-00:03:36(UTC) Log: 1 nodes, 4 cpus.
1970/01/01-00:03:36(UTC) Log: Defaulting to 4 copy threads
1970/01/01-00:03:36(UTC) Log: Prefer plain malloc memory allocation.
1970/01/01-00:03:36(UTC) Log: Using mmap() allocation at 0x7fae511000.
1970/01/01-00:03:36(UTC) Stats: Starting SAT, 100M, 3 seconds
1970/01/01-00:03:37(UTC) Log: Region mask: 0x1
1970/01/01-00:03:42(UTC) Stats: Found 0 hardware incidents
1970/01/01-00:03:42(UTC) Stats: Completed: 6556.00M in 5.01s 1309.88MB/s, with 0 hardware incidents, 0 errors
1970/01/01-00:03:42(UTC) Stats: Memory Copy: 6556.00M at 1309.96MB/s
1970/01/01-00:03:42(UTC) Stats: File Copy: 0.00M at 0.00MB/s
1970/01/01-00:03:42(UTC) Stats: Net Copy: 0.00M at 0.00MB/s
1970/01/01-00:03:42(UTC) Stats: Data Check: 0.00M at 0.00MB/s
1970/01/01-00:03:42(UTC) Stats: Invert Data: 0.00M at 0.00MB/s
1970/01/01-00:03:42(UTC) Stats: Disk: 0.00M at 0.00MB/s
1970/01/01-00:03:42(UTC) 
1970/01/01-00:03:42(UTC) Status: PASS - please verify no corrected errors
1970/01/01-00:03:42(UTC) 

你可能感兴趣的:(Linux测试,linux,压力测试,android)