1

This question already has an answer here:

Updating my Linux server is mostly a stressed part for me. Like today. With yum update i see a new version of NodeJS, but from what i can remember nodejs has been used by a program which needs to be carefully altered.

So i thought, there should be a command how to find out which program is using NodeJS, but unfortunately I can't find such command.

Is there a yum command which tells me who is using NodeJS on my system? So i can check if it is ok to update?

marked as duplicate by Thomas Dickey, slm Aug 22 '16 at 3:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    If everything you care about is installed through yum then you this question should cover your, if you manually installed other packages though, this won't help with them – Eric Renouf Aug 21 '16 at 22:52
  • Problem is indeed that it's about self compiled programs :( – Alex Aug 22 '16 at 0:52
1

If the other programs are installed as RPM packages then you can see which ones require nodejs:

rpm -q --whatrequires nodejs

If the other programs aren't installed as RPM packages then there's no easy way. Dependency information is one of the major benefits of using a package manager, as opposed to just copying files around.

You can set up logging whenever /usr/bin/nodejs is executing and run your system for a few days to see what executes it. If the file is used as a script interpreter via a shebang line, you can use the audit subsystem:

auditctl -w /usr/bin/nodejs

and watch /var/log/audit/audit.log. If nodejs is called explicitly then this won't tell you what program executed it, but this does log the first few command line parameters, which hopefully includes a script path that would be enough information for you. Watch Monitoring what program calls an executable file for other solutions.

Alternatively, if you have an idea where that program is stored, you can search for the string nodejs. But this is likely to return a lot of false positives (e.g. documentation files).

  • Thank you...can't upvote you yet, but thanks anyway. – Alex Aug 22 '16 at 0:53

Not the answer you're looking for? Browse other questions tagged or ask your own question.