When a $planCacheStats pipeline is delivered to a mongos, it
will be forwarded to one host in each shard following the
normal host targeting rules for aggregate operations. Each
of the documents returned to the client will be augmented
with "shard" and "host" fields, giving the name of the shard
and the host:port string from which the plan cache metadata
originated.
Allowing clients to collect plan cache information from
every shardsvr in the cluster is left as future work.
As an alternative, use the $planCacheStats aggregation
stage. This metadata source, when placed first in the
pipeline, returns one document per plan cache entry for a
particular collection. This data can then be filtered,
projected, grouped, or otherwise processed with the full
power of MQL.