jonfrusciante
Newbie
- Registriert
- 21. Februar 2013
- Beiträge
- 23
- Reaktionspunkte
- 1
- Punkte
- 3
salve ragazzi
ma come si inseriscono gli script con l'ipc??
per esempio vorrei inserire questo script trovato in rete
che dovrebbe controllare se i tempi di risposta se ub utente supera i 1000ms pscam si riavvia:
JON
ma come si inseriscono gli script con l'ipc??
per esempio vorrei inserire questo script trovato in rete
che dovrebbe controllare se i tempi di risposta se ub utente supera i 1000ms pscam si riavvia:
Oscam scripts to Check clienttimeout & auto restartHere is a script to check if a user gets a high ecm let say over 1000ms and it will restart Oscam automatically:
Set the clientimeout to "lets say 1000 ms".
The scipt i use on debian:
Dont forget to change
SIZE=
LOG=,
STARTSCRIPT=
and change the crontab !!!
#!/bin/bash
# accepable number of timeouts CAN'T BE LESS THAN THAT 2 "s client timeout=1000 ms, fallback timeout=700 ms, cache delay=0 ms"
SIZE="4"
# oscam init script
STARTSCRIPT="/etc/init.d/oscam"
# log file
LOG="/var/log/oscam.log"
CHECK="`tail -200 $LOG |grep -v grep |grep -c timeout`"
# If the the word "timeout" appears more times then SIZE ...
if [ "$CHECK" -gt "$SIZE" ]; then
# backup the log
#mv "$LOG" /var/log/oscamtimeout$(date '+%Y_%m_%d_%H:%M').log
# delete the log
rm "$LOG"
# logging restarts of oscam
echo 'oscam restarted becouse of timeot at' $(date '+%Y_%m_%d_%H:%M') >> /var/log/oscamtimeouts.log
#killing oscam
kill -KILL $(pidof oscam)
# wait 2 sec
sleep 2
# start oscam
"$STARTSCRIPT" start
else
echo 'nincs' > /dev/null
exit 1
fi
Set the clientimeout to "lets say 1000 ms".
The scipt i use on debian:
Dont forget to change
SIZE=
LOG=,
STARTSCRIPT=
and change the crontab !!!
#!/bin/bash
# accepable number of timeouts CAN'T BE LESS THAN THAT 2 "s client timeout=1000 ms, fallback timeout=700 ms, cache delay=0 ms"
SIZE="4"
# oscam init script
STARTSCRIPT="/etc/init.d/oscam"
# log file
LOG="/var/log/oscam.log"
CHECK="`tail -200 $LOG |grep -v grep |grep -c timeout`"
# If the the word "timeout" appears more times then SIZE ...
if [ "$CHECK" -gt "$SIZE" ]; then
# backup the log
#mv "$LOG" /var/log/oscamtimeout$(date '+%Y_%m_%d_%H:%M').log
# delete the log
rm "$LOG"
# logging restarts of oscam
echo 'oscam restarted becouse of timeot at' $(date '+%Y_%m_%d_%H:%M') >> /var/log/oscamtimeouts.log
#killing oscam
kill -KILL $(pidof oscam)
# wait 2 sec
sleep 2
# start oscam
"$STARTSCRIPT" start
else
echo 'nincs' > /dev/null
exit 1
fi
JON
Zuletzt bearbeitet von einem Moderator: