Você pode executar o seguinte no mesmo shell em que está executando nproc
:
cat /proc/$$/limits
Resultado:
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size 0 unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 15795 15795 processes
Max open files 65536 65536 files
Max locked memory 65536 65536 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 15795 15795 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us
Você pode tentar este comando para ver se alguma das CPUs está offline?
grep "" /sys/devices/system/cpu/cpu*/online
Resultado:
# grep "" /sys/devices/system/cpu/cpu*/online
/sys/devices/system/cpu/cpu1/online:1
/sys/devices/system/cpu/cpu2/online:1
/sys/devices/system/cpu/cpu3/online:1
/sys/devices/system/cpu/cpu4/online:1
/sys/devices/system/cpu/cpu5/online:1
/sys/devices/system/cpu/cpu6/online:1
/sys/devices/system/cpu/cpu7/online:1
Se alguma das CPUs estiver off-line, você pode ativá-la (por exemplo, CPU3) e tentar executar nproc
novamente:
echo 1 > /sys/devices/system/cpu/cpu3/online
Para ativar todas elas, você pode tentar:
for x in /sys/devices/system/cpu/cpu*/online; do
echo 1 >"$x"
done
Você pode tentar os 8 comandos independentemente, um por um (se permission denied
tentar com sudo
):
echo 1 > /sys/devices/system/cpu/cpu1/online
echo 1 > /sys/devices/system/cpu/cpu2/online
echo 1 > /sys/devices/system/cpu/cpu3/online
echo 1 > /sys/devices/system/cpu/cpu4/online
echo 1 > /sys/devices/system/cpu/cpu5/online
echo 1 > /sys/devices/system/cpu/cpu6/online
echo 1 > /sys/devices/system/cpu/cpu7/online