System information

Perfmon2—Hardware-Based Performance Monitoring 99
pfmon --cpu-list=0-1 --system-wide -u -e
CPU_OP_CYCLES_ALL,IA64_INST_RETIRED -- ls -l /dev/null
crw-rw-rw- 1 root root 1, 3 27. Mär 03:30 /dev/null
CPU0 38925 CPU_OP_CYCLES_ALL
CPU0 7510 IA64_INST_RETIRED
CPU1 9825 CPU_OP_CYCLES_ALL
CPU1 1676 IA64_INST_RETIRED
3 Press the Enter key to stop a session:
4 If you want to aggregate counts, use the -aggr option after the previous com-
mand:
pfmon --cpu-list=0-1 --system-wide -u -e
CPU_OP_CYCLES_ALL,IA64_INST_RETIRED --aggr
<press ENTER to stop session>
52655 CPU_OP_CYCLES_ALL
53164 IA64_INST_RETIRED
7.3.3 Monitoring Running Tasks
Perfmon can also monitor an existing thread. This is useful for monitoring system
daemons or programs which take a long time to start. First determine the process ID
you wish to monitor:
ps ax | grep foo
10027 pts/1 R 2:23 foo
Use the found PID for the --attach-task option of pfmon:
pfmon --attach-task=10027
3682190 CPU_OP_CYCLES_ALL
7.4 Retrieving Metrics From
DebugFS
Perfmon can collect statistics which are exported through the debug interface. The
metrics consists of mostly aggregated counts and durations.
Access the data through mounting the debug file system as root under /sys/ker
nel/debug