Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a simple ZFS setup at home, four disks mirrored, 8GB ram and 120GB Intel X25-M SSD for L2ARC. I ran zpool add poolname cache cXtXdX then generated load and eagerly tracked the warming process by running zpool iostat -v mypool. A few hours later, the L2ARC is full, but what exactly has been cached?

Can I peek in and see what's in my ARC/L2ARC? I understand that certain blocks would map to multiple filesystems (due to snapshots, cloning or dedup) but I'd still like to sample the statistics like these:

  • Type of block cached: metadata. iSCSI, data. etc.
  • Age: How long has each block been in the L2ARC
  • Which files: directories that have some of their contents cached
  • Filesystem breakdown: GB cached per filesystem
  • Location of non-volatile copies of blocks (which drive/vdev)

I'd imagine zdb and/or dtrace would be the tools de jour, but don't really know where to start.

share|improve this question
There is a excellent blog entry by Brendan Gregg that answers some of your points. – Iain Jan 30 '11 at 9:17
Check the script linked in my answer. – ewwhite Jan 7 '12 at 0:19
The blog entry by Brendan Gregg has moved: ZFS L2ARC – Marco Jul 13 '13 at 15:30
up vote 1 down vote accepted

Here's a script that's been updated to reflect the data in L2ARC.


Source available here:

share|improve this answer

I would probably argue that you should care not about what's in the cache, but whether the most effective things have been cached. Ie, is the ARC cache being used to its maximum efficiency?

I run a small-scale (9TB) ZFS implementation at work and I find Ben Rockwood's tool, and Sun's, both detailed in this cuddletech blog post, to be immensely useful.

I know it doesn't answer your question directly about what exactly is in the ARC cache, but these should give you some solid data about how your cache is being used, and whether you're in need of more memory/SSD space.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.