3

Sometimes I encounter a process that should have been killed, but instead has been using 100% of the cpu for a while (more than a minute).

I'd like some way to notify myself if this situation occurs. What are my options, and how can I achieve this?

Would I have to write some daemon that periodically watches the cpu % of each process? Or is there some way to determine 'cumulative' cpu time for a process in some time period (for example 1 minute).

Please disregard "how" I intend to be notified - this is irrelevant.

The alternative is needing a human like myself to stare at htop for a while.

-1

System resource tests in monit come to mind. This can be configured very individually depending on your use-case:

Monit - utility for monitoring services on a Unix system

Keep in mind that it may not be shipped with some enterprise distributions (SLES e.g.).

2
  • This does not really seem like an answer? – Chris Stryczynski Aug 5 '20 at 16:15
  • There is no answer to a question that asks for brainstorming. – Beko Pharm Aug 5 '20 at 16:30

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.