earlephilhower / ezfio

Simple NVME/SAS/SATA SSD test framework for Linux and Windows
GNU General Public License v2.0
166 stars 52 forks source link

FIO accasionally writes info to stdout - resulting in failure to parse json #38

Closed BryanTuttle closed 4 years ago

BryanTuttle commented 4 years ago

Running on a newer AMD server and FIO has some problem with affiinity. The result are lines written to stdout with the format:

CPU mask cannot bind CPUs (e.g. 64, 191) that are in different processor groups CPU mask cannot bind CPUs (e.g. 64, 191) that are in different processor groups

This comes after the fio cmdline is written to the output file and before the fio jscon. The result if an error as ConvertFrom-Json sees improperly formatted text.

I fixed this in exfio.ps1 by adding

$LineSkip=0
foreach ($line in Get-Content $testfile) { if ($line -match '^{') {break} else {$LineSkip++} }

$j = ConvertFrom-Json "$(Get-Content $testfile | select -Skip $LineSkip)"

Around line 695. Instead of just skip 1, skip to the open json brace .

earlephilhower commented 4 years ago

Thanks for the heads-up! I'll throw in a patch after some testing.