Giter Club home page Giter Club logo

kill-process's People

Contributors

imgbotapp avatar lopadova avatar sballe73 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

kill-process's Issues

**[PROPOSAL]** Multiple process with same name check

Please prefix your issue with one of the following: [BUG] [PROPOSAL] [QUESTION].

In raising this issue, I confirm the following (please check boxes):

  • I have read and understood the contributors guide.
  • I have checked the pull requests tab for existing solutions/implementations to my issue/suggestion.
  • I have checked that the bug-fix I am reporting can be replicated.

Description of the problem

If i put php-fpm in killlist, the sript check only first php-fpm process.
In real environment, multiple php-fpm process (one for site) is running with same process name and
different pid.
If a script in one site, for bug or an attack, consume 100% of cpu , i need to kill this pid.
Thanks

Steps to reproduce

...

[QUESTION] integer expression expected

Please prefix your issue with one of the following: [BUG] [PROPOSAL] [QUESTION].

In raising this issue, I confirm the following (please check boxes):

  • I have read and understood the contributors guide.
  • I have checked the pull requests tab for existing solutions/implementations to my issue/suggestion.
  • I have checked that the bug-fix I am reporting can be replicated.

Description of the problem

Found the issue, I was missing integer format from decimal.
CPU=${CPU%%[.,]*}

What exactly is MAX_SEC though?

If I set MAX_CPU=90 and MAX_SEC=30 does this mean it kills the process if reaches 90% CPU and stays that way for 30 seconds or if the process has been running for at least 30 seconds? I would like for the script to kill the process only if it stays at 90% for 30 seconds to avoid false-positive loads because sometimes it spikes to 90% for two or three seconds.

[BUG] no prozess kill

Please prefix your issue with one of the following: [BUG] [PROPOSAL] [QUESTION].

In raising this issue, I confirm the following (please check boxes):

  • [yes ] I have read and understood the contributors guide.
  • [ yes] I have checked the pull requests tab for existing solutions/implementations to my issue/suggestion.
  • [ yes] I have checked that the bug-fix I am reporting can be replicated.

OS: Debian 8
No Process kill, CPU load 100 %

Description of the problem

my config

#process command name to check
declare -a KILLLIST
KILLLIST=("/usr/bin/tor")

#max cpu % load
MAX_CPU=90

#max execution time for CPU percentage > MAX_CPU (in seconds 7200s=2h)
MAX_SEC=10

#max execution time for any %CPU (in seconds 2700s=45min)
MAX_SEC2=5

crontab check every minute

          •   bash /root/myscript/kill-process/killprocess.sh kill top cpu > /var/log/killprocess.log 2>&1
            

[QUESTION] "No matched Process", Is this only for PHP5 and apache2?

Please prefix your issue with one of the following: [BUG] [PROPOSAL] [QUESTION].

In raising this issue, I confirm the following (please check boxes):

  • [-] I have read and understood the contributors guide.
  • [-] I have checked the pull requests tab for existing solutions/implementations to my issue/suggestion.
  • [-] I have checked that the bug-fix I am reporting can be replicated.

Description of the problem

Whenever I run the script (in usage screenshots, too), I see:

There isn't any matched process for /usr/sbin/apache2
Check /usr/bin/php5-cgi process...
There isn't any matched process for /usr/bin/php5-cgi

I was expecting it to either:

  • automatically kill high cpu processes
    or
  • kill high cpu processes on demand.
    It doesn't seem to do either and I'm not sure why it is specifically checking those two locations. Perhaps some documentation would be useful?

Steps to reproduce

run ` bash killprocess.sh kill top cpu

Thanks!

**bug** invalid integer

Please prefix your issue with one of the following: [BUG] [PROPOSAL] [QUESTION].

In raising this issue, I confirm the following (please check boxes):

  • I have read and understood the contributors guide.
  • I have checked the pull requests tab for existing solutions/implementations to my issue/suggestion.
  • I have checked that the bug-fix I am reporting can be replicated.

Description of the problem

line 349: 10#0+60*(10#: invalid integer constant (error token is "10#")

Steps to reproduce

run script on centos 9 as a normal user

[Question] tput: No value for $TERM and no -T specified

Please prefix your issue with one of the following: [BUG] [PROPOSAL] [QUESTION].

In raising this issue, I confirm the following (please check boxes):

  • [ yes] I have read and understood the contributors guide.
  • [ yes] I have checked the pull requests tab for existing solutions/implementations to my issue/suggestion.
  • [ yes] I have checked that the bug-fix I am reporting can be replicated.

Description of the problem

I check my killprocess.log, i get this info

tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
Process execute in 'kill' mode.
Process fetched by 'top' command
Process sort by %CPU ( 9 )
Check /usr/bin/xxx process...
There isn't any matched process for /usr/bin/xxx

Steps to reproduce

Modify only this

#max cpu % load
MAX_CPU=95
#max execution time for CPU percentage > MAX_CPU (in seconds 7200s=2h)
MAX_SEC=180
#max execution time for any %CPU (in seconds 2700s=45min)
MAX_SEC2=270

my crontab

0 * * * * bash /root/myscript/kill-process/killprocess.sh kill top cpu > /var/log/killprocess.log 2>&1
5 * * * * bash /root/myscript/kill-process/killprocess.sh kill top cpu > /var/log/killprocess.log 2>&1
10 * * * * bash /root/myscript/kill-process/killprocess.sh kill top cpu > /var/log/killprocess.log 2>&1

is my logfiles OK, or is wrong ?
cya
Betaman

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.