--get_host_info

Message boards : Questions and problems : --get_host_info
Message board moderation

To post messages, you must log in.

AuthorMessage
additude
Avatar

Send message
Joined: 3 Dec 17
Posts: 19
United States
Message 93493 - Posted: 3 Nov 2019, 10:58:23 UTC

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.
ID: 93493 · Report as offensive     Reply Quote
Profile Dave
Help desk expert

Send message
Joined: 28 Jun 10
Posts: 562
United Kingdom
Message 93494 - Posted: 3 Nov 2019, 11:23:12 UTC - in response to Message 93493.  

/proc/cpuinfo?
ID: 93494 · Report as offensive     Reply Quote
additude
Avatar

Send message
Joined: 3 Dec 17
Posts: 19
United States
Message 93498 - Posted: 3 Nov 2019, 14:44:01 UTC - in response to Message 93494.  

Thanks, but /proc/cpuinfo doesn't have a model name entry for the N2
ID: 93498 · Report as offensive     Reply Quote
Profile Jord
Volunteer moderator
Project administrator
Avatar

Send message
Joined: 29 Aug 05
Posts: 13471
Netherlands
Message 93501 - Posted: 3 Nov 2019, 18:57:12 UTC

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
Please do not private message me for tech support, these will be ignored!

Do as I say, don't do as I do.
ID: 93501 · Report as offensive     Reply Quote
additude
Avatar

Send message
Joined: 3 Dec 17
Posts: 19
United States
Message 93504 - Posted: 3 Nov 2019, 19:03:51 UTC - in response to Message 93501.  

Thanks Jord,
This looks like the info I am looking for.
I'll check it out and report back.
Appreciate.
ID: 93504 · Report as offensive     Reply Quote
additude
Avatar

Send message
Joined: 3 Dec 17
Posts: 19
United States
Message 93515 - Posted: 4 Nov 2019, 11:15:41 UTC - in response to Message 93504.  

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.
ID: 93515 · Report as offensive     Reply Quote
additude
Avatar

Send message
Joined: 3 Dec 17
Posts: 19
United States
Message 93598 - Posted: 9 Nov 2019, 14:09:28 UTC - in response to Message 93515.  

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.
ID: 93598 · Report as offensive     Reply Quote
Profile Jord
Volunteer moderator
Project administrator
Avatar

Send message
Joined: 29 Aug 05
Posts: 13471
Netherlands
Message 93603 - Posted: 9 Nov 2019, 20:22:44 UTC - in response to Message 93598.  

Client code is found in /client/ at https://github.com/BOINC/boinc?files=1

That's Master code, but should suffice for your purpose.
Please do not private message me for tech support, these will be ignored!

Do as I say, don't do as I do.
ID: 93603 · Report as offensive     Reply Quote
Profile Keith Myers
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 17 Nov 16
Posts: 309
United States
Message 93605 - Posted: 10 Nov 2019, 1:48:05 UTC - in response to Message 93598.  

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.

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
ID: 93605 · Report as offensive     Reply Quote
additude
Avatar

Send message
Joined: 3 Dec 17
Posts: 19
United States
Message 93626 - Posted: 11 Nov 2019, 14:41:59 UTC

Thanks Jord and Keith,

That's what I needed to find it.

Appreciate.
ID: 93626 · Report as offensive     Reply Quote

Message boards : Questions and problems : --get_host_info

Copyright © 2020 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.