SCOM linux script to kill process

madhavi gunasekar 41 Reputation points
2020-10-30T11:53:23.96+00:00

Hi All

Am trying to Kill Linux process , if the process exceeds CPU threshold.

Below command works in Linux server. But when we add under Linux script in SCOM , it throws error. Please help

Killall -9 <<Processname>>

Operations Manager
Operations Manager
A family of System Center products that provide infrastructure monitoring, help ensure the predictable performance and availability of vital applications, and offer comprehensive monitoring for datacenters and cloud, both private and public.
1,474 questions
0 comments No comments
{count} votes

Accepted answer
  1. Leon Laude 85,781 Reputation points
    2020-10-30T12:09:09.63+00:00

    Hi @madhavi gunasekar ,

    There are many guides out there that explains how to accomplish this, I have prepared a few links for you that I think will help you out:

    (Don't pay too much attention to the versions)

    ----------

    (If the reply was helpful please don't forget to upvote or accept as answer, thank you)

    Best regards,
    Leon

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. madhavi gunasekar 41 Reputation points
    2020-10-30T13:07:26.427+00:00

    Thanks , I have used Shell commands which works.

    But this software runs only on weekends and its not installed on server. So i have tried to use Perl script below,

    kill -9 ps -ef | grep '<<ProcessName>>' | grep -v grep | awk '{print $2}'

    I get error when this recovery script runs,

    kill: (<<PID>>) - Operation not permitted

    Same command works when i run from server.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.