Included with collectl is the example file hello.ph which is a collectlized version of hello world. It simulates a hw subsystem consisting of 3 hw instances, which in turn report a single counter. Here is an example of its simulated /proc data, which is shown by using -d4. Also notice in this case the discriminator is hw but -n is also included in the calls to record() to further identify individual devices:
collectl --imp hello -d4 >>> 1238167880.003 <<< hw-0 HelloWorld 0 hw-1 HelloWorld 10 hw-2 HelloWorld 40
collectl --imp hello -sc -oTm # <--------CPU--------><-Hello-> #Time cpu sys inter ctxsw Total 11:40:29.002 0 0 1027 126 140 11:40:30.002 0 0 1012 138 230
updated Feb 21, 2011 |