You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//CPU temps
ifstream fcputemp;
fcputemp.open ("/sys/class/thermal/thermal_zone0/temp");
if (fcputemp.is_open()){
getline (fcputemp,cputemp);
fcputemp.close();}
cputemp.erase (cputemp.begin()+2);
cputemp.insert(2,".");
//cputemp = température en string xx.xx C
//CPU load
ifstream fcpustat;
fcpustat.open ("/proc/loadavg");
if (fcpustat.is_open()){
getline (fcpustat,cpustat);
fcpustat.close();}
ret = sscanf(cpustat.c_str(), "%lf",&loadavg);
loadavg = loadavg / 8.0 * 100.0;
//loadavg = charge cpu sur 100 tenant compte que le raspberry a 4 core et 2 thread par core.
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: