/*
* This file and its contents are supplied under the terms of the
* Common Development and Distribution License ("CDDL"), version 1.0.
* You may only use this file in accordance with the terms of version
* 1.0 of the CDDL.
*
* A full copy of the text of the CDDL should have accompanied this
* source. A copy of the CDDL is also available via the Internet at
*/
/*
* Copyright (c) 2015, 2016 by Delphix. All rights reserved.
*/
/*
* prefetch_ios: Number of IOs the prefetcher issued
* @c["prefetched_demand_reads"]: Number of demand reads already prefetched
* @c["sync_wait_for_async"]: Number of times sync IO waited for prefetch IO
* @s["demand"]: Number of non-prefetch read IOs
* @s["logical"]: Logical (uncompressed) bytes read per interval
* @s["physical"]: Physical (compressed) bytes read per interval
*/
#pragma D option aggsortkey
#define SPA_MINBLOCKSHIFT 9
{
@s["demand"] = sum(0);
@s["logical"] = sum(0);
@s["physical"] = sum(0);
@c["prefetched_demand_reads"] = count();
@c["sync_wait_for_async"] = count();
clear(@s);
clear(@c);
}
{
@c["prefetched_demand_reads"] = count();
}
{
@c["sync_wait_for_async"] = count();
}
{
}
tick-$2s
{
printa("%-24s\t%@u\n", @s);
printa("%-24s\t%@u\n", @c);
clear(@s);
clear(@c);
}
{
}