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

[state_controller,websocket,www] CPU,RAM,HDD info via websocket & dashboard #44

Closed
Ddoiron-cidco opened this issue Jan 21, 2020 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@Ddoiron-cidco
Copy link
Contributor

https://github.com/ethz-asl/ros-system-monitor

c'Est une version en phyton qui pourais etre réviser en C.

@glabmoris
Copy link
Collaborator

On peut tirer tout ca via websocket

@glabmoris glabmoris reopened this Jan 21, 2020
@glabmoris glabmoris changed the title [Ajout] CPU,RAM,HDD info [Ajout] CPU,RAM,HDD info via websocket & dashboard Jan 21, 2020
@glabmoris glabmoris changed the title [Ajout] CPU,RAM,HDD info via websocket & dashboard [www] CPU,RAM,HDD info via websocket & dashboard Jan 21, 2020
@glabmoris glabmoris added the enhancement New feature or request label Jan 21, 2020
@Ddoiron-cidco
Copy link
Contributor Author

il faut faire un module ros qui vas publier dans un topic ou cest le module du websocket qui vas récuperer les information pour les envoyer ?

@glabmoris
Copy link
Collaborator

glabmoris commented Jan 22, 2020

de #51

//CPU temps
ifstream fcputemp;
fcputemp.open ("/sys/class/thermal/thermal_zone0/temp");
if (fcputemp.is_open()){
getline (fcputemp,cputemp);
fcputemp.close();}
cputemp.erase (cputemp.begin()+2);
cputemp.insert(2,".");
//cputemp = température en string xx.xx C

//CPU load
ifstream fcpustat;
fcpustat.open ("/proc/loadavg");
if (fcpustat.is_open()){
getline (fcpustat,cpustat);
fcpustat.close();}
ret = sscanf(cpustat.c_str(), "%lf",&loadavg);
loadavg = loadavg / 8.0 * 100.0;
//loadavg = charge cpu sur 100 tenant compte que le raspberry a 4 core et 2 thread par core.

mémoire dispo dans /proc/meminfo

disque dur dans /proc/diskstats

up time dans /proc/uptime

@glabmoris glabmoris changed the title [www] CPU,RAM,HDD info via websocket & dashboard [state_controller,websocket,www] CPU,RAM,HDD info via websocket & dashboard Jan 22, 2020
@Ddoiron-cidco
Copy link
Contributor Author

il faudrais ajouter l'identité des module charger. GPS Hemisphere, Sonar ethernet...

cela vas nous permetre d'Aficher la configuration actuelle de Poseidon

@Ddoiron-cidco
Copy link
Contributor Author

voltage 5v monitor /sys/device/platform/fixedregulator_5V0/regulator/regulator.1/microvolt
voltage 3.3v monitor /sys/device/platform/fixedregulator_3v3/regulator/regulator.2/microvolt

@glabmoris glabmoris self-assigned this Feb 5, 2020
@glabmoris
Copy link
Collaborator

@Ddoiron-cidco il faudrait ajuster les progressbars pour finir cet issue.

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

No branches or pull requests

2 participants