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>>
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>>
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
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.
This error occurs when the user doesn’t have the permissions required to perform a command, make sure your Linux monitoring/action account has sufficient permissions.
You can try running the command with sudo.
I have already tried with sudo , bit i get error
/etc/opt/microsoft/scx/conf/tmpdir/scxLNXTMi: line 1: Sudo: command not found
Depending on what Linux distribution you are running, the sudo might not be installed.
First enable su-mode:
su -
Install sudo by running:
apt-get install sudo -y
4 people are following this question.