Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] CPU temp display? #24

Open
mpentler opened this issue May 18, 2018 · 3 comments
Open

[Feature request] CPU temp display? #24

mpentler opened this issue May 18, 2018 · 3 comments

Comments

@mpentler
Copy link

Hi, just installed BOINC, found boinctui, even happier that it's now on GitHub and being maintained. It's a great tool.

Could I make a small feature request for a CPU temperature readout? Maybe in the top bar next to the hostname? Or bottom bar somewhere? I tried to hack one in myself but couldn't get anything to display properly (I don't really do C++). I find having a temp readout a really useful thing to give you information on what tasks you need to ease up on, when you can devote a bit more CPU time if things if the load is light, etc.

@mpentler
Copy link
Author

mpentler commented May 20, 2018

Well I hacked one in to mainwin.cpp but it ain’t pretty... :-P

����std::string cpu_temp;
����std::string cmd;
����FILE * stream;
����const int max_buffer = 256;
����char buffer[max_buffer];
����cmd.append("vcgencmd measure_temp");
����stream = popen(cmd.c_str(), "r");
����if (stream)
����{
��������    while (!feof(stream))
    ������������if (fgets(buffer, max_buffer, stream) !$��������pclose(stream);
����}
    �if (srv)
    {
��������caption->append(getcolorpair(COLOR_WHITE,COLOR_BLACK) | A_BOLD," Host %s:%s %s ",srv->gethost(),srv->getport(), cpu_temp.c_str());

Etc...

Sorry for the dodgy characters, not sure what’s happened there...

@mobluse
Copy link

mobluse commented Feb 16, 2021

I would also like the CPU temperature to be shown, but I run Boinc on various CPU:s and OS:s and vcgencmd is specific to Raspberry Pi OS running on a Raspberry Pi. vcgencmd doesn't exist on raspPiOS i386. I can see the CPU temp on both armhf and i386 rasPiOS using "CPU Temperature Monitor" in Panel. There must exist some way to read temperature in at least Linux that doesn't depend on vcgencmd. I switch between the computers I monitor from one computer using N in BoincTUI. I guess it's not enough to add temperature to BoincTUI, but temperature must also be sent from the clients.

@mpentler
Copy link
Author

At the time I didn’t know that it was an RPi-only command, by the way. A better solution is preferred but I’m not sure the developer is working on it anymore. I have a fork which I don’t want to develop anymore and that I want to hand over to someone - if someone wants to add support to that it’d be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants