Guys,
I did something simple to get the CPU temperature so that I could embed the result in the HTML output of my program.
Written in C code I forked to the command line program that published the CPU temperature but redirected the output to a temporary file. It was then just a question of waiting for completion then parsing the file to get what I needed.
I used a similar trick using "top" to get the CPU loading for my main process and embed the filtered output into my HTML page.
Yes, cheap and dirty and only run when needed so little impact on the day job.
I did something simple to get the CPU temperature so that I could embed the result in the HTML output of my program.
Written in C code I forked to the command line program that published the CPU temperature but redirected the output to a temporary file. It was then just a question of waiting for completion then parsing the file to get what I needed.
I used a similar trick using "top" to get the CPU loading for my main process and embed the filtered output into my HTML page.
Yes, cheap and dirty and only run when needed so little impact on the day job.
Statistics: Posted by RaspISteve — Tue Mar 19, 2024 12:49 pm