I have a app that starts a number of nodeJs processes. The processes are not all running the same JS code, there are about three types of 'roles' for the processes. Currently if I run something like htop
to have a look at CPU usage, I have no way of distinguishing between the different scripts being run (e.g. if one is using a lot of CPU I have no way of knowing which JS script the node process is running).
Could anyone suggest a method by which I could identify which JS script a particular node process is running? (preferably via the shell).