在 CentOS 7 yuav tsum tau teeb tsa rau memcached Saib xyuasThaum kuv program, kuv ntsib qhov teeb meem uas memcached nrhiav tsis tau cov ntaub ntawv pid ...
Tag nrho cov configs peb tuaj yeem pom hauv google muaj cov kab no:
check process memcached with pidfile /var/run/memcached/memcached.pid
tab sis,/var/run
Tsis muaj nyob hauv memcached.pid
file, no /var/run/memcached
nplaub tshev.
kuaj /usr/lib/systemd/system/memcached.service
[Service] Type=simple EnvironmentFile=-/etc/sysconfig/memcached ExecStart=/usr/bin/memcached -u $USER -p $PORT -m $CACHESIZE -c $MAXCONN $OPTIONS
- Yog li ntawd, tsis muaj txoj hauv kev rau cov ntaub ntawv .pid.
- Yog kuaj memcached tsis muaj .pid cov ntaub ntawv?
- Tsis tas li ntawd, cov ntaub ntawv .pid no puas tuaj yeem nyob hauv lwm qhov chaw?
CentOS 7 qhia qhov chaw nyob ntawm memcache pid li cas?
Txoj kev daws teeb meem yog teeb tsa memcache pid cov ntaub ntawv chaw nyob uas koj tau teev tseg hauv Monit saib xyuas kev teeb tsa ▼
check process memcached with pidfile /var/run/memcached/memcached.pid
Hloov nrog cov ntaub ntawv chaw nyob ntawm memcached pid ▼
check process memcached with match memcached
Peb configuration rau memcached:
check process memcached with match memcached start program = "/usr/bin/systemctl start memcached" stop program = "/usr/bin/systemctl stop memcached" if failed host 127.0.0.1 port 11211 protocol MEMCACHE then restart if cpu > 70% for 2 cycles then alert if cpu > 98% for 5 cycles then restart if 2 restarts within 3 cycles then timeout
Rau txoj kev teeb tsa ntawm Centos 7 Saib xyuas 5.14, thov mus saib cov lus qhia hauv qab no▼
Cia siab Chen Weiliang Blog ( https://www.chenweiliang.com/ ) shared "memcached nrhiav tsis tau cov ntaub ntawv pid? CentOS 7 Qhia meej memcache pid" los pab koj.
Zoo siab txais tos los qhia qhov txuas ntawm kab lus no:https://www.chenweiliang.com/cwl-26685.html
Zoo siab txais tos rau Telegram channel ntawm Chen Weiliang blog kom tau txais qhov hloov tshiab tshiab!
📚 Daim ntawv qhia no muaj nuj nqis loj, 🌟Qhov no yog lub sijhawm tsis tshua muaj, tsis txhob nco nws! ⏰⌛💨
Share thiab like yog tias koj nyiam!
Koj qhov kev sib koom thiab kev nyiam yog peb qhov kev txhawb nqa tas mus li!