环境配置

1. install epel

https://www.cyberciti.biz/faq/installing-rhel-epel-repo-on-centos-redhat-7-x/

2. Graphing your system performance in Linux with collectd

https://www.theurbanpenguin.com/graphing-your-system-performance-in-linux-with-collectd/

3. 选择前端(参考后面的列表)

CGP https://github.com/pommi/CGP  CGP提供支持nginx配置。

nginx配置在16.04上启用了php7.0-fpm

    location ~ \.php$ {
try_files $uri =;
# fastcgi_pass unix:/run/php5-fpm.sock;
fastcgi_pass unix:/run/php/php7.-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
} # Disallow access to hidden files and directories (such as .git/)
location ~ /\. {
deny all;
}

Collectd-Web https://www.tecmint.com/install-collectd-and-collectd-web-to-monitor-server-resources-in-linux/

4. 这里有一个综合的安装介绍: 使用的前端是 Collection3, 推荐使用CGP

https://fishilico.github.io/generic-config/etc-server/web/collectd.html

进阶

1. 为collectd 增加一个python的plugin来监控cpu 使用率

https://blog.csdn.net/ffeiffei/article/details/50670411

2. How to Write a Collectd Plugin with Python

https://www.tuicool.com/articles/niiIFra

3. shell plugin

http://blog.kankanan.com/article/4f7f7528-collectd-8fdb884c670d52a176d163a7.html

List of front-ends

From collectd Wiki
 
Jump to: navigationsearch

The following is a list of front-ends to the data collected by collectd.

Name Type Framework Engine Flush
Collectd Graph Panel Web-based PHP RRDtool Yes
Collectd Graph Z Web-based PHP (based on CGP) RRDtool Yes
Collectd-web Web-based CGI RRDtool No
CollectGraph Web-based MoinMoin wiki unknown unknown
Collection 3 Web-based CGI RRDtool Yes
Collection 4 Web-based FastCGI gRaphaël, RRDtool No
Collectd-carbon Web-based Django Graphite/Carbon No
collectw Web-based FastCGI gRaphaël No
EcoStats Web-based CGI RRDtool No
Facette Web-based Go http package HighCharts Yes
Heymon Web-based Ruby on Rails RRDtool No
Jarmon Web-based jQuery, Javascript RRD, Flowplayer Tools, (Twisted) Flot No
kcollectd Stand-alone KDE Qt No
Observium Web-based PHP RRDtool Yes
PerfWatcher Web-based PHP RRDtool Yes
Visage Web-based Ruby + Sinatra, MooTools HighCharts (SVG) No
Vizir Web-based Ruby on Rails Rickshaw/D3js Yes
Sick Muse Web-based Python, jQuery, Backbone.js Flot unknown
RRDscout Web-based Python, Flask RRDtool unknown

collectd 检测cpu使用率的更多相关文章

  1. 服务降级 托底预案 Nginx中使用Lua脚本检测CPU使用率,当达到阀值时开启限流,让用户排队

    https://mp.weixin.qq.com/s/FZAcQQAKomGEe95kln1HCQ 在京东我们是如何做服务降级的 https://mp.weixin.qq.com/s/FZAcQQAK ...

  2. linux服务器检测CPU使用率、负载以及java占用CPU使用率的shell脚本

    #!/bin/bash CPU=`top -b -n 1|grep Cpu|awk '{print $2}'|cut -f 1 -d "."`LOAD=`top -b -n 1|g ...

  3. 《Troubleshooting SQL Server》读书笔记-CPU使用率过高(下)

    <Troubleshooting SQL Server>读书笔记-CPU使用率过高(下) 第三章 High CPU Utilization. CPU使用率过高的常见原因 查询优化器会尽量从 ...

  4. 记java应用linux服务单个CPU使用率100%分析

    之前在做项目的过程中,项目完成后在linux服务器上做性能测试,当服务跑起来的时候发现cpu使用率很奇怪,java应用把单个cpu跑满了,其他cpu利用率0%. 刚开始遇到这问题的时候我第一时间反应使 ...

  5. 查看CPU使用率

    rem 如果wmi服务(服务名为Winmgmt)坏掉了,需要到system32\webm目录下执行如下注释的命令 rem for %i in (*.dll) do RegSvr32 -s %i rem ...

  6. Linux VPS通过安装CPULimit来限制CPU使用率

    说明:我们手上经常有很多廉价的VPS,有时候使用某些软件应用的时候,会出现CPU跑满的情况,而长时间跑满会被VPS商家停掉,所以这里我们需要想办法来限制进程CPU使用率,这里就说个教程. 简介 cpu ...

  7. (笔记)Linux下查看CPU使用率的命令

    1.top 使用权限:所有使用者 使用方式:top [-] [d delay] [q] [c] [S] [s] [i] [n] [b] 说明:即时显示process的动态 d :改变显示的更新速度,或 ...

  8. 分析CPU使用率不断增加的原因

    工程中发现引起的问题: 结合别的朋友的意见,我的优化思路是: 1.排查是否内存泄漏 经过反复查询代码,未发现有内存泄漏(可以自己百度搜索C#内存泄漏的原因).可以通过任务管理器分析是否有内存泄漏,打开 ...

  9. jmeter+influxdb+granfana+collectd监控cpu+mem+TPS

    1.安装grafana #####gafana过期安装包安装报错 Error unpacking rpm package grafana-5.1.4-1.x86_64error: unpacking ...

随机推荐

  1. Linux学习笔记:常用100条命令(一)

    linux常用命令 1.关机 shutdown -h now 立刻关机 poweroff shutdown -r now 立刻重启 reboot logout 注销 2.进入图形界面 startx 3 ...

  2. jquery dataTables例子

    https://datatables.net/examples/styling/bootstrap.html http://datatables.club/example/#styling http: ...

  3. windows 服务器硬盘的分区

    进入Server 2012的操作系统,打开CMD框,输入:diskmgmt.msc,回车. 操作完第一步后会弹出“磁盘管理”的框.鼠标右键点击红框所在位置,选中“压缩卷”. 在“输入压缩空间量(MB) ...

  4. C++ 解析json串

    首先, C++ 解析json串,需要用到第三方库(json_vc71_libmtd.lib).然后,VS2010,创建项目json_read,配置项目属性.最后,拷贝下面的代码就可以看到效果了. #i ...

  5. 使用promisify解决fs的回调地狱问题

  6. uvm设计分析——report

    uvm_report实现中的类图,如下: 1)uvm_component均从uvm_report_object extend而来,其中定义了report_warning,error,info,fata ...

  7. Vue系列之 => 使用钩子函数的第二个参数传参

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  8. 关于 redis、memcache、mongoDB 的对比 转

    从以下几个维度,对 redis.memcache.mongoDB 做了对比.1.性能都比较高,性能对我们来说应该都不是瓶颈.总体来讲,TPS 方面 redis 和 memcache 差不多,要大于 m ...

  9. win10 在任务栏添加 desktop 快捷图标

    http://www.xitongcheng.com/jiaocheng/win10_article_11980.html [Shell] Command= IconFile=explorer.exe ...

  10. 网站图标 favicon.ico

    默认情况下,浏览器访问一个网站的时候,同时还会向服务器请求“/favicon.ico”这个URL,目的是获取网站的图标. 若没有配置的话,Django就会返回一个404错误,并且浏览器接收到这个404 ...