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

CPU info for i386 Linux. #22

Closed
Bexounet opened this issue Mar 21, 2016 · 2 comments
Closed

CPU info for i386 Linux. #22

Bexounet opened this issue Mar 21, 2016 · 2 comments
Assignees
Milestone

Comments

@Bexounet
Copy link

Bonjour,

Je suis en train de travailler sur la détection de CPU sous linux i386 pour notre parc serveurs (je m'attaquerai à l'avenir peut-être à celle d'AIX et de Solaris, si besoin).

L'objectif premier de mon employeur est d'avoir un décompte de CPU(socket)/Core/Logical_CPU fiable, car ces informations sont stratégiques vis-à-vis des licences facturées par Core (par exemple Oracle).

Pour nous, le reste des infos (voltage, type de socket, etc...) est donc vu comme facultatif, car non utilisé par nos service IT.
Nous avons donc choisi de refondre et simplifier le code lié au CPU (d'abord parce que je n'ai pas fait de Perl depuis 15 ans et aussi que je ne suis pas expert system Unix) avant de l'enrichir en fonctionnalités et converger vers une version qui serait acceptable par l'équipe projet OCS.
Je suis partis de la version de @MikkelPaulson : https://github.com/MikkelPaulson/OCSInventory-NG-UnixAgent/blob/2886b41203ef27e202cf3219fbb649ed64e9364a/lib/Ocsinventory/Agent/Backend/OS/Linux/Archs/i386/CPU.pm

Après l'analyse du code de l'agent, il semble que 2 propriétés gérées par le serveur OCS ne le sont pas pour l'instant par l'agent UNIX :

LOGICAL_CPU et CURRENT_ADDRESS_WIDTH ne sont en effet pas remontés par l'agent Unix.

L'info LOGICAL_CPU correspond, selon ma compréhension des choses, à l'info "siblings" de /proc/cpuinfo

Par contre, je me demande ce qui doit être remonté dans CURRENT_ADDRESS_WIDTH ? Sous Linux i386, est-on toujours avec DATA_WIDTH = CURRENT_ADDRESS_WIDTH, et sinon, où est-on susceptible de trouver cette info ?

Je vous remercie de vos éléments de réponses éventuels, cela me permettra de continuer de travailler sur les fichiers CPU.pm et Common.pm de l'agent Unix et de contribuer plus efficacement.

Mes travaux sont ici : master...Bexounet:master


I'm working on CPU detection on Linux i386. (Next investigation will be Solaris and AIX).

The first aim of my corporation is to have a trustable count of CPU(socket)/Core/Logical_CPU. This information is strategic because of software licence (like Oracle).

For my corporation other information (voltage, Socket type, ...) are optional or irrelevant (because nobody use these information in our IT services).

We choose to simplify the code (because I’m a newbie in Perl and I’m not an expert in Unix System admin) , and then add the functionality to be able to merge our code with the code of the OCS team.

I started with @MikkelPaulson ‘s code. : https://github.com/MikkelPaulson/OCSInventory-NG-UnixAgent/blob/2886b41203ef27e202cf3219fbb649ed64e9364a/lib/Ocsinventory/Agent/Backend/OS/Linux/Archs/i386/CPU.pm
After an analyse of the agent’s code, it seems that 2 property the OCS server manage aren’t managed by the Unix Agent.
LOGICAL_CPU and CURRENT_ADDRESS_WIDTH aren’t managed by the Unix agent
LOGICAL_CPU seems to be the "siblings" information of the /proc/cpuinfo

But, what about CURRENT_ADDRESS_WIDTH ? On Linux i386, is DATA_WIDTH equal to CURRENT_ADDRESS_WIDTH ? And if not, where the information is available ?

Thanks for your answers; they will allow me to contribute and improve the CPU.pm and Common.pm.

My work is here : master...Bexounet:master

@gillesdubois gillesdubois added this to the 2.2RC milestone Mar 22, 2016
@gillesdubois gillesdubois self-assigned this Mar 22, 2016
@fbomj
Copy link
Contributor

fbomj commented Jul 13, 2016

Bonjour,
Les modifications proposées ont été intégrées dans la branche master.
Cordialement

@fbomj fbomj closed this as completed Jul 13, 2016
@Bexounet
Copy link
Author

Je ne suis pas d'accord. Le sujet ici, concerne la propriété CURRENT_ADDRESS_WIDTH, qui n'est pas encore gérée.

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

No branches or pull requests

3 participants