I'm writing a small Linux application which logs the computer's power consumption along with CPU utilisation and disk utilisation. I'd like to add the ability to log memory bandwidth currently being used so I can see how well that correlates with a power consumption.
I understand that I can get information about the amount of memory currently allocated from /proc/meminfo
but, of course, that doesn't tell me how much bandwidth is being used at present. Does anyone know how I could measure memory bandwidth currently in use?
edit I'd like this to work primarily on the x86 and x86-64 platforms
busstat
,cputrack
ortrapstat
to give you many of these figures, but those have never been ported to x86 (nor would they, due to hardware architecture dependency). For Linux, lwn.net/Articles/312720 gives a starting point for how to interact with the performance monitoring counters; the perf project wiki site is perf.wiki.kernel.org/index.php/Main_Page which also gives examples. - FrankH.