I suspect that there is some replicate (many instances) process that is overloading the CPU of my FreeBSD 10.3 (pfSense v2.3) computer, but I don't know what its name could be.

The process is probably a .sh script of mine, but I have many of them, and some of them call anothers.

Is there any (preferably CLI) method to detect these multiple instances of the same process?

I have researched, but solutions are for Linux, and syntax is not exactly the same for some commands, like uniq.

  • 1
    Perhaps like this: ps ax -o command | sort | uniq -d – Satō Katsura Jul 11 '16 at 20:48
  • @SatoKatsura: What does -o command means? – Sopalajo de Arrierez Jul 11 '16 at 20:52
  • 1
    Basically show only the command line. man ps for details. – Satō Katsura Jul 11 '16 at 20:55
  • @SatoKatsura , your suggestion seems to be working nice. Is there any need to run it as root? – Sopalajo de Arrierez Jul 11 '16 at 21:01
  • If you only care about your own processes, then no. – Satō Katsura Jul 11 '16 at 21:03

While we wait for Sato Katsura to answer the question, this (his) method works fine:

ps ax -o command | sort | uniq -d

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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