hi,
Anyone looking for tools for monitoring the XFS statistics
might be interested in the announcement below. Also, if you
want to massage the XFS/procfs statistics file into Ted's
original XFS/procfs file format, I've added a script at the
end which does just that.
cheers.
--- Forwarded mail from Mark Goodwin <markgw@xxxxxxx>
Date: Fri, 16 Jun 2000 11:17:50 +1000 (EST)
From: Mark Goodwin <markgw@xxxxxxx>
To: pcp@xxxxxxxxxxx
cc: sgi.engr.pcp@xxxxxxxxxxxxxxxxxxxx, linux-perf@xxxxxxxxxxxxxxxxxxxxxxx,
beowulf@xxxxxxxxxxxxxxxxxxxxx
Subject: [ANNOUNCE] PCP-2.1.7-2 now available
SGI is pleased to announce the new version of Performance Co-Pilot (PCP)
open source (version 2.1.7-2) is now available for download from
http://oss.sgi.com/projects/pcp/download
There are binary RPMS for ia32 and ia64, the source RPM and tar.gz files.
The source is also known build and work for Linux-ppc and Linux-alpha.
The PCP homepage is at http://oss.sgi.com/projects/pcp and you can join
the PCP mailing list via http://oss.sgi.com/projects/pcp/mail.html
Changes since the last public release (2.1.4) include :-
Adjustments to tolerate SuSE's location of magic file (different
than Redhat's) and the lack of chkconfig on SuSE, migration of all
__clone use to pthreads to improve portability (especially to IA64),
support for RAID disk stats and devfs-style SCSI disk names, new XFS
metrics extracted from /proc/fs/xfs/stat, NFS (version 3) metrics,
use of -Wall in CFLAGS, and numerous bug fixes.
To use the new XFS metrics, obviously you need a kernel that supports
XFS - see http://oss.sgi.com/projects/xfs/cvs_download.html or join the
XFS mailing list via http://oss.sgi.com/projects/xfs/mail.html
In addition, there is a new PCP monitoring tool available "PCPMON"
from Michal Kara http://freshmeat.net/appindex/2000/05/15/958381663.html
and a new PCP agent for MYSQL Databases, also from Michal.
SGI would be delighted to hear from anyone wanting to contribute to the
PCP project (especially new monitoring tools), and will provide technical
assistance getting your project off the ground.
thanks
-- Mark Goodwin
SGI Engineering
---End of forwarded mail from Mark Goodwin <markgw@xxxxxxx>
[root@troppo ~]# cat jtkstats
#!/usr/bin/perl -w
use strict;
#
# Display raw XFS statistics from one of these sources:
# o /proc/fs/xfs/stat (the default)
# o pmcd on host, via (pmprobe) -h <host>
# o PCP archive, via (pmprobe) -a <archive>
#
use vars qw( @values @tmp );
my $file = '/proc/fs/xfs/stat';
unless (defined(@ARGV)) { # use the XFS/procfs statistics file directly
open(STATS, $file) || die "$file: $!";
while (<STATS>) {
chomp;
/^(extent_alloc|abt|blk_map|bmbt|dir|trans|ig|log|push_ail|xstrat|rw|attr|qm|icluster|vnodes|xpc)/
|| next; #die "Unrecognised line in $file:\n\t'$_'\n";
foreach (split(' ', $')) {
push @values, sprintf("%11s", $_);
}
}
@tmp = @values[75..77]; # reorder some items to get Ted's format..
splice(@values, 75);
splice(@values, 48, 0, ($tmp[0]));
splice(@values, 52, 0, ($tmp[1]));
splice(@values, 54, 0, ($tmp[2]));
}
else { # source values from pmprobe (host/archive)
open(STATS, "/usr/bin/pmprobe -v @ARGV xfs |") || die "pmprobe: $!";
while (<STATS>) {
my @result = split(' ', $_);
( $#result == 2 ) || die "pmprobe - $_";
push @values, sprintf("%11s", $result[2]);
}
@tmp = @values[0..6]; # reorder some items to get Ted's format..
splice(@values, 0, 7);
splice(@values, 51, 0, @tmp[0..3]);
splice(@values, 67, 0, @tmp[4..6]);
}
($#values == 77) || die "Found $#values XFS values, expected 77";
print <<EOF;
XFS Statistics
Extent Allocation Tail-Pushing Stats
xs_allocx............ $values[ 0] xs_sleep_logspace..... $values[39]
xs_allocb............ $values[ 1] xs_try_logspace....... $values[38]
xs_freex............. $values[ 2] xs_push_ail........... $values[40]
xs_freeb............. $values[ 3] xs_push_ail_success... $values[41]
Allocation Btree xs_push_ail_pushbuf... $values[42]
xs_abt_lookup........ $values[ 4] xs_push_ail_pinned.... $values[43]
xs_abt_compare....... $values[ 5] xs_push_ail_locked.... $values[44]
xs_abt_insrec........ $values[ 6] xs_push_ail_flushing.. $values[45]
xs_abt_delrec........ $values[ 7] xs_push_ail_restarts.. $values[46]
Block Mapping xs_push_ail_flush..... $values[47]
xs_blk_mapr.......... $values[ 8] IoMap Write Convert
xs_blk_mapw.......... $values[ 9] xs_xstrat_bytes....... $values[48]
xs_blk_unmap......... $values[10] xs_xstrat_quick....... $values[49]
xs_add_exlist........ $values[11] xs_xstrat_split....... $values[50]
xs_del_exlist........ $values[12] Read/Write Stats
xs_look_exlist....... $values[13] xs_write_calls........ $values[51]
xs_cmp_exlist........ $values[14] xs_write_bytes........ $values[52]
Block Map Btree xs_read_calls......... $values[53]
xs_bmbt_lookup....... $values[15] xs_read_bytes......... $values[54]
xs_bmbt_compare...... $values[16] Attribute Operations
xs_bmbt_insrec....... $values[17] xs_attr_get........... $values[55]
xs_bmbt_delrec....... $values[18] xs_attr_set........... $values[56]
Directory Operations xs_attr_remove........ $values[57]
xs_dir_lookup........ $values[19] xs_attr_list.......... $values[58]
xs_dir_create........ $values[20] Quota Operations
xs_dir_remove........ $values[21] xs_qm_dqreclaims...... $values[59]
xs_dir_getdents...... $values[22] xs_qm_dqreclaim_misses $values[60]
Transactions xs_qm_dquot_dups...... $values[61]
xs_trans_sync........ $values[23] xs_qm_dqcachemisses... $values[62]
xs_trans_async....... $values[24] xs_qm_dqcachehit...... $values[63]
xs_trans_empty....... $values[25] xs_qm_dqwants......... $values[64]
Inode Operations xs_qm_dqshake_reclaims $values[65]
xs_ig_attempts....... $values[26] xs_qm_dqinact_reclaims $values[66]
xs_ig_found.......... $values[27] Inode Clustering
xs_ig_frecycle....... $values[28] xs_iflush_count....... $values[67]
xs_ig_missed......... $values[29] xs_icluster_flushcnt.. $values[68]
xs_ig_dup............ $values[30] xs_icluster_flushinode $values[69]
xs_ig_reclaims....... $values[31] Vnode Statistics
xs_ig_attrchg........ $values[32] vn_active............. $values[70]
Log Operations vn_alloc.............. $values[71]
xs_log_writes........ $values[33] vn_get................ $values[72]
xs_log_blocks........ $values[34] vn_hold............... $values[73]
xs_log_noiclogs...... $values[35] vn_rele............... $values[74]
xs_log_force......... $values[36] vn_reclaim............ $values[75]
xs_log_force_sleep... $values[37] vn_remove............. $values[76]
vn_free............... $values[77]
EOF
[root@troppo ~]#
--
Nathan
|