环境配置

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. python demjson

    这个是第三方的json库 首先安装 http://deron.meranda.us/python/demjson/ demjson-2.2.4.tar.gz #tar -xzf demjson-2.2 ...

  2. Response.Redirect & window.location.href

    对接中信的微信H5支付时,对方(其实是微信)需要对我们的域名进行授权,即,我方需向渠道报备支付域名,微信只认可由此域名发起的支付交易. 支付中心只提供了一套支付接口供下游系统访问.因为给渠道报备的域名 ...

  3. 漏洞复现:Struts2 S2-032 漏洞环境

    Struts2 S2-032 漏洞环境 http://vulapps.evalbug.com/s_struts2_s2-032/ POC: http://127.0.0.1/memoindex.act ...

  4. LeetCode111.二叉树的最小深度

    给定一个二叉树,找出其最小深度. 最小深度是从根节点到最近叶子节点的最短路径上的节点数量. 说明: 叶子节点是指没有子节点的节点. 示例: 给定二叉树 [3,9,20,null,null,15,7], ...

  5. C#会对于未赋值的变量/成员变量,给予一个初始值吗?

    如果我有程序如下: C# code   ? 1 2 3 4 5 6 7     public class My     {         public bool b;         public  ...

  6. Ajax的重构

    Ajax的重构方法: (1)创建一个单独的JS文件,命名为AjaxRequest.js,并且在该文件中编写重构Ajax所需要的代码. var net = new Object(); //创建一个全局变 ...

  7. Ajax三级联动

    全国省市县查询 html代码 <!doctype html> <html> <head> <meta charset="utf-8"> ...

  8. caffe运行训练脚本时报错:Unknown bottom blob 'data' (layer 'conv1',bottom index 0)

    报错的两种报错原因: 1.输入数的路径错误,需要将路径进行修改排查目录是否出错 2.训练原数据格式不对 3.train.prototxt文件中并未设置test层,而在solver层则设置了test的迭 ...

  9. c#关于字符串格式化

    1. 如何使用文化来格式化日期 如: /// <summary> /// 根据语言获取文化名称 /// </summary> /// <returns></r ...

  10. python3 TypeError: a bytes-like object is required, not 'str'

    在学习<Python web开发学习实录>时, 例11-1: # !/usr/bin/env python # coding=utf-8 import socket sock = sock ...