Share via

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>>

System Center Operations Manager
System Center 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.

0 comments No comments

Answer accepted by question author

Leon Laude 86,116 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

Was this answer helpful?

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.

    Was this answer helpful?


Your answer

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