public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* Question: How to use systemtap count the total inode read from disk
@ 2014-09-30  2:39 Ma, Jianpeng
  2014-09-30  4:39 ` Dave Chinner
  0 siblings, 1 reply; 2+ messages in thread
From: Ma, Jianpeng @ 2014-09-30  2:39 UTC (permalink / raw)
  To: xfs@oss.sgi.com

Hi all,
  I want to count the total read inode from disk. 
  I count the call number of xfs_dinoe_from_disk.
 But at the same time, I use blktrace to trace all read-meta operation. And using xfs_db to analysis the read-operation. I found more meta-read are read inode.
But the count of systemtap is zero.

The script of systemtap

#! /usr/bin/env stap
global count
function report()
{
  printf("total count %u\n", count)
}
probe module("xfs").function("xfs_dinode_from_disk")
{
  count++
}
probe end
{
  report()
}
probe begin
{
  printf("starting probe\n")
  count = 0
}


Who know why? And How to do which can achieve my aim.


Thanks!

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Question: How to use systemtap count the total inode read from disk
  2014-09-30  2:39 Question: How to use systemtap count the total inode read from disk Ma, Jianpeng
@ 2014-09-30  4:39 ` Dave Chinner
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Chinner @ 2014-09-30  4:39 UTC (permalink / raw)
  To: Ma, Jianpeng; +Cc: xfs@oss.sgi.com

On Tue, Sep 30, 2014 at 02:39:28AM +0000, Ma, Jianpeng wrote:
> Hi all,
>   I want to count the total read inode from disk. 

XFS already does that for you:

$ pminfo -tf xfs.inode_ops.ig_missed

xfs.inode_ops.ig_missed [number of failed in memory inode lookup operations]
    value 1835354
$

And that's the number read from disk as reported by PCP.  If you
don't have PCP:

$ awk '/ig/ {print $5}' /proc/fs/xfs/stat
1835354
$

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-30  4:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-30  2:39 Question: How to use systemtap count the total inode read from disk Ma, Jianpeng
2014-09-30  4:39 ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox