Skip to content

Instantly share code, notes, and snippets.

@shannon
Created November 27, 2017 17:51
Show Gist options
  • Save shannon/f35d7cf7d931c2594e2b4fe7a9f9d7a0 to your computer and use it in GitHub Desktop.
Save shannon/f35d7cf7d931c2594e2b4fe7a9f9d7a0 to your computer and use it in GitHub Desktop.
> [email protected] test /data/data/com.termux/files/home/cpuinfo
> node ./testcases.js
Testing cpuinfo for node-js
{ http_parser: '2.7.0',
node: '9.2.0',
v8: '6.2.414.44-node.11',
uv: '1.16.1',
zlib: '1.2.8',
ares: '1.13.0',
modules: '59',
nghttp2: '1.27.0',
openssl: '1.0.2m' }
procCPUInfo:
Error: Not yet implemented
at module.exports.getProcCPUInfo (/data/data/com.termux/files/home/cpuinfo/index.js:141:11)
at mayfail (/data/data/com.termux/files/home/cpuinfo/testcases.js:14:2)
at Object.<anonymous> (/data/data/com.termux/files/home/cpuinfo/testcases.js:76:1)
at Module._compile (module.js:641:30)
at Object.Module._extensions..js (module.js:652:10)
at Module.load (module.js:560:32)
at tryModuleLoad (module.js:503:12)
at Function.Module._load (module.js:495:3)
at Function.Module.runMain (module.js:682:10)
at startup (bootstrap_node.js:191:16)
undefined
os.cpus:
undefined
/sys/devices/system/cpu
[ 'core_ctl_isolated',
'cpu0',
'cpu1',
'cpu2',
'cpu3',
'cpu4',
'cpu5',
'cpu6',
'cpu7',
'cpufreq',
'cpuidle',
'hang_detect_gold',
'hang_detect_silver',
'isolated',
'kernel_max',
'modalias',
'offline',
'online',
'possible',
'power',
'present',
'uevent' ]
Number of CPUs:
8
os.cpus().length: Error Error
cpuinfo.getCPUNumber:
: 8 Same result
fromSysDevicesPossible: 8 Same result
fromSysDevicesPresent: 8 Same result
fromSysDevicesCPUDir: 8 Same result
fromProcStat: undefined Error: EACCES: permission denied, open '/proc/stat'
fromProcCPUInfo: undefined Error: Not yet implemented
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment