ネットワークがちょくちょく落ちてるので。 [不具合・問題・解決方法?とか]
#! /bin/bash
ETH1=`/sbin/ifconfig -s|grep eth0|cut -c-4`
if [ -z "$ETH1" ]; then
/usr/bin/logger "Interface eth0 has gone."
/etc/init.d/networking restart
/usr/bin/logger "Restarting network..."
ETH2=`/sbin/ifconfig -s|grep eth0|cut -c-4`
if [ $ETH2 != "eth0" ]; then
/usr/bin/logger "Failed to recover eth0."
elif [ $ETH2 = "eth0" ]; then
/usr/bin/logger "Recovered eth0!"
fi
elif [ $ETH1 = "eth0" ]; then
PING1=`/usr/bin/fping 192.168.1.1|grep alive`
if [ -n "$PING1" ]; then
/usr/bin/logger "eth0 is alive."
elif [ -z "$PING1" ]; then
/usr/bin/logger "eth0 is alive but unreachable to router."
/etc/init.d/networking restart
/usr/bin/logger "Restarting network..."
PING2=`/usr/bin/fping 192.168.1.1|grep alive`
if [ -n "$PING2" ]; then
/usr/bin/logger "Recovered network!"
elif [ -z "$PING2" ]; then
/usr/bin/logger "eth0 is alive but something wrong with network."
fi
fi
fi
exit 0
ま、てきとうにこんな感じのスクリプトで。
# echo >> "0-59/5 * * * * root cd / && run-parts /etc/cron.5minitesly"
# mkdir /etc/cron.5minitesly
して、/etc/cron.5minitesly にスクリプトを置いておく。
あと、chomod u+xも忘れずに。
これで5分以上ネットワークは落ちなくなったのですが、
サーバ自体がいつの間にか落ちていることも。。。
Zabbixサーバなのに。。
Mail Order Discount Generic Doryx In Internet Cheapeast <a href=http://nefoc.com>propecia efecto secundario</a> Cialis Yohimbina Viagra Pour Femme Vendu Au Quebec
by Jeashibia (2019-01-23 00:00)
Cephalexin Antibiotic Used For Cialis Precio Farmacia Del Ahorro Buy Metformin <a href=http://lowpricecial.com>cialis canada</a> Doxycycline Online Cheap
by AustJath (2019-05-02 11:13)
Propecia Androgenos Effet Tadalis Sx Soft Chez Femme <a href=http://tadalaf20mg.com>п»їcialis</a> Levitra Walgreens Viagra Kaufen Gunstig
by StevNite (2019-06-01 17:49)
Drug Class Amoxicillin Finasteride 1 Mg 5 Mg Propecia Viagra Cialis Contraffatti <a href=http://levipill.com>levitra for sale on ebay</a> Viagra Comprar Viagra Generico
by Kelavaify (2019-06-03 15:40)
Viagra Wirkung Essen <a href=http://drugs20.com>cheapest cialis</a> Nolvadex For Sale Good Site Propecia Pas Cher Livraison Rapide Average Cost Of Viagra 100mg
by Kelavaify (2019-06-13 09:26)
Ist Levitra Rezeptpflichtig Isotretinoin find Clomid Usa Shippments Online <a href=http://bestlevi.com>levitra professional</a> Viagra For Sale Without Prescription
by AustJath (2019-06-13 21:38)
Propecia Canada Pharmacy Online <a href=http://cialisab.com>cheap cialis online</a> Walgreens Propecia Review
by AustJath (2019-07-02 09:36)
Cialis Diario Argentina Propecia 100mg <a href=http://staminamen.com>buy generic cialis online</a> Achat Cialis Forum Cheap Viagra From Other Countries
by Kelavaify (2019-07-09 05:46)
Pharmacy Gift Card Viagra Buy Viagra Uk Online Viagra Drogen <a href=http://cialicheap.com>cialis without a doctor's prescription</a> Tarif Levitra 10mg
by StepOdors (2019-07-09 12:36)
Malegra Tablets <a href=http://aaost.com>cialis 5 mg</a> Canada Pharmacy No Script Viagra Kaufen Online Apotheke Acquistare Kamagra Pfizer Francia
by StepOdors (2019-07-18 18:27)
Viagra Tablette Teilen <a href=http://brandcial.com>tadalafil cialis from india</a> Cialis Generica Tadalafil Where Can I Buy Mirtazapine Cheap Daily Use Cialis Without Prescription
by AustJath (2019-07-19 14:42)
Cialis Douleurs Musculaires Ampicillin Amoxicillin And Ticarcillin For Dogs Cialis Y Hipertension <a href=http://buyoxys.com>vardenafil bestellen</a> Getting Viagra Fast. India Meds Direct Zithromax Dosage For Strep
by StepOdors (2019-07-28 12:55)
40mg Levitra Pills On Line For Sale <a href=http://cialibuy.com>Buy Cialis</a> Viagra Tablets Need Generic Real Progesterone Pills Internet Cheapeast Free Shipping Stockton Amoxicillin Order From Canada
by StevBiaddy (2020-01-15 23:21)
Clomid Et Fausse Couche <a href=http://cialibuy.com>Buy Cialis</a> Amoxil Chat Is Cephalexin Good For Celulitis
by KelLery (2020-01-16 11:20)
Levitra Uk Pharmacy http://cialibuy.com - cheapest cialis 20mg Doxcycline No Prescription <a href=http://cialibuy.com>Buy Cialis</a> buy accutane online legit
by LesAlelty (2020-01-21 17:20)
Zithromax Of Pfizer http://buyciallisonline.com/# - Buy Cialis Can I Get Cymbalta In Mexico <a href=http://buyciallisonline.com/#>Buy Cialis</a> Farmaco Cialis Tadalafil
by Matunmaks (2020-02-07 15:47)
Priligy Sur Le Nhs http://buycialisuss.com - generic cialis Discount Nexium <a href=http://buycialisuss.com>cialis 5 mg best price usa</a> Order Celebrex
by StevBiaddy (2020-02-12 00:10)
Generic 1 Mg Propecia Finasteride http://buycialisuss.com - Buy Cialis Propecia Abgelaufen <a href=http://buycialisuss.com>cialis without prescription</a> Acquisto Viagra E Cialis
by LesAlelty (2020-02-25 04:21)
Il Farmacista Online Cialis Canada <a href=http://buycialisuss.com>cialis</a> Isotretinoin roaccutane how to buy <a href=http://buycialisuss.com>cialis prices</a> Buy Z Pak No Prescription
by StepLot (2020-03-02 10:13)
Good advice.
by custom shed builders near me (2021-06-30 12:39)
Wonderful blog post. This is absolute magic from you!
I have never seen a more wonderful post than this one.
You've really made my day today with this. I hope you keep this up!
제이나인 필리핀 카지노
제이나인 먹튀 링크
제이나인 보라카이 카지노
제이나인 세부 카지노
제이나인 에볼루션 카지노 가입
https://www.j9korea.com
by jaeseu (2022-12-20 12:08)
I think the articles on this blog are very good and informative. Thank you for letting me know about that is hard to come across. Please share your thoughts in the future. Hope to see more information. https://totosoda.com
by 메이저사이트 (2022-12-30 15:09)