OutsideIT / FireMotD

:fire: Fire Framework Linux MoTD Generator :fire:
https://outsideit.net/firemotd
GNU General Public License v3.0
174 stars 45 forks source link

CPU counter not working in OpenVZ #38

Closed dimon222 closed 7 years ago

dimon222 commented 7 years ago

Getting this: lscpu: failed to determine number of CPUs: /sys/devices/system/cpu/possible: No such file or directory

Debian 7 (Jessie) OpenVZ

Currently digging on VPS, maybe its hidden by hypervisor.

dimon222 commented 7 years ago

Apparently throws this error when "lscpu" is ran, so next values are not shown as the result of error: https://github.com/willemdh/FireMotD/blob/master/FireMotD#L283-L286 image

dimon222 commented 7 years ago

Yeah, seem to be related to specifically OpenVZ container. People are suggesting to use cpuinfo as alternative. Here's sample code https://github.com/apache/incubator-trafodion/pull/73/files