AIX Perfstat提供了一个访问主机性能数据的接口, 可以参考libperfstat.h和API接口文档来了解. 在AIX-Perfstat接口中, 每一个API调用都返回一个hash. 先是了解一下, 这个接口提供了那些数据.
cpu_total
processorHZ lwrite sysexec phwrite phread idle
lread ncpus_cfg bwrite sysread writech syswrite
user runque devintrs pswitch sysfork swpque sys
softintrs syscall readch bread ncpus description
loadavg wait lbolt
memory_total
numperm real_free pgsp_rsvd pgexct real_inuse
pgsp_free real_pinned pgspins pgouts pgspouts
pgsp_total real_total cycles scans pgins
pgsteals pgbad virt_total
disk_total
free number time wblks rblks xrate xfers size
netinterface_total
oerrors number collisions opackets ibytes obytes
ipackets ierrors
在AIX 5.3上面, 用C的接口的话可以看到更多的数据, 说明这个接口有些偏老了, 有空时改改.