Settings

Theme

NTOP – Linux “top” for Node.js part 2, now working directly from CLI-only

7 points by touchpadder 3 years ago · 4 comments · 1 min read


I'm working on this tool "ntop" to be able to quickly see the heaviest functions in any running Node process like "top" command for regular processes in Linux. The initial version required code changes but now it's working with just CLI (Linux only first)

npm i -g ntop

ntop inject 12345 // where 12345 is process id

ntop 12345

Prints:

Profiling client node-proc-3150 time 3000

(garbage collector) | 11.703ms |

utils.bulkPreparePacket | 1.53ms | file:///home/app/src/Utils.js:91:26

(anonymous) | 1.181ms | evalmachine.:3:14

(anonymous) | 1.126ms | file:///home/app/node_modules/lodash/lodash.js:1223:19

https://github.com/DVLP/ntop/

LinuxBender 3 years ago

For what it's worth there used to be a package in many Linux repositories called "ntop" [1] however it became less popular when they went commercial. There is still a community version but I have no idea how popular it is any more. It was quite popular prior to projects like PiHole. Perhaps the older ntop has fallen out of favor so maybe there won't be any confusion. I have no idea how many distros still have the other ntop.

[1] - https://www.ntop.org/

  • touchpadderOP 3 years ago

    although its functionality is different looks like it's a name collision, at some point I may change it if the old one is still being used

    • LinuxBender 3 years ago

      The number of public instances appears to be small [1], though it is not really meant to be listening on a public interface. So maybe it's use is fading away.

      [1] - https://www.shodan.io/search?query=ntop

      • touchpadderOP 3 years ago

        Thanks for the link, pretty cool tool. So it seems like the risk of a conflict is pretty low and if it happens then a solution is to use "npx ntop" instead of just "ntop"

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection