环境配置

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. CentOS6.5 安装openssl

    安装比较简单! 1.下载安装包 [root@mycentos ~]# wget http://www.openssl.org/source/openssl-1.0.2f.tar.gz 2.解压和编译 ...

  2. Stacking调参总结

    1. 回归 训练了两个回归器,GBDT和Xgboost,用这两个回归器做stacking 使用之前已经调好参的训练器 gbdt_nxf = GradientBoostingRegressor(lear ...

  3. PHP "松散比较"

    PHP 的整数和字符串比较是 "松散比较" var_dump('dev' == 0); bool(true) switch switch 在进行比较的时候,只是对值进行比较(&qu ...

  4. vim自动安装插件Vundle

    https://github.com/VundleVim/Vundle.vim Set up Vundle: git clone https://github.com/VundleVim/Vundle ...

  5. android 通过页面上关键字快速定位代码

    这里定位微信关于页面, 当然可以直接获取当前最顶层activity 反编译apk后 搜索 strings.xml,找到对应id 搜索文件到用到id对应的成员变量,通常 是在R*.smali文件中 字符 ...

  6. js函数中写默认值的几种方式(常见的)

    <script> <!--第一种写法,我更喜欢第一种写法直观一些--> function Person(name){ this.name = name || '默认名字乔丹'; ...

  7. Dapper基础入门

    Dapper是一个轻量级的ORM.之前最常用的ORM是EF,其实EF底层是Ado.net实现的. 现在基本上已经远离SqlHelper时代了. Dapper是开源的  https://github.c ...

  8. HDU 4565 So Easy(矩阵解公式)

    So Easy [题目链接]So Easy [题目类型]矩阵解公式 &题解: 感觉这种类型的题都是一个套路,这题和hdu 2256就几乎是一样的. 所以最后2Xn就是答案 [时间复杂度]\(O ...

  9. c# Mongodb创建自增列

    MongoCollection<BsonDocument> tblCount; if (!db.CollectionExists(tblCountName))            {   ...

  10. c#Stream学习笔记

    C# 温故而知新:Stream篇(—) http://www.cnblogs.com/JimmyZheng/archive/2012/03/17/2402814.html 基本概念重点看这一篇. 什么 ...