FPC commandline read CPU utilization lazarus / 32-Linux ---------------------------------------------------------------------- pascalbythree · 2022-05-14 16:47 Does anybody have a component name or example code to monitor the CPU utilization of my Raspberry for FPC in the command line? Maybe i can strip a component ? NumCPULib4Pascal only reads the processor count, and RPI_HAL does not have utilization percentages in it. https://www.pragmaticlinux.com/2020/06/check-the-raspberry-pi-cpu- temperature/ This URL is only for temperature. Does anybody have alternatives? Greets, Wouter van Wegen ---------------------------------------------------------------------- Thausand · 2022-05-15 11:32 Maybe you can make use: https://www.idnt.net/en-GB/kb/941772 Linux say: everything is file, so can open /proc/stat like file, read text, convert like number, make math as link write and print answer. ---------------------------------------------------------------------- Thausand · 2022-06-04 13:49 May be for you translate difficult ? This literal translate: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program linux_cpu; // https://www.idnt.net/en-GB/kb/941772{$MODE OBJFPC}{$H+}uses sysutils; function givehead:string;var  head: string absolute givehead;  procstatfile:Text;  oldfilemode:longint;begin  head:='';  oldfilemode:=FileMode;  Filemode:=fmOpenread;  Assign(procstatfile,'/proc/stat');  Reset(procstatfile);  ReadLn(procstatfile,head);  Close(procstatfile);  FileMode:=oldfilemodeend; procedure cpu_utilization(times:integer=100);type  tcpu_values=array[1..9]of longint;var  i,n:integer;  timesleft:boolean;  head:string;   cpu_now,  cpu_last:tcpu_values;  cpu_sum,  cpu_last_sum,  cpu_delta,  cpu_idle,  cpu_used:longint;  cpu_usage:single;begin  n:=0;  timesleft:=n