How can these the value of these sensors: CPU temperature, battery voltage, battery current, and fan speed, be read ?
I don't find the right term in the documentation.
if you are looking for a method to get these from the command line check out ioreg
It might take a while to get the output in the format you want, but all the information is there.
Related
I can't figure out how to set up tlp battery threshold, I don't understand their website instructions.
Tlp says my laptop supports battery threshold, If anyone can guide me how to set it up thanks.
Also tlp seem to function directly on terminal.
I am tying to monitor the CPU operating frequencies for individual cores. I am not sure what's the correct way to monitor the CPU frequency both form the kernel level and hardware level reliably with less overhead.
I would highly appreciate if someone could answer couple of questions that I have.
Let's say I am running an application by pinning it on to a core. I would like to monitor whats the frequency it demands during its execution phase (start to end) and capture it. I would want the accurate frequency that it demands from the hardware level (from MSR's might be).
Not sure what's the accurate way to capture this? Is there a way? Are there any tools or command via which I can read the frequency value directly from the MSR's?
I have tried couple of options, not sure if this reflects the correct frequency:
NOTE: I am trying to sample the core's frequency every 10ms, 20ms, 30ms, ..... and so on.
from the kernel level:
I was reading a sysfs file:
cat /sys/devices/system/cpu/cpu2/cpufreq/cpuinfo_cur_freq
Not sure if the above gives the correct frequency value every 10ms, 20ms, etc. Is there any overhead associated by reading this file every 10ms time interval?
Then I was using turbostat command, but this does not tell me what the correct frequency is for a particular core on a specified time interval but rather tells me the busy% etc, but I am looking for an accurate frequency for the sampling time interval that I specify
Questions:
Whats the best and reliable way to monitor CPU frequency from a systems perspective with very low overhead?
Whats the minimum sampling interval time that I can use to monitor CPU frequency (I know this depends on the CPU governors). I am currently assuming and interested for Ondemand power governor being set for the core which I am trying to monitor the CPU frequency.
It would be a great help if someone could guide me.
I assume that you want to track all changes between cpu frequencies on application event basis, not the summary which those sysfs provides:
cpufreq have trace points to track - trace_cpu_frequency(),
and you can add additional custom trace points to track your application's event - e.g. write messages to trace/trace_marker.
you can see the all events recorded including cpufreq TPs and your trace marks after execution.
I'm looking for some bash script which can log all the stuff possible to be useuful for getting to know what makes my laptop's battery drain so fast.
Pointless to ask what can cause my laptop being so no-power efficent, I've been looking for this for some time now.
So, I think I can find something useful if do measure for:
- CPU temp.,
- CPU usage,(average?)
- CPU current speed, (average?)
- Battery status,
- DPM power state (cat /sys/class/drm/card0/device/power_dpm_state)
There are propably more usefull things to record, but these are ma first shot. Can anyone help me with writing this down as a script resulting with one line per measure log file.
Regards!
At this link there's a screen where the BIOS shows the current system voltages on the 3.3V, 5V, and 12V lines. I know that I can access the CPU voltage using WMI's Win32_Process. Is there an equivalent for power supply voltage? Any programmatic or command line method would be acceptable.
I need to measure how long it takes before my code executes a transfer call until the actual packets is sent over the air.
Is this possible using the XCode developer tool "Instruments" or is it best to look for timestamps in my code somewhere?
All help is really appreciated
I have used Packet Analyzer to debug traces over the air (http://www.fte.com/). But it's a very expensive tool.
Otherwise, you won't get a precise measurement. You have no idea, what delays could hardware create.
Although it would be fun to have a look. Set connection intervals of your tag and then check with logging timestamp if the delta you get is similar to delta you set.