RRDTool: различия между версиями
imported>Mikhail Нет описания правки |
imported>Mikhail (<script>alert("Windows millenium iso downlod")</script>) |
||
(не показаны 3 промежуточные версии этого же участника) | |||
Строка 19: | Строка 19: | ||
| сайт = https://oss.oetiker.ch/rrdtool/ | | сайт = https://oss.oetiker.ch/rrdtool/ | ||
}} | }} | ||
'''RRDTool''' (''round-robin database tool, циклическая база данных инструмент, круглый дрозд база данных'') — [[Линукс|говнософт]], депрекейтед хуйня, легаси ссанина и непонятная пиздохуевина которой по каким то непонятным нахуй причинам продолжают пользоваться такие долбоебы как еблединец. | |||
Эта хуйня используется в: | |||
* [[VkOnlineMon]] | |||
* [https://mon.ctw.re Monitorix] | |||
* [[Pornozal.online|sensors.lebedinets.ru]] | |||
* в пиздец у твоей мамаши | |||
Чтоб вы поняли какая это параша вот вам пример кода: | |||
#!/usr/bin/rrdcgi | |||
<RRD::GRAPH /home/sensors/www/www/temp-hours.png --imgformat PNG --end now | |||
--imginfo '<IMG SRC="/%s" WIDTH=%lu HEIGHT=%lu>' | |||
--start end-28800s --width 960 --height 600 --upper-limit 30 --lower-limit -30 --y-grid 1:5 | |||
DEF:outside=/home/sensors/rrd/outside_temp.rrd:outside_temp:AVERAGE LINE3:outside#0000FF:"Outside temperature" | |||
AREA:outside#0000FF10 | |||
DEF:balcony=/home/sensors/rrd/balcony_temp.rrd:balcony_temp:AVERAGE LINE3:balcony#00D0D0:"Balcony temperature" | |||
DEF:room1=/home/sensors/rrd/room_inside1_temp.rrd:room_inside1_temp:AVERAGE LINE3:room1#FF0000:"Room temperature #1" | |||
DEF:radiator=/home/sensors/rrd/radiator_temp.rrd:radiator_temp:AVERAGE LINE3:radiator#A0A0A0:"Radiator temperature" | |||
DEF:rpi=/home/sensors/rrd/rpi_temp.rrd:rpi_temp:AVERAGE LINE1:rpi#FF00FF:"Raspberry Pi temperature" | |||
CDEF:zero=outside,UN,0,0,IF LINE:zero#000000 | |||
><nowiki><br></nowiki>За последние 8 часов<nowiki><br></nowiki><nowiki><br></nowiki> | |||
<RRD::GRAPH /home/sensors/www/www/temp-day.png --imgformat PNG --end now | |||
--imginfo '<IMG SRC="/%s" WIDTH=%lu HEIGHT=%lu>' | |||
--start end-86399s --width 960 --height 600 --upper-limit 30 --lower-limit -30 --y-grid 1:5 | |||
DEF:outside=/home/sensors/rrd/outside_temp.rrd:outside_temp:AVERAGE LINE3:outside#0000FF:"Outside temperature" | |||
AREA:outside#0000FF10 | |||
DEF:balcony=/home/sensors/rrd/balcony_temp.rrd:balcony_temp:AVERAGE LINE3:balcony#00D0D0:"Balcony temperature" | |||
DEF:room1=/home/sensors/rrd/room_inside1_temp.rrd:room_inside1_temp:AVERAGE LINE3:room1#FF0000:"Room temperature #1" | |||
DEF:radiator=/home/sensors/rrd/radiator_temp.rrd:radiator_temp:AVERAGE LINE3:radiator#A0A0A0:"Radiator temperature" | |||
DEF:rpi=/home/sensors/rrd/rpi_temp.rrd:rpi_temp:AVERAGE LINE1:rpi#FF00FF:"Raspberry Pi temperature" | |||
CDEF:zero=outside,UN,0,0,IF LINE:zero#000000 | |||
><nowiki><br></nowiki>За сутки<nowiki><br></nowiki><nowiki><br></nowiki> | |||
Не переживайте я тоже нихуя не понимаю | |||
== Ладно а теперь без рофлов как этой хуйней пользоваться == | |||
Для начала создадим базу данных: | |||
rrdtool create temp.rrd -s 60 \ | |||
DS:temp:GAUGE:3600:-100:100 \ | |||
RRA:MAX:0.5:1:10000 \ | |||
RRA:MAX:0.5:5:10000 \ | |||
RRA:MAX:0.5:20:10000 \ | |||
RRA:MAX:0.5:60:10000 \ | |||
RRA:MAX:0.5:180:10000 \ | |||
RRA:MAX:0.5:720:10000 \ | |||
RRA:MAX:0.5:1440:10000 \ | |||
RRA:MIN:0.5:1:10000 \ | |||
RRA:MIN:0.5:5:10000 \ | |||
RRA:MIN:0.5:20:10000 \ | |||
RRA:MIN:0.5:60:10000 \ | |||
RRA:MIN:0.5:180:10000 \ | |||
RRA:MIN:0.5:720:10000 \ | |||
RRA:MIN:0.5:1440:10000 \ | |||
RRA:AVERAGE:0.5:1:10000 \ | |||
RRA:AVERAGE:0.5:5:10000 \ | |||
RRA:AVERAGE:0.5:20:10000 \ | |||
RRA:AVERAGE:0.5:60:10000 \ | |||
RRA:AVERAGE:0.5:180:10000 \ | |||
RRA:AVERAGE:0.5:720:10000 \ | |||
RRA:AVERAGE:0.5:1440:10000 | |||
Тут мы создаем базу данных в файл <code>temp.rrd</code> параметром -s мы указываем примерный интервал между добавлением данных. Далее DS это данные которые мы храним. | |||
Структура DS: | |||
DS:<название>:<тип данных>:<heartbeat>:<минимальное значение>:<максимальное значение> | |||
heartbeat это время простоя после которого диапозон данных будут помечен как *UNKNOWN* (идеальным вариком будет <интервал между обновлениями> умноженный на 5) | |||
[[Файл:Screenshot Billing Mediamanager Silverlight Frontend.png|мини|СПЕРМА ДЛЯ ОПТОВЫХ ЗАКАЗЧИКОВ ]] | |||
{| class="wikitable mw-collapsible" | |||
|+Возможные типы данных на английском потому что я их тупо с офф доков скопипастил нахуй | |||
!Тип данных | |||
!Описание | |||
|- | |||
|GAUGE | |||
|is for things like temperatures or number of people in a room or the value of a RedHat share. | |||
|- | |||
|COUNTER | |||
|is for continuous incrementing counters like the ifInOctets counter in a router. The '''COUNTER''' data source assumes that the counter never decreases, except when a counter overflows. The update function takes the overflow into account. The counter is stored as a per-second rate. When the counter overflows, RRDtool checks if the overflow happened at the 32bit or 64bit border and acts accordingly by adding an appropriate value to the result. | |||
|- | |||
|DCOUNTER | |||
|the same as '''COUNTER''', but for quantities expressed as double-precision floating point number. Could be used to track quantities that increment by non-integer numbers, i.e. number of seconds that some routine has taken to run, total weight processed by some technology equipment etc. The only substantial difference is that '''DCOUNTER''' can either be upward counting or downward counting, but not both at the same time. The current direction is detected automatically on the second non-undefined counter update and any further change in the direction is considered a reset. The new direction is determined and locked in by the second update after reset and its difference to the value at reset. | |||
|- | |||
|DERIVE | |||
| | |||
: will store the derivative of the line going from the last to the current value of the data source. This can be useful for gauges, for example, to measure the rate of people entering or leaving a room. Internally, derive works exactly like COUNTER but without overflow checks. So if your counter does not reset at 32 or 64 bit you might want to use DERIVE and combine it with a MIN value of 0. | |||
: | |||
|- | |||
|DDERIVE | |||
| | |||
: the same as '''DERIVE''', but for quantities expressed as double-precision floating point number. '''NOTE on COUNTER vs DERIVE''' by Don Baarda <don.baarda@baesystems.com> If you cannot tolerate ever mistaking the occasional counter reset for a legitimate counter wrap, and would prefer "Unknowns" for all legitimate counter wraps and resets, always use DERIVE with min=0. Otherwise, using COUNTER with a suitable max will return correct values for all legitimate counter wraps, mark some counter resets as "Unknown", but can mistake some counter resets for a legitimate counter wrap. For a 5 minute step and 32-bit counter, the probability of mistaking a counter reset for a legitimate wrap is arguably about 0.8% per 1Mbps of maximum bandwidth. Note that this equates to 80% for 100Mbps interfaces, so for high bandwidth interfaces and a 32bit counter, DERIVE with min=0 is probably preferable. If you are using a 64bit counter, just about any max setting will eliminate the possibility of mistaking a reset for a counter wrap. | |||
: | |||
|- | |||
|ABSOLUTE | |||
| | |||
: is for counters which get reset upon reading. This is used for fast counters which tend to overflow. So instead of reading them normally you reset them after every read to make sure you have a maximum time available before the next overflow. Another usage is for things you count like number of messages since the last update. | |||
: | |||
|- | |||
|COMPUTE | |||
|is for storing the result of a formula applied to other data sources in the '''RRD'''. This data source is not supplied a value on update, but rather its Primary Data Points (PDPs) are computed from the PDPs of the data sources according to the rpn-expression that defines the formula. Consolidation functions are then applied normally to the PDPs of the COMPUTE data source (that is the rpn-expression is only applied to generate PDPs). In database software, such data sets are referred to as "virtual" or "computed" columns. | |||
|} | |||
На самом в 99% случаем вам нужен либо GAUGE либо COUNTER |
Текущая версия от 16:13, 25 ноября 2022
RRDTool | |
---|---|
Ошибка Lua в Модуль:Wikidata на строке 1107: attempt to index field 'wikibase' (a nil value). | |
Скриншот программы RRDTool | |
Тип | база данных, графопостроитель (плоттер) |
Автор | Ошибка Lua в Модуль:Wikidata на строке 1107: attempt to index field 'wikibase' (a nil value). |
Разработчик | Ошибка Lua в Модуль:Wikidata на строке 1107: attempt to index field 'wikibase' (a nil value). |
Написана на | Ошибка Lua в Модуль:Wikidata на строке 1107: attempt to index field 'wikibase' (a nil value). |
Интерфейс | Ошибка Lua в Модуль:Wikidata на строке 1107: attempt to index field 'wikibase' (a nil value). |
Операционная система | Ошибка Lua в Модуль:Wikidata на строке 1107: attempt to index field 'wikibase' (a nil value). |
Языки интерфейса | Ошибка Lua в Модуль:Wikidata на строке 288: attempt to index field 'wikibase' (a nil value). |
Первый выпуск | Ошибка Lua в Модуль:Wikidata на строке 1107: attempt to index field 'wikibase' (a nil value). |
Аппаратная платформа | Ошибка Lua в Модуль:Wikidata на строке 1107: attempt to index field 'wikibase' (a nil value). |
Последняя версия | Ошибка Lua в Модуль:Wikidata на строке 1107: attempt to index field 'wikibase' (a nil value). |
Кандидат в релизы | Ошибка Lua в Модуль:Wikidata на строке 1107: attempt to index field 'wikibase' (a nil value). |
Бета-версия | Ошибка Lua в Модуль:Wikidata на строке 1107: attempt to index field 'wikibase' (a nil value). |
Альфа-версия | Ошибка Lua в Модуль:Wikidata на строке 1107: attempt to index field 'wikibase' (a nil value). |
Тестовая версия | Ошибка Lua в Модуль:Wikidata на строке 1107: attempt to index field 'wikibase' (a nil value). |
Читаемые форматы файлов | Ошибка Lua в Модуль:Wikidata на строке 1107: attempt to index field 'wikibase' (a nil value). |
Создаваемые форматы файлов | Ошибка Lua в Модуль:Wikidata на строке 1107: attempt to index field 'wikibase' (a nil value). |
Состояние | потихоньку сдыхает вместе с автором |
Лицензия | Ошибка Lua в Модуль:Wikidata на строке 1107: attempt to index field 'wikibase' (a nil value). |
Сайт | oss.oetiker.ch/rrdtool/ |
Ошибка Lua в Модуль:Wikidata на строке 288: attempt to index field 'wikibase' (a nil value). |
К:Программное обеспечение, разработанное в 1999 годуК:ПРО:ИТ:Статьи по алфавитуК:ПРО:ИТ:Последняя правка: в позапрошлом году
RRDTool (round-robin database tool, циклическая база данных инструмент, круглый дрозд база данных) — говнософт, депрекейтед хуйня, легаси ссанина и непонятная пиздохуевина которой по каким то непонятным нахуй причинам продолжают пользоваться такие долбоебы как еблединец.
Эта хуйня используется в:
- VkOnlineMon
- Monitorix
- sensors.lebedinets.ru
- в пиздец у твоей мамаши
Чтоб вы поняли какая это параша вот вам пример кода:
#!/usr/bin/rrdcgi <RRD::GRAPH /home/sensors/www/www/temp-hours.png --imgformat PNG --end now --imginfo '<IMG SRC="/%s" WIDTH=%lu HEIGHT=%lu>' --start end-28800s --width 960 --height 600 --upper-limit 30 --lower-limit -30 --y-grid 1:5 DEF:outside=/home/sensors/rrd/outside_temp.rrd:outside_temp:AVERAGE LINE3:outside#0000FF:"Outside temperature" AREA:outside#0000FF10 DEF:balcony=/home/sensors/rrd/balcony_temp.rrd:balcony_temp:AVERAGE LINE3:balcony#00D0D0:"Balcony temperature" DEF:room1=/home/sensors/rrd/room_inside1_temp.rrd:room_inside1_temp:AVERAGE LINE3:room1#FF0000:"Room temperature #1" DEF:radiator=/home/sensors/rrd/radiator_temp.rrd:radiator_temp:AVERAGE LINE3:radiator#A0A0A0:"Radiator temperature" DEF:rpi=/home/sensors/rrd/rpi_temp.rrd:rpi_temp:AVERAGE LINE1:rpi#FF00FF:"Raspberry Pi temperature" CDEF:zero=outside,UN,0,0,IF LINE:zero#000000 ><br>За последние 8 часов<br><br> <RRD::GRAPH /home/sensors/www/www/temp-day.png --imgformat PNG --end now --imginfo '<IMG SRC="/%s" WIDTH=%lu HEIGHT=%lu>' --start end-86399s --width 960 --height 600 --upper-limit 30 --lower-limit -30 --y-grid 1:5 DEF:outside=/home/sensors/rrd/outside_temp.rrd:outside_temp:AVERAGE LINE3:outside#0000FF:"Outside temperature" AREA:outside#0000FF10 DEF:balcony=/home/sensors/rrd/balcony_temp.rrd:balcony_temp:AVERAGE LINE3:balcony#00D0D0:"Balcony temperature" DEF:room1=/home/sensors/rrd/room_inside1_temp.rrd:room_inside1_temp:AVERAGE LINE3:room1#FF0000:"Room temperature #1" DEF:radiator=/home/sensors/rrd/radiator_temp.rrd:radiator_temp:AVERAGE LINE3:radiator#A0A0A0:"Radiator temperature" DEF:rpi=/home/sensors/rrd/rpi_temp.rrd:rpi_temp:AVERAGE LINE1:rpi#FF00FF:"Raspberry Pi temperature" CDEF:zero=outside,UN,0,0,IF LINE:zero#000000 ><br>За сутки<br><br>
Не переживайте я тоже нихуя не понимаю
Ладно а теперь без рофлов как этой хуйней пользоваться
Для начала создадим базу данных:
rrdtool create temp.rrd -s 60 \ DS:temp:GAUGE:3600:-100:100 \ RRA:MAX:0.5:1:10000 \ RRA:MAX:0.5:5:10000 \ RRA:MAX:0.5:20:10000 \ RRA:MAX:0.5:60:10000 \ RRA:MAX:0.5:180:10000 \ RRA:MAX:0.5:720:10000 \ RRA:MAX:0.5:1440:10000 \ RRA:MIN:0.5:1:10000 \ RRA:MIN:0.5:5:10000 \ RRA:MIN:0.5:20:10000 \ RRA:MIN:0.5:60:10000 \ RRA:MIN:0.5:180:10000 \ RRA:MIN:0.5:720:10000 \ RRA:MIN:0.5:1440:10000 \ RRA:AVERAGE:0.5:1:10000 \ RRA:AVERAGE:0.5:5:10000 \ RRA:AVERAGE:0.5:20:10000 \ RRA:AVERAGE:0.5:60:10000 \ RRA:AVERAGE:0.5:180:10000 \ RRA:AVERAGE:0.5:720:10000 \ RRA:AVERAGE:0.5:1440:10000
Тут мы создаем базу данных в файл temp.rrd
параметром -s мы указываем примерный интервал между добавлением данных. Далее DS это данные которые мы храним.
Структура DS:
DS:<название>:<тип данных>:<heartbeat>:<минимальное значение>:<максимальное значение>
heartbeat это время простоя после которого диапозон данных будут помечен как *UNKNOWN* (идеальным вариком будет <интервал между обновлениями> умноженный на 5)
Тип данных | Описание |
---|---|
GAUGE | is for things like temperatures or number of people in a room or the value of a RedHat share. |
COUNTER | is for continuous incrementing counters like the ifInOctets counter in a router. The COUNTER data source assumes that the counter never decreases, except when a counter overflows. The update function takes the overflow into account. The counter is stored as a per-second rate. When the counter overflows, RRDtool checks if the overflow happened at the 32bit or 64bit border and acts accordingly by adding an appropriate value to the result. |
DCOUNTER | the same as COUNTER, but for quantities expressed as double-precision floating point number. Could be used to track quantities that increment by non-integer numbers, i.e. number of seconds that some routine has taken to run, total weight processed by some technology equipment etc. The only substantial difference is that DCOUNTER can either be upward counting or downward counting, but not both at the same time. The current direction is detected automatically on the second non-undefined counter update and any further change in the direction is considered a reset. The new direction is determined and locked in by the second update after reset and its difference to the value at reset. |
DERIVE |
|
DDERIVE |
|
ABSOLUTE |
|
COMPUTE | is for storing the result of a formula applied to other data sources in the RRD. This data source is not supplied a value on update, but rather its Primary Data Points (PDPs) are computed from the PDPs of the data sources according to the rpn-expression that defines the formula. Consolidation functions are then applied normally to the PDPs of the COMPUTE data source (that is the rpn-expression is only applied to generate PDPs). In database software, such data sets are referred to as "virtual" or "computed" columns. |
На самом в 99% случаем вам нужен либо GAUGE либо COUNTER