Please take a look at the file "How to Read SCC Voltages with a RCCE Program" http://communities.intel.com/docs/DOC-5463 Is this helpful?
I haven't tried breaking out part of the sccKit into separate customized programs.
We wanted to have a C program on the cores get voltage values and came up with an admittedly kludgy was of doing it. A RCCE program can use the system() call to run a script that resides on the MCPC. That script can then use ssh to run a program on the MCPC. This program uses popen() to issue the sccBMC –c status command and capture the output. It then writes the output to a file in /shared. The RCCE program can then read that file and get the voltage values.
So, I have a related problem: I would like to measure power consumption for each core. From what I can read from sccGui:
3V3SCC: 3.308 V 20.594 A Input voltage to VRC- this feeds the core
Does multiplying the voltage with current give me total power for all 48 cores? Also, is there a way of knowing the breakdown (or calculating it) for each core?
Also, I would like to do this in a script, so any programming based methods will be very useful. We have only remote access to SCC.
Also, for measure CPU usage, one way would be to read /proc/stat. Is this recommended (and only) way for the SCC cores? Has anyone tried this? If yes, can you please share your experience here?
I think the 3V3SCC shows the power for the 48 cores and the mesh, so multiplying the current and voltage gives the instant power used by the chip. This is exactly what the Performance Monitor inside the GUI is doing when it gives the power reading. More precisely, it calls "sccBmc -c status" and looks for the 3V3SCC line to extract those two values and compute the power.
What I ended up doing is have a batch program that calls "sccBmc -c status" continuously and stores the output in a file, and used Matlab to extract the values from that file. It's very complicated, and the highest rate you can get to is 3-4 measurements per second, so not very fine grained, but this is is what the sccPerf widget is doing as well.
As for the power breakdown of each core, I would like to know that myself. I couldn't find a way to obtain a breakdown, and as of now it doesn't seem possible, since there is no way of probing the current of each core/tile.
Hope this helps,