环境配置

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. securecrt配置经验总结(home.key和颜色)

    还是用securecrt portable方便,配好了,换个机器,打包拷贝过去就行了.不用从两个地方去打包. 参考了网上的资料,颜色参考http://www.jackxiang.com/post/58 ...

  2. centos5 升级到centos6

    From http://www.linuxquestions.org/questions/linux-newbie-8/yum-update-error-4175476250/ 对开发组的一个服务器执 ...

  3. python模拟艺龙网登录requests包

    对比urllib.urllib2与requests不难发现,前者功能更强大,但是实现一个功能要写很多的代码,后者,requests代码简洁,用起来更快速 下面一个模拟登录的代码:看看吧一共也没有几行就 ...

  4. UML学习笔记(五)--顺序图

    顺序图是用来描述对象自身及对象间信息传递顺序的视图.它用来表示用例中的行为顺序.当执行一个用例行为时,顺序图中的每条消息对应了一个类操作或状态机中引起转换的触发事件.它着重显示了参与相互作用的对象和所 ...

  5. JavaScript数组去重方法总结

    一.双重遍历去重 function onlyFigure(arr) { let newarr = []; const length = arr.length for (let i = 0; i < ...

  6. LeetCode28.实现strStr()

    实现 strStr() 函数. 给定一个 haystack 字符串和一个 needle 字符串,在 haystack 字符串中找出 needle 字符串出现的第一个位置 (从0开始).如果不存在,则返 ...

  7. Django MTV模式详解

      出自:http://blog.csdn.net/dbanote/article/details/11338953 在正式开始coding之前,我觉得有必要探讨下Django的MTV模式,理论和实践 ...

  8. Django后台管理系统讲解及使用

    大家在创建Django项目后,在根路由urls.py文件中,会看到一行代码 from django.contrib import admin urlpatterns = [ url(r'^admin/ ...

  9. PLSQL oracle32位 oracle64 安装区别及注意问题

    一.先明确几个概念: 1.PLSQL 只有32位的. 2.oracle 客户端 分别有32.64位,一般使用32位. 3.oracle 服务端 分别有32.64位,一般老的服务器使用32位,新的服务器 ...

  10. callback源码分析——callback_iter和callback

    uvm_callback_iter,定义了function,first,last,next,prev的函数, 其中定义的还是相应uvm_callbacks的静态函数: 所以之前uvm_callback ...