Well Linux actually has The Linux Hardware Monitoring kernel API https://docs.kernel.org/hwmon/hwmon-kernel-api.html that allows easy and standardized monitoring of computer hardware. It even allows of dumping information to files like the one you are using.
Now I don't know enough about Linux to tell you where and how you can set this up. I do know here are several programs that do make this much easier. And there is available API that you can use directly from your program to retrieve current information. But i haven't seen readily library for pascal so far.
Bookmarks