-1

I have a script that installs a lot of software. For debugging purposes I am looking for a way of simply benchmarking my system after each install to see which piece of software cripples my server.

NPM installs are Godly slow.

1 Answers1

0

I think it would be a better strategy to find the service or process that is causing the problem. But to answer your question as asked you could put something like this after each install in your script.

top -n 10 -b > top-outputAfterXinstall.txt

Replace X with the name of the software you just installed. This will give you a good idea of how the installs are impacting your memory and cpu performance, as well as which process are causing problems.

Eric
  • 544
  • 1
  • 5
  • 15
  • It's probably from a rootkit that I can't get rid of - something that crawls into my service through root certificates so there's nothing I can do about it. – ProfessorManhattan Oct 15 '15 at 19:01
  • Some type of intrusion detection system could help you isolate that issue. An example would be [ossec](http://www.ossec.net/) – Eric Oct 15 '15 at 19:09