Message boards : Questions and problems : --get_host_info
Message board moderation
Author | Message |
---|---|
Send message Joined: 3 Dec 17 Posts: 19 ![]() |
In my terminal, running boinccmd --get_host_info returns along with other information: CPU vendor: ARM CPU model: Hardkernel ODROID-N2 [Impl 0x41 Arch 8 Variant 0x0 Part 0xd03 Rev 4] I have searched and looked and prowled and tried to find where boinccmd finds that information. It's not in proc/stats, it's not in device-tree or what seems like a thousand other places I have looked. Does anyone know where boinccmd plucks this info from? Thanks. |
![]() Send message Joined: 28 Jun 10 Posts: 2829 ![]() |
/proc/cpuinfo? |
Send message Joined: 3 Dec 17 Posts: 19 ![]() |
Thanks, but /proc/cpuinfo doesn't have a model name entry for the N2 |
![]() Send message Joined: 29 Aug 05 Posts: 15625 ![]() |
BOINC uses a call to the HOST_INFO() function to get that information. https://www.gnu.org/software/hurd/gnumach-doc/Host-Information.html https://github.com/BOINC/boinc/blob/f14d96d2be2e5a290177f7b5391b0802fbd3756c/lib/hostinfo.h |
Send message Joined: 3 Dec 17 Posts: 19 ![]() |
Thanks Jord, This looks like the info I am looking for. I'll check it out and report back. Appreciate. |
Send message Joined: 3 Dec 17 Posts: 19 ![]() |
Thanks Jord, I am struggling with this because of my lack of expertise in C++ and my being able to recognize and follow the process flow. I am hoping that you can still help me. I'm thinking HOST_INFO() is much like a function and is therefore called from the main boinc program to assemble and return the host information data. It seems to me by looking at the code that HOST_INFO() assembles an array list of pre-defined and already populated variables. I have been unsuccessful in discovering where those variables that I think I need are originally populated in the BOINC program. I think I need to locate that so that I can discover how the variable is populated and then I can repeat that process in my script. p_vendor; p_model; p_features... I'm assuming those variables. On another note, in my bash script, I was able to make a call to boinccmd --get_host_info and process that, however doing so makes my script dependent on boinccmd and I have to avoid that. As boinccmd does, I should be able to grab that info off the local machine hardware. CPUinfo=$(boinccmd --get_host_info | grep 'CPU model' | head -n 1) CPUinfo=${CPUinfo//"CPU model: "/""} I hope that I am making sense and close to my answer. |
Send message Joined: 3 Dec 17 Posts: 19 ![]() |
I have clone downloaded BOINC onto my Ubuntu machine from GitHub and I've scoured thru it looking for the code definition of where the HOST_INFO() gets called from and where it points to find the CPU info. HOST_INFO seems to be the "assembly area" for variables or registers that are already populated. As well, I've looked thru /proc/xxx and so on.... I am more of a novice and a hobbyist about this but does anyone know if the BOINC main program code is absent from public view? I believe I can make sense of why it would be "Not Available to prying eyes" and if it is I'll just move on and accept it for what it is. Thanks for any insights. |
![]() Send message Joined: 29 Aug 05 Posts: 15625 ![]() |
Client code is found in /client/ at https://github.com/BOINC/boinc?files=1 That's Master code, but should suffice for your purpose. |
![]() ![]() Send message Joined: 17 Nov 16 Posts: 904 ![]() |
I have clone downloaded BOINC onto my Ubuntu machine from GitHub and I've scoured thru it looking for the code definition of where the HOST_INFO() gets called from and where it points to find the CPU info. HOST_INFO seems to be the "assembly area" for variables or registers that are already populated. If you go to the link Jord provided, and just dump your HOST_INFO() into the search bar on that page and tell it search this repository, it spits out multiple pages of where that variable pops up in the multitude of BOINC modules. Hope that is what you are looking for. https://github.com/BOINC/boinc/search?q=HOST_INFO%28%29&unscoped_q=HOST_INFO%28%29 |
Send message Joined: 3 Dec 17 Posts: 19 ![]() |
Thanks Jord and Keith, That's what I needed to find it. Appreciate. |
Copyright © 2025 University of California.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License,
Version 1.2 or any later version published by the Free Software Foundation.