How to check how many threads node.js is using on Linux?

We all know Node is single threaded, however, it's single threaded for a client (to you as a programmer), but the platform itself is multi-threaded (internally). In order to check how many threads your node is using on Linux machine you have 3 different options:

1.
cat /proc/`pidof node`/status | grep Threads

2.
ls /proc/19899/task/ | wc -l

3.
ps hH p `pidof node` | wc -l


Sometimes, it come in handy when you want to automate the load monitoring for example.

What If you want to to determine whether is 64bit or 32bit node executable installed?

You can try 3 following options:

1) Run node cli and type there:
require('os').arch()

3) Or type there:
process.arch

3) Or type there:
process.env.PROCESSOR_ARCHITECTURE


One of them will work for sure! (The latest one doesn't work on my Macbook but does on Win10 machine)