fs_usage, output display regarding io call - the options and flags shown
0
votes
2
answers
85
views
I am summarising output from fs_usage with a simple awk to total io calls, io time including wait (I believe):
sudo fs_usage -f diskio | awk 'START{print "Times include async wait time"}{if(lasT>=$1){t=substr($0,110,8);ioc++;ioT+=t;appio[$NF" "$2]++;apIOT[$NF" "$2]+=t} else {if(ioc>last_ioc){print "\n"ioc" IOs\t∑s",ioT"\t"$1; for (x in appio){print appio[x]" \t"apIOT[x]" \t",x} ;n=0; ioc=0; ioT=0; split("",appio); split("",apIOT);last_ioc=ioc }}; lasT=$1}' &
This gives a useful summary any second that there is physical IO but I have to guess what the [content] after call type is, here is a sample...
244 IOs ∑s 0.195188 12:26:18
1 0.001309 cfprefsd WrData[AT1]
1 0.000293 corespotlighRdData[SNT3]
5 0.117798 corespotligh THROTTLED
173 0.063006 kernel_task WrMeta[AP]
20 0.005587 coreduetd RdData[AT1]
1 0.000214 corespotligh WrData[ANT3]
1 0.00015 cfprefsd WrData[AP]
40 0.006412 coreduetd WrData[AT1]
2 0.000419 corespotligh WrData[AT3]
Here are a few guesses,
First A=async, S=Sync
T = time-out set? 123 maybe secs for timeout
P=privileged, physical?
N=??
Can anyone confirm/correct these and maybe list others that might seen?
I found a reference to the source code for fs_usage but it was a 404...
I always assume sorting the keyed array output is too much trouble or impossible, am I missing a trick?
I also do not get my START header information visible, why?
For others that might find this info useful: where and how is THROTTLING implemented? Obviously io calls are completed more slowly... It seems odd not to discriminate Write [WTHROTTL] from Read [RTHROTTL].
Asked by colin
(79 rep)
Sep 1, 2024, 12:11 PM
Last activity: May 29, 2025, 04:06 PM
Last activity: May 29, 2025, 04:06 PM