CPU使用率过高,容易引起服务响应速度变慢、服务器登录不上等问题。可以创建 CPU使用率阈值告警,当 CPU 使用率超过阈值时,将及时通知管理员
CPU使用率过高排查的步骤大致为:定位消耗 CPU的具体进程,对 CPU占用率高的进程进行分析。如果为异常进程,可能是病毒或木马导致,可以自行终止进程,或者使用安全软件进行查杀;如果是业务进程,则需要分析是否由于访问量变化引起,是否存在优化空间;
下面将介绍 Linux 系统下如何定位出 CPU 使用率过高的进程。
定位工具介绍:top 命令
top:Linux 系统下常用的监控工具,用于实时获取进程级别的 CPU使用情况。下图是 top 命令的输出信息。

上半部分显示 CPU 和内存资源的总体使用情况:
第一行:系统当前时间,当前登录用户个数以及系统负载。
第二行:系统总进程数、运行中进程数、休眠、睡眠和僵尸进程数量。
第三行:CPU 当前使用情况。
第四行:内存当前使用情况。
第五行:swap 空间当前使用情况。
下半部分以进程为维度显示资源的占用情况。
PID:进程 ID。
USER:进程所有者。
PR:进程优先级 NI:NICE 值,NICE 值越小,优先级越高。
VIRT:使用的虚拟内存大小,单位 KB。
RES:当前使用的内存大小,单位 KB。
SHR:使用的共享内存的大小,单位 KB。
S:进程状态。
%CPU:更新时间间隔内进程所使用的 CPU 时间的百分比。
%MEM:更新时间间隔内进程所使用的内存的百分比。
TIME+:进程使用的 CPU 时间,精确到 0.01s。
COMMAND:进程名称。
问题定位及处理
使用工具定位 CPU 使用率高的进程
前面介绍了 top 工具,下面介绍如何利用该工具定位出 CPU 使用率高的进程。
- 通过 SSH 或者 VNC 方式登录服务器
说明:CPU 使用率过高,容易引起服务器登录不上,此时可以尝试使用 VNC 登录的方式。 - 输入 top 命令查看系统负载。
- 输入大写 P,进程按 CPU 使用率降序排列;通过排序,可以方便得获得占用 CPU 资源较多的进程,进行进一步的分析。

4.分析占用 CPU 高的进程。
- 如果为业务进程,建议分析业务程序是否有优化空间,进行优化或者提升实例的资源配置。
- 如果为异常进程,实例可能中毒,可以自行终止进程、使用安全软件进行查杀或者进行数据备份后,重装系统。
使用 top 命令结束进程
- 键入小写 k,输入想要结束进程的 pid(默认为排序第一的进程),回车。

2. 操作成功,界面会出现 Send pid 984 signal [15/sigterm] 的提示信息,回车确认即可。

此教程来自固定链接:http://www.rakbuluo.com/p25/
The information and facts mentioned within the article are a few of the very best accessible
natural ways to control high blood pressure cialis commercials two bathtubs
<a href="https://kamagrajellynow.com">kamagra oral jelly australia</a> Esyefmp
https://kamagrajellynow.com kamagra
<a href=http://www.canadian2pharmacy.com>viagra without doctor prescription</a> http://www.ycialisy.com
Sites of interest we've a link to.
The info talked about within the article are a few of the best obtainable.
why does my boyfriend take viagra arthritis lab panel spider venom new viagra <a href="https://viawithoutdctrs.com/#">viagra without doctor prescription</a> - cialis aleve https://viawithoutdctrs.com/# - cialis price in bangkok oxford academic inflammation in chronic hiv infection : what can we do ?
how long viagra last <a href="https://viagraonlinejc.com/ ">http://viagraonlinejc.com/ </a> gnc viagra
cialis dapoxetine <a href="https://buycialisxz.com/ ">generic vs brand name cialis </a> cialis professional wikipedia
canadian pharmacy viagra <a href="http://viagratx.com/ ">viagra generic online</a> does viagra stop you coming
how honey and cinnamon help arthritis cialis smooth muscle
<a href="https://kamagrajellynow.com">kamagra oral jelly</a> Uxvhanzr
https://kamagrajellynow.com kamagra online
<a href=http://www.vardenafilz.com>canadian pharmaceuticals online</a> http://www.withoutbro.com
I absolutely love your website.. Great colors & theme. Did you
make this amazing site yourself? Please reply back as I'm planning to create my own site
and want to find out where you got this from or what the theme is named.
Thank you! https://hydroxychloroquines.studiowestinc.com/
cialis clonazepam interaction how does alcohol cause long term high blood pressure buy cialis in florida <a href="https://tadalafilkiva.com/#">tadalafil</a> - how much do cialis pills cost https://tadalafilkiva.com/# - cialis antifungal medications medica healthcare
What a stuff of un-ambiguity and preserveness of precious know-how about unpredicted emotions. http://hydroxychloroquinea.audiovideoninja.com/
<a href=http://www.withoutscript.com>canadian pharmacy</a> http://www.tadalafilrembo.com
Thank you a lot for sharing this with all people
you really understand what you are talking approximately!
Bookmarked. Kindly also seek advice from my website =).
We can have a link exchange agreement between us https://hydroxychloroquinel.lm360.us/
cialis soft tabs cheap kamagra gold manufacturers
Avxudik <a href=" https://withoutshort.com/ ">viagra online</a>
https://withoutshort.com supplements like viagra
I'm really enjoying the design and layout of your site. It's a very
easy on the eyes which makes it much more enjoyable for
me to come here and visit more often. Did you hire out a developer to create your theme?
Superb work! https://cialis.bee-rich.com/tadalafil
drugstore online http://viaagra1.com/
indianapolis viagra <a href="https://viagriyvik.com/ ">viagra&dapoxetine </a> generic viagra canadian pharmacy
generic cialis in texas <a href="https://llecialisjaw.com/ ">overnight cialis online </a> köpä cialis
Fantastic post however , I was wondering if you could write a litte more on this
subject? I'd be very thankful if you could elaborate a little bit more.
Many thanks! http://cleckleyfloors.com/viagra.pills
tadalafil viagra levitra https://atadalafil.online/
cialis kopen apotheek <a href="http://ljcialishe.com/ ">cialis generika in spanien</a> cialis for women safe
100 mg viagra price http://viiagra.co/
viagra prescription canada <a href="http://vigedon.com/ ">purchase sildenafil </a> over the counter viagra 2018
why not to get a payday loan <a href="http://rirocash.com/ ">payday loan 93552</a> payday loans mount pearl
generic cialis sublingual https://cialis.grassfed.us/
payday loans banned in nj <a href="http://ascashapply.com/ ">payday loans money expert</a> cash loan hervey bay
cialis arm pain <a href="https://jecialisbn.com/ ">tricare cover cialis</a> cialis side effects drugs.com
td visa cash advance fees <a href="http://daymoneygo.com/ ">cash advance loans in rock hill sc</a> advance cash puyallup wa
at home blood pressure monitor - <a href="https://www.withoutbro.com/# ">viagra without a doctor prescription</a> Oshp12c
cialis ohne rezept forum
viagra tinnitus temporary: <a href="https://www.withoutbro.com/">cialis without doctor prescription</a>
cash out investor loans <a href="http://samcash21.com/ ">payday loan in euclid ohio</a> payday loan debt assistance company
viagra gold overnight <a href="http://hopeviagrin.com/ ">prices for viagra</a> viagra for cheap on line
side effects of cialis and grapefruits <a href="http://cialisvja.com/ ">generic cialis overnight delivery</a> cialis cheapest prices
tadalafil without doctor prescription https://tadfil.online/
drugs from canada online <a href="http://xuypharmacyonline.com/">prescription price comparison</a> canadian pharmacies shipping to usa
buy viagra in sydney <a href="http://lightvigra.com/ ">viagra patent expiration</a> byy viagra online
generic viagra online pharmacy <a href="http://happyrxpharmacy21.com/ ">cholesterol</a> online pharmacy school
pharmacy technician classes online free <a href="https://ssviagriia.com/ ">buy generic viagra 50mg</a> best online international pharmacies
arthritis <a href="http://storerxpharmcanada.com/ ">viagra super active</a> cialis online pharmacy
cialis without prescription http://tadalafila.online/
pharmacy online no prescription <a href="http://online21rxon.com/ ">no prescription pharmacy</a> compare rx prices
where to get viagra in singapore https://zsildenafil.com/
over the counter azithromycin http://aziithromycin.com/
Chloromycetin <a href="https://canadianpharmacy-yy.com/">discount pharmacy online</a> Cardizem https://canadianpharmacy-yy.com/ - Aricept ’
cialis soft tabs 20mg <a href="https://impotencecdny.com/info/history.php">cheap generic cialis in the us</a> cialis dapoxetine https://impotencecdny.com/info/history.php - can you buy cialis with no prescription ’
ed meds online without doctor http://ciaalis2u.com/
do genric cialis work <a href="https://impotencecdny.com/">ordering prescriptions from canada legally</a> cialis soft tabs, united states origin https://impotencecdny.com/ - Cardura ’
cialis from canada https://cialzi.com/
cialis price <a href="https://xz-pharmacyonline.com/#">canada pharmaceuticals online</a> cialis uk no prescription https://xz-pharmacyonline.com - Clozaril ’
online viagra <a href="http://xz-pharmacyonline.com/en/career-opportunities.html">viagra hong kong</a> where can i purchase viagra with paypal? http://xz-pharmacyonline.com/en/career-opportunities.html - what are the over the counter viagra ’
cialis, generic <a href="http://loncialis.com/#">professional viagra cialis</a> cialis with dapoxetine to buy uk http://loncialis.com/ - cialis forsale ’
viagra per nachname bestellen <a href="https://canadianpharmacy-usx.com/organic.htm">viagra on sale</a> viagra fedex overnight https://canadianpharmacy-usx.com/organic.htm - viagra melbourne ’
generic prescription drug cheapest prices https://edmeds.buszcentrum.com/
vidalista sales http://vidallista.com/
black ants cialis australia <a href="http://sjcialis.com/#">discount cialis</a> cialis from safeway http://sjcialis.com/ - cialis usa ’
cialis sales canadian <a href="http://cialmenshoprx.com/#">free generic cialis pills</a> generic cialis testimonials http://cialmenshoprx.com/ - cialis suppliers ’
interactions for aurogra https://aurogra.buszcentrum.com/
cialis 20mg <a href="http://mycialedst.com/#">cialis usa</a> cialis store in qatar http://mycialedst.com/ - cialis egypt ’
cialis <a href="http://phrcialiled.com/#">canada cialis online</a> best way to take cialis http://phrcialiled.com/ - overnight cialis delivery usa ’
cialis tabs <a href="http://cialijomen.com/#">cialis for daily use cost</a> cialis free samples http://cialijomen.com/ - generic cialis usps priority mail ’
cialis no prescription <a href="http://21cialismen.com/#">cialis trial pack</a> cheap tablet cialis http://21cialismen.com/ - cialis professional vs cialis super active ’
viagra canada <a href="http://genericrxxx.com/#">viagra online</a> genaric viagra http://genericrxxx.com/ - buy viagra ’
cialis coupons in walmart https://tadalafil.cleckleyfloors.com/
brand viagra <a href="http://acialaarx.com/#">viagrarx</a> how to buy viagra http://acialaarx.com/ - cheap viagra express shipping ’
viagra, australia <a href="http://llviabest.com/#">viagra prescrition for walgreens</a> viagra soft tabs http://llviabest.com/ - online viagra ’
viagra online next day delivery <a href="http://genqpviag.com/#">generic viagra review forum</a> viagra super force review http://genqpviag.com/ - viagra paypal ’
How can you blab if you induce diabetes? Most at the crack symptoms are from higher-than-normal levels of glucose, a kind of sugar, in your blood. The counsel signs can be so non-violent that you don't notice them <a href=http://withoutprescriptions-rx.com>viagra without a doctor prescription</a>. That's exceptionally actual of type 2 diabetes. Some people don't bump into uncover out they be enduring it until they vex problems from long-term devastation caused past the disease. With group 1 diabetes, the symptoms almost always happen quickly, in a difficulty of days or a infrequent weeks http://withoutprescriptions-rx.com viagra without a prescription. They're much more unyielding, too.
buy viagra online australia <a href="http://fmedrx.com/#">viagra price in malaysia</a> purchasing 50mg viagra viagra online pay with paypal <a href="http://edabcrx.com/#">viagra paypal aust</a> viagra for women uk viagra gold 365 <a href="http://abcrxmed.com/#">buy viagra on discover card</a> buy viagra without perscription viagra best pricve <a href="http://cialedrx.com/#">viagra 4 pack</a> canadian viagra buy via paypal can i buy viagra without a prescription <a href="http://hitrxmenvia.com/#">discount viagra</a> cipla viagra canada
viagra canada customs <a href="http://viashoprx.com/#">brand viagra</a> generic viagra discount cod viagra online <a href="http://xviagarrx.com/#">cheap viagra canada</a> grapefruit viagra interaction 100 mg viagra price <a href="http://viagraviagria.com/#">buy viagra 100mg</a> canadian viagra pharmacy viagra with fast shipping <a href="http://asgenviagria.com/#">canadian viagra prices</a> where i can buy viagra in australia buy viagra with paypal <a href="http://viagengen.com/#">trial size viagra overnight</a> overnight generic viagra
viagra 25mg vs 50mg <a href="http://ltdviagragogo.com/#">viagra for sale australia</a> viagra from uk viagra natural china <a href="http://hdgenericviagraxk.com/#">viagra order autsralia</a> viagra. natural food substitute to viagra <a href="http://buygenericviarga.com/#">viagra australia</a> viagra online us generic viagra free online <a href="http://buyhdpillvia.com/#">buy viagra no prescription, paypal</a> viagra/cheaper viagra cost comparison <a href="http://genericviagrix.com/#">viagra mail order canada</a> viagra trial sample
is generic cialis available in the usa https://wisig.org/
priligy discount https://ddapoxetine.com/
ivermectin and scabies https://ivermectin.mlsmalta.com/
discrete viagra online paypal australia <a href="https://genqpviag.com/#">flavor viagra</a> viagra canada pfizer
cialis dosage information https://tadalafili.com/
essay on the teacher <a href="https://essaywritingservicesjy.com/#">creative dissertation</a> argumentative essays
Scholarship essay writing service <a href="https://essaywritingservicesjy.com/">https://essaywritingservicesjy.com/</a> essay on service to humanity
order dissertation <a href="https://essayhelpbgs.com/#">college essays how to</a> writing a motivational speech
a dissertation <a href="https://customessaywriterbyz.com/#">science assignment help</a> college application essay titles
Buy an essay online <a href="https://buyessayhelpbtg.com/">https://buyessayhelpbtg.com/</a> buy custom essay
best place to buy real viagra online <a href="https://llviabest.com/#">buy viagra without prescription</a> viagra 365
customized research papers <a href="https://writemypaperbuyhrd.com/#">student coursework</a> write best man speech
Healthcare continues to be an formidable, but divisive political topic. Not surprisingly, 41 percent of available voters said healthcare was their explanation put in the mid-term elections in 2018.<a href=http://my-canadianpharmacyonline.com>viagra without a doctors prescriptions</a> In 2008, when the ACA became law, merely 46 percent of voters supported unique payer healthcare. That army has grown significantly to 59 percent authorization in beginning 2018.http://my-canadianpharmacyonline.com cialis samples for sale While Medicare-for-all legislation is unthinkable to pass both the Line and Senate in its in the air create, there is a paddle one's own canoe in community opinion with a solid more than half now in favor.
research paper 1st paragraph <a href="https://thesiswritinghelpsjj.com/#">umi dissertation services</a> practice essay writing online
critical problem solving <a href="https://thesisbyd.com/#">free essay website</a> writing paper service
writing a best mans speech <a href="https://dissertationhelpvfh.com/#">harvard essay writing</a> best website to write essay
help writing a best man speech <a href="https://researchpaperssfk.com/#">along these lines writing paragraphs and essays</a> write essays
como dejar de tomar viagra <a href="https://genericrxxx.com/#">viagra receta medica</a> esclerosis multiple viagra
viagra 30 mg <a href="https://hopeviagrin.com/#">viagra without a doctor</a> sildenafil 50
<a href="https://azithromycinx250.com/">urinary tract infection azithromycin dosage</a>
https://azithromycinx250.com/# - urinary tract infection azithromycin dosage
vidalista 60 mg side effects https://vidalista.buszcentrum.com/
tips on viagra use <a href="https://buybuyviamen.com/#">viagra tablets in hyderabad</a> how does it feel to take viagra
real viagra pills <a href="https://mygoviagar.com/#">buy viagra without a script</a> where to buy sildenafil
viagra brand canada <a href="https://lightvigra.com/#">buying sildenafil uk</a> best site to buy viagra online
sildenafil 50 mg price in india <a href="https://miraclevigra.com/#">viagra 400 mg</a> cost of generic viagra in india
durex al viagra <a href="https://buybuyviamen.com/#">buybuyviamen.com</a> how do i get a sample of viagra
viagra generics price judpharmacys http://droga5.net/
ivermectin toxicity in humans https://ivermectin.webbfenix.com/
viagra for sale cheap <a href="https://paradiseviagira.com/#">https://paradiseviagira.com/</a> female viagra wiki
dapoxetine costs at walmart https://salemeds24.wixsite.com/dapoxetine
is a prescription needed for viagra <a href="https://paradiseviagira.com/#">bying viagra uk</a> viagra and alcohol consumption
consumer reports viagra cialis levitra <a href="https://purevigra.com/#">viagra efectos secundarios en jovenes</a> wordpress viagra malware
tomar viagra a los 16 aГ±os <a href="https://purevigra.com/#">https://purevigra.com</a> medical side effects of viagra
<a href="https://clomidweb.com/">clomiphene citrate tablets</a>
https://clomidweb.com/# - clomiphene citrate tablets
<A HREF='https://naltrexoneonline.confrancisyalgomas.com/'>naltrexone full prescribing information</A>
<a href=http://www.lm360.us/>buy cialis online without a prescription</a>
generic viagra 2017 http://fmedrx.com/ <a href="http://fmedrx.com/#">viagra online canadian pharmacy</a> when will generic viagra be available in the us
<A HREF="http://cleckleyfloors.com/">cialis warnings and precautions</A>
<a href="https://hydroxychloroquine.webbfenix.com/">order hydroxychloroquine 200mg</a>
<a href="http://www.zolftgenwell.org/">walmart viagra prices without insurance</a>
<A HREF=https://amoxycillin1st.com/>amoxicillin 500 mg price</A>
cheap viagra online canadian pharmacy http://usggrxmed.com/ <a href="http://usggrxmed.com/#">best site to buy generic viagra</a> best generic viagra online reviews
<a href="http://www.cialislex.com/">average cost of 20mg cialis</a>
http://www.cialislex.com/# - average cost of 20mg cialis
<a href="https://cialistodo.com/">que es cialis</a>
https://cialistodo.com/# - que es cialis
<a href="https://azhydroxychloroquine.com/">hydroxychloroquine vs chloroquine phosphate</a>
A silicone or saline implant may be used. <a href="http://siviagmen.com/">https://siviagmen.com</a> generic form of viagra
<a href="http://medscape.ru/go.php?http://viagrraver.com">viagra where to buy 93811035</a>
http://medscape.ru/go.php?http://viagrraver.com# - viagra where to buy 10099107
<a href="http://viagrraver.com/">buy female viagra online</a>
http://viagrraver.com/# - buy female viagra online
<A HREF='https://chloroquine1st.com/'>availability of hydroxychloroquine in usa</A>
Learn More Contact Organizer Your message has been sent!
<a href="https://saleviabuy.com/">saleviabuy.com</a> how long for viagra to work
<a href="https://www.herpessymptomsinmen.org/productacyclovir/">acyclovir dosage for recurrent herpes</a>
<A HREF=https://buszcentrum.com/>generic sildenafil citrate for sale</A>
<a href="http://grassfed.us/">buying viagra online from pfizer</a>
generic viagra walmart <a href=" http://sild100fast.com/# ">canadian pharmacy viagra</a> viagra without prescription
<A HREF=https://www.herpessymptomsinmen.org/where-to-buy-hydroxychloroquine/>chloroquine prices</A>
<a href=https://carepro1st.com/>bimatoprost ophthalmic solution cost</a>