Old Wangxue Linux-rrdtool

Source: Internet
Author: User
Tags rrd rrdtool

installation of Rrdtool:

Rrdtool-1.

Rrdtool-devel-1.

Rrdtool-perl-1.

Database for data collection:

Rrdtoll Create TEST.RRD--step 5--start-1ds:testds:gauge:8:0:u rra:averge:0.5:1:17280 rra:averge:.5:10:3456 rra:averge:.5:100:1210

Create TEST.RRD: Creating

--step 5: time S

--start-1: When to start s default 10

Ds:testds:gauge:8:0:u: Name: Type : maximum wait Time: Minimum number: Maximum

rra:averge:0.5:1:17280: average: Find out how many marks are unknown: How much to save (5s a day can collect 86400 )

Get Data:

Rrdtool Update

Drawing:

Rrdtool GRAPH/GRAPHV filename

next take MySQL as an example

Database for data collection:

Rrdtoll Create mysql.rrd--step 3ds:myselect:counter:5:0:u rra:averge:0.5:1:28800 rra:max:0.5:10:2880 RRA:LAST:0. 5:1:28800

script to collect Data : Vim getselect.sh

#!/bin/bash

While True;do

select= "Mysql–batch–e ' SHOW GLOBAL statuslike ' Com_select ' | awk '/com_select/[print [$] ' "

Rrdtool update mysql.rrd N: $SELECT

Sleep 3

Done

to initiate query data to MySQL:

Build diagram:

Rrdtool graph Mysql.pn–s Some point-t ' mysqlselect ' –v ' SELECTS/3 ' def:select3=mysql.rrd:myselect:average:step=3 def:max30=mysql.rrd:myselect:max:step=30line1:select3#ff0000: ' Select ' Gprint:max: "maximum\:%6.21f"


Old Wangxue Linux-rrdtool

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.