Hardware Status Monitoring? - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: ROCK64 (https://forum.pine64.org/forumdisplay.php?fid=85) +--- Forum: Linux on Rock64 (https://forum.pine64.org/forumdisplay.php?fid=88) +--- Thread: Hardware Status Monitoring? (/showthread.php?tid=5874) |
Hardware Status Monitoring? - Leapo - 03-20-2018 Is it possible to measure hardware status (core temperature, core voltage, core clock, memory voltage, memory clock, etc.) on the Rock64 under Linux? So far, I've managed to read core temperature and clockspeed, but that's about it. I know vcgencmd works on the Raspberry Pi, and was ported to the Pine64, but I haven't seen anything similar for the Rock64. RE: Hardware Status Monitoring? - evilbunny - 03-20-2018 (03-20-2018, 12:48 PM)Leapo Wrote: Is it possible to measure hardware status (core temperature, core voltage, core clock, memory voltage, memory clock, etc.) on the Rock64 under Linux? So far, I've managed to read core temperature and clockspeed, but that's about it. Do you know about this script? /usr/local/sbin/rock64_diagnostics.sh RE: Hardware Status Monitoring? - pfeerick - 03-21-2018 (03-20-2018, 12:48 PM)Leapo Wrote: Is it possible to measure hardware status (core temperature, core voltage, core clock, memory voltage, memory clock, etc.) on the Rock64 under Linux? So far, I've managed to read core temperature and clockspeed, but that's about it. Readily available is the cpu temperature and cpu frequency - as reported by rock64_health.sh or rock64_diagnostics.sh You can get the voltage (in microvolts) of the cpu here : /sys/class/regulator/regulator.7/microvolts It used to be regulator.4, but it seems that is now for one of the USB ports. Code: eval cat /sys/class/regulator/regulator.{0..12}/name A lazy test of Code: eval cat /sys/class/regulator/regulator.{0..12}/microvolts Code: #!/bin/bash I'm not sure what the other regulators are controlling... you might be able to work backwards from the names through the schematic to see what they are hooked up to... assuming the names are right... RE: Hardware Status Monitoring? - Leapo - 03-21-2018 (03-20-2018, 09:35 PM)evilbunny Wrote: Do you know about this script? Hadn't seen that before, but it uses the same method I'd already figured-out to get CPU clockspeed and CPU Temperature. Doesn't appear to pull any of the other stats I'm after, though. (03-21-2018, 05:28 AM)pfeerick Wrote: You can get the voltage (in microvolts) of the cpu here : /sys/class/regulator/regulator.7/microvolts That was incredibly helpful, and got me on the right track, thank you! Quick reference of the monitoring points I've discovered so-far: CPU Temp: /sys/class/thermal/thermal_zone0/temp CPU Volts: /sys/class/regulator/regulator.5/microvolts CPU Freq: /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq GPU Freq: /sys/devices/platform/ff300000.gpu/devfreq/ff300000.gpu/cur_freq SYS Volts: /sys/class/regulator/regulator.3/microvolts For clarification, "SYS Volts" appears to be the 5v input that the Rock64 runs from (Handy for making sure your power supply is up to scratch). And you're right, it looks like the buck converter handling the memory isn't reporting voltage. That's kinda concerning... From the specs, it should be running at 1.2 or 1.25v for DDR3LP, but getting the real voltage would be nice. RE: Hardware Status Monitoring? - NicoD - 03-31-2018 I wrote this C program to monitor the CPU temp. Just put it in Geany or another C compiler, save it as a *.c file, I call it tempCheck.c Then compile it and run it. Code starts after this. #include <stdio.h> #include <stdlib.h> #include <time.h> void sleep_ms(int milliseconds) { struct timespec ts; ts.tv_sec = milliseconds / 1000; ts.tv_nsec = (milliseconds % 1000) * 1000000; nanosleep(&ts, NULL); } int main() { int nanosleep(const struct timespec * req, struct timespec * rem); FILE *temperature; double T; while(1) { temperature = fopen("/sys/class/thermal/thermal_zone0/temp", "r"); if(temperature == NULL) { printf("Can't measure the cpu temperature"); } else { fscanf(temperature, "%lf", &T); T /= 1000; system("clear"); printf("The cpu temperature is %6.3f C.\n", T); fclose(temperature); sleep_ms(500); } }return 0; } RE: Hardware Status Monitoring? - PopcornMaker - 06-25-2019 (03-31-2018, 06:30 PM)NicoD Wrote: I wrote this C program to monitor the CPU temp. Just put it in Geany or another C compiler, save it as a *.c file, I call it tempCheck.cThank you ! RE: Hardware Status Monitoring? - default_user8 - 06-30-2019 [attachment=1374][attachment=1374] (03-20-2018, 12:48 PM)Leapo Wrote: Is it possible to measure hardware status (core temperature, core voltage, core clock, memory voltage, memory clock, etc.) on the Rock64 under Linux? So far, I've managed to read core temperature and clockspeed, but that's about it. RE: Hardware Status Monitoring? - bendem - 03-15-2020 (03-31-2018, 06:30 PM)NicoD Wrote: I wrote this C program to monitor the CPU temp. Just put it in Geany or another C compiler, save it as a *.c file, I call it tempCheck.c For those that don't want to compile a program, this can be done in two lines of bash ;-) : Code: temp=$(cat /sys/class/thermal/thermal_zone0/temp) |