Forgot to give space. Fixed it.
two new templates are added
This commit is contained in:
parent
97b532b1ac
commit
0f9eeb6f88
3 changed files with 19 additions and 0 deletions
|
@ -31,6 +31,7 @@ eidastest_compose:
|
|||
depends_on:
|
||||
- chrome
|
||||
restart: on-failure
|
||||
|
||||
scheduler1:
|
||||
image: mcuadros/ofelia:latest
|
||||
container_name: supvervising_standalone-chrome
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[job-exec "Supervising chrome processes"]
|
||||
schedule = @every 1h
|
||||
container = standalone-chrome
|
||||
command = scripts/supervise_chrome_processes.sh
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
# Script used for kill of hanging chrome processes
|
||||
|
||||
echo ""
|
||||
if [ $(ps -ef | grep chrome/chrome -c) -gt 15 ]
|
||||
then
|
||||
echo "Number of chrome processes are more than 15(" $(ps -ef | grep chrome/chrome -c) "), killing all chrome processes!"
|
||||
$(pkill chrome)
|
||||
echo "Number of chrome processes after kill: " $(ps -ef | grep chrome/chrome -c)
|
||||
else
|
||||
echo "Number of chrome processes are less than 15(" $(ps -ef | grep chrome/chrome -c) "), no action taken"
|
||||
fi
|
||||
|
||||
echo ""
|
Loading…
Add table
Reference in a new issue