@cryptotaxi247 / netdata-1 / commits / 171a60571

fixed a bug in the incremental calculations where the exact duration (in nanoseconds) between incremental updates was not taken into account, so the values were always calculated using the pre-agreed update_every duration

Costa Tsaousis (ktsaou) committed Nov 26, 2015 at 01:30 UTC 171a60571572067aad59fbee9f975b05b8663001
22 files changed +300 -290
charts.d/airsearches.chart.sh
+1 -1
@@ -57,7 +57,7 @@ airsearches_create() {
57 echo "CHART airsearches.affiliates '' 'Air Searches per affiliate' 'requests / min' airsearches '' stacked 20000 $airsearches_update_every"
58 for x in $airsearches_cmds
59 do
60 - echo "DIMENSION $x '' incremental 60 $airsearches_update_every"
60 + echo "DIMENSION $x '' incremental 60 1"
61 done
62
63 return 0
charts.d/cpu_apps.chart.sh
+1 -1
@@ -34,7 +34,7 @@ cpu_apps_create() {
34 local x=
35 for x in $cpu_apps_apps
36 do
37 - echo "DIMENSION $x $x incremental 1000 $((cpu_apps_clockticks * cpu_apps_update_every))"
37 + echo "DIMENSION $x $x incremental 1000 $cpu_apps_clockticks"
38
39 # this string is needed later in the update() function
40 # to finalize the instructions for the bc command
charts.d/crsproxy.chart.sh
+9 -9
@@ -54,18 +54,18 @@ DIMENSION web '' absolute 1 1
54 DIMENSION native '' absolute 1 1
55 DIMENSION virtual '' absolute 1 1
56 CHART crsproxy.requests '' "CRS Proxy Requests Rate" "requests / min" crsproxy '' area 20001 $crsproxy_update_every
57 -DIMENSION web '' incremental 60 $crsproxy_update_every
58 -DIMENSION native '' incremental -60 $crsproxy_update_every
57 +DIMENSION web '' incremental 60 1
58 +DIMENSION native '' incremental -60 1
59 CHART crsproxy.clients '' "CRS Proxy Clients Rate" "clients / min" crsproxy '' area 20010 $crsproxy_update_every
60 -DIMENSION web '' incremental 60 $crsproxy_update_every
61 -DIMENSION native '' incremental -60 $crsproxy_update_every
62 -DIMENSION virtual '' incremental 60 $crsproxy_update_every
60 +DIMENSION web '' incremental 60 1
61 +DIMENSION native '' incremental -60 1
62 +DIMENSION virtual '' incremental 60 1
63 CHART crsproxy.replies '' "CRS Replies Rate" "replies / min" crsproxy '' area 20020 $crsproxy_update_every
64 -DIMENSION ok '' incremental 60 $crsproxy_update_every
65 -DIMENSION failed '' incremental -60 $crsproxy_update_every
64 +DIMENSION ok '' incremental 60 1
65 +DIMENSION failed '' incremental -60 1
66 CHART crsproxy.bconnections '' "Back-End Connections Rate" "connections / min" crsproxy '' area 20030 $crsproxy_update_every
67 -DIMENSION ok '' incremental 60 $crsproxy_update_every
68 -DIMENSION failed '' incremental -60 $crsproxy_update_every
67 +DIMENSION ok '' incremental 60 1
68 +DIMENSION failed '' incremental -60 1
69 EOF
70
71 local x=
charts.d/mysql.chart.sh
+62 -62
@@ -164,76 +164,76 @@ mysql_create() {
164 do
165 cat <<EOF
166 CHART mysql_$m.bandwidth '' "mysql Bandwidth" "kilobits/s" mysql_$m mysql area 20001 $mysql_update_every
167 -DIMENSION Bytes_received in incremental 8 $((1024 * mysql_update_every))
168 -DIMENSION Bytes_sent out incremental -8 $((1024 * mysql_update_every))
167 +DIMENSION Bytes_received in incremental 8 1024
168 +DIMENSION Bytes_sent out incremental -8 1024
169
170 CHART mysql_$m.queries '' "mysql Queries" "queries/s" mysql_$m mysql line 20002 $mysql_update_every
171 -DIMENSION Queries queries incremental 1 $((1 * mysql_update_every))
172 -DIMENSION Questions questions incremental 1 $((1 * mysql_update_every))
173 -DIMENSION Slow_queries slow_queries incremental -1 $((1 * mysql_update_every))
171 +DIMENSION Queries queries incremental 1 1
172 +DIMENSION Questions questions incremental 1 1
173 +DIMENSION Slow_queries slow_queries incremental -1 1
174
175 CHART mysql_$m.handlers '' "mysql Handlers" "handlers/s" mysql_$m mysql line 20003 $mysql_update_every
176 -DIMENSION Handler_commit commit incremental 1 $((1 * mysql_update_every))
177 -DIMENSION Handler_delete delete incremental 1 $((1 * mysql_update_every))
178 -DIMENSION Handler_prepare prepare incremental 1 $((1 * mysql_update_every))
179 -DIMENSION Handler_read_first read_first incremental 1 $((1 * mysql_update_every))
180 -DIMENSION Handler_read_key read_key incremental 1 $((1 * mysql_update_every))
181 -DIMENSION Handler_read_next read_next incremental 1 $((1 * mysql_update_every))
182 -DIMENSION Handler_read_prev read_prev incremental 1 $((1 * mysql_update_every))
183 -DIMENSION Handler_read_rnd read_rnd incremental 1 $((1 * mysql_update_every))
184 -DIMENSION Handler_read_rnd_next read_rnd_next incremental 1 $((1 * mysql_update_every))
185 -DIMENSION Handler_rollback rollback incremental 1 $((1 * mysql_update_every))
186 -DIMENSION Handler_savepoint savepoint incremental 1 $((1 * mysql_update_every))
187 -DIMENSION Handler_savepoint_rollback savepoint_rollback incremental 1 $((1 * mysql_update_every))
188 -DIMENSION Handler_update update incremental 1 $((1 * mysql_update_every))
189 -DIMENSION Handler_write write incremental 1 $((1 * mysql_update_every))
176 +DIMENSION Handler_commit commit incremental 1 1
177 +DIMENSION Handler_delete delete incremental 1 1
178 +DIMENSION Handler_prepare prepare incremental 1 1
179 +DIMENSION Handler_read_first read_first incremental 1 1
180 +DIMENSION Handler_read_key read_key incremental 1 1
181 +DIMENSION Handler_read_next read_next incremental 1 1
182 +DIMENSION Handler_read_prev read_prev incremental 1 1
183 +DIMENSION Handler_read_rnd read_rnd incremental 1 1
184 +DIMENSION Handler_read_rnd_next read_rnd_next incremental 1 1
185 +DIMENSION Handler_rollback rollback incremental 1 1
186 +DIMENSION Handler_savepoint savepoint incremental 1 1
187 +DIMENSION Handler_savepoint_rollback savepoint_rollback incremental 1 1
188 +DIMENSION Handler_update update incremental 1 1
189 +DIMENSION Handler_write write incremental 1 1
190
191 CHART mysql_$m.table_locks '' "mysql Tables Locks" "locks/s" mysql_$m mysql line 20004 $mysql_update_every
192 -DIMENSION Table_locks_immediate immediate incremental 1 $((1 * mysql_update_every))
193 -DIMENSION Table_locks_waited waited incremental -1 $((1 * mysql_update_every))
192 +DIMENSION Table_locks_immediate immediate incremental 1 1
193 +DIMENSION Table_locks_waited waited incremental -1 1
194
195 CHART mysql_$m.join_issues '' "mysql Select Join Issues" "joins/s" mysql_$m mysql line 20005 $mysql_update_every
196 -DIMENSION Select_full_join full_join incremental 1 $((1 * mysql_update_every))
197 -DIMENSION Select_full_range_join full_range_join incremental 1 $((1 * mysql_update_every))
198 -DIMENSION Select_range range incremental 1 $((1 * mysql_update_every))
199 -DIMENSION Select_range_check range_check incremental 1 $((1 * mysql_update_every))
200 -DIMENSION Select_scan scan incremental 1 $((1 * mysql_update_every))
196 +DIMENSION Select_full_join full_join incremental 1 1
197 +DIMENSION Select_full_range_join full_range_join incremental 1 1
198 +DIMENSION Select_range range incremental 1 1
199 +DIMENSION Select_range_check range_check incremental 1 1
200 +DIMENSION Select_scan scan incremental 1 1
201
202 CHART mysql_$m.sort_issues '' "mysql Sort Issues" "issues/s" mysql_$m mysql line 20006 $mysql_update_every
203 -DIMENSION Sort_merge_passes merge_passes incremental 1 $((1 * mysql_update_every))
204 -DIMENSION Sort_range range incremental 1 $((1 * mysql_update_every))
205 -DIMENSION Sort_scan scan incremental 1 $((1 * mysql_update_every))
203 +DIMENSION Sort_merge_passes merge_passes incremental 1 1
204 +DIMENSION Sort_range range incremental 1 1
205 +DIMENSION Sort_scan scan incremental 1 1
206
207 CHART mysql_$m.tmp '' "mysql Tmp Operations" "counter" mysql_$m mysql line 20007 $mysql_update_every
208 -DIMENSION Created_tmp_disk_tables disk_tables incremental 1 $((1 * mysql_update_every))
209 -DIMENSION Created_tmp_files files incremental 1 $((1 * mysql_update_every))
210 -DIMENSION Created_tmp_tables tables incremental 1 $((1 * mysql_update_every))
208 +DIMENSION Created_tmp_disk_tables disk_tables incremental 1 1
209 +DIMENSION Created_tmp_files files incremental 1 1
210 +DIMENSION Created_tmp_tables tables incremental 1 1
211
212 CHART mysql_$m.connections '' "mysql Connections" "connections/s" mysql_$m mysql line 20009 $mysql_update_every
213 -DIMENSION Connections all incremental 1 $((1 * mysql_update_every))
214 -DIMENSION Aborted_connects aborded incremental 1 $((1 * mysql_update_every))
213 +DIMENSION Connections all incremental 1 1
214 +DIMENSION Aborted_connects aborded incremental 1 1
215
216 CHART mysql_$m.binlog_cache '' "mysql Binlog Cache" "transactions/s" mysql_$m mysql line 20010 $mysql_update_every
217 -DIMENSION Binlog_cache_disk_use disk incremental 1 $((1 * mysql_update_every))
218 -DIMENSION Binlog_cache_use all incremental 1 $((1 * mysql_update_every))
217 +DIMENSION Binlog_cache_disk_use disk incremental 1 1
218 +DIMENSION Binlog_cache_use all incremental 1 1
219
220 CHART mysql_$m.threads '' "mysql Threads" "threads" mysql_$m mysql line 20012 $mysql_update_every
221 DIMENSION Threads_connected connected absolute 1 1
222 -DIMENSION Threads_created created incremental 1 $((1 * mysql_update_every))
222 +DIMENSION Threads_created created incremental 1 1
223 DIMENSION Threads_cached cached absolute -1 1
224 -DIMENSION Threads_running running absolute 1 $((1 * mysql_update_every))
224 +DIMENSION Threads_running running absolute 1 1
225
226 CHART mysql_$m.thread_cache_misses '' "mysql Threads Cache Misses" "misses" mysql_$m mysql area 20013 $mysql_update_every
227 DIMENSION misses misses absolute 1 100
228
229 CHART mysql_$m.innodb_io '' "mysql InnoDB I/O Bandwidth" "kilobytes/s" mysql_$m mysql area 20014 $mysql_update_every
230 -DIMENSION Innodb_data_read read incremental 1 $((1000 * mysql_update_every))
231 -DIMENSION Innodb_data_written write incremental -1 $((1000 * mysql_update_every))
230 +DIMENSION Innodb_data_read read incremental 1 1024
231 +DIMENSION Innodb_data_written write incremental -1 1024
232
233 CHART mysql_$m.innodb_io_ops '' "mysql InnoDB I/O Operations" "operations/s" mysql_$m mysql line 20015 $mysql_update_every
234 -DIMENSION Innodb_data_reads reads incremental 1 $((1 * mysql_update_every))
235 -DIMENSION Innodb_data_writes writes incremental -1 $((1 * mysql_update_every))
236 -DIMENSION Innodb_data_fsyncs fsyncs incremental 1 $((1 * mysql_update_every))
234 +DIMENSION Innodb_data_reads reads incremental 1 1
235 +DIMENSION Innodb_data_writes writes incremental -1 1
236 +DIMENSION Innodb_data_fsyncs fsyncs incremental 1 1
237
238 CHART mysql_$m.innodb_io_pending_ops '' "mysql InnoDB Pending I/O Operations" "operations/s" mysql_$m mysql line 20015 $mysql_update_every
239 DIMENSION Innodb_data_pending_reads reads absolute 1 1
@@ -241,26 +241,26 @@ DIMENSION Innodb_data_pending_writes writes absolute -1 1
241 DIMENSION Innodb_data_pending_fsyncs fsyncs absolute 1 1
242
243 CHART mysql_$m.innodb_log '' "mysql InnoDB Log Operations" "operations/s" mysql_$m mysql line 20016 $mysql_update_every
244 -DIMENSION Innodb_log_waits waits incremental 1 $((1 * mysql_update_every))
245 -DIMENSION Innodb_log_write_requests write_requests incremental -1 $((1 * mysql_update_every))
246 -DIMENSION Innodb_log_writes writes incremental -1 $((1 * mysql_update_every))
244 +DIMENSION Innodb_log_waits waits incremental 1 1
245 +DIMENSION Innodb_log_write_requests write_requests incremental -1 1
246 +DIMENSION Innodb_log_writes writes incremental -1 1
247
248 CHART mysql_$m.innodb_os_log '' "mysql InnoDB OS Log Operations" "operations/s" mysql_$m mysql line 20017 $mysql_update_every
249 -DIMENSION Innodb_os_log_fsyncs fsyncs incremental 1 $((1 * mysql_update_every))
250 -DIMENSION Innodb_os_log_pending_fsyncs pending_fsyncs incremental 1 $((1 * mysql_update_every))
251 -DIMENSION Innodb_os_log_pending_writes pending_writes incremental -1 $((1 * mysql_update_every))
249 +DIMENSION Innodb_os_log_fsyncs fsyncs incremental 1 1
250 +DIMENSION Innodb_os_log_pending_fsyncs pending_fsyncs incremental 1 1
251 +DIMENSION Innodb_os_log_pending_writes pending_writes incremental -1 1
252
253 CHART mysql_$m.innodb_os_log_io '' "mysql InnoDB OS Log Bandwidth" "kilobytes/s" mysql_$m mysql area 20018 $mysql_update_every
254 -DIMENSION Innodb_os_log_written write incremental -1 $((1000 * mysql_update_every))
254 +DIMENSION Innodb_os_log_written write incremental -1 1024
255
256 CHART mysql_$m.innodb_cur_row_lock '' "mysql InnoDB Current Row Locks" "operations" mysql_$m mysql area 20019 $mysql_update_every
257 DIMENSION Innodb_row_lock_current_waits current_waits absolute 1 1
258
259 CHART mysql_$m.innodb_rows '' "mysql InnoDB Row Operations" "operations/s" mysql_$m mysql area 20020 $mysql_update_every
260 -DIMENSION Innodb_rows_read read incremental 1 $((1 * mysql_update_every))
261 -DIMENSION Innodb_rows_deleted deleted incremental -1 $((1 * mysql_update_every))
262 -DIMENSION Innodb_rows_inserted inserted incremental 1 $((1 * mysql_update_every))
263 -DIMENSION Innodb_rows_updated updated incremental -1 $((1 * mysql_update_every))
260 +DIMENSION Innodb_rows_read read incremental 1 1
261 +DIMENSION Innodb_rows_deleted deleted incremental -1 1
262 +DIMENSION Innodb_rows_inserted inserted incremental 1 1
263 +DIMENSION Innodb_rows_updated updated incremental -1 1
264
265 EOF
266
@@ -268,8 +268,8 @@ EOF
268 then
269 cat <<EOF
270 CHART mysql_$m.binlog_stmt_cache '' "mysql Binlog Statement Cache" "statements/s" mysql_$m mysql line 20011 $mysql_update_every
271 -DIMENSION Binlog_stmt_cache_disk_use disk incremental 1 $((1 * mysql_update_every))
272 -DIMENSION Binlog_stmt_cache_use all incremental 1 $((1 * mysql_update_every))
271 +DIMENSION Binlog_stmt_cache_disk_use disk incremental 1 1
272 +DIMENSION Binlog_stmt_cache_use all incremental 1 1
273 EOF
274 fi
275
@@ -277,12 +277,12 @@ EOF
277 then
278 cat <<EOF
279 CHART mysql_$m.connection_errors '' "mysql Connection Errors" "connections/s" mysql_$m mysql line 20008 $mysql_update_every
280 -DIMENSION Connection_errors_accept accept incremental 1 $((1 * mysql_update_every))
281 -DIMENSION Connection_errors_internal internal incremental 1 $((1 * mysql_update_every))
282 -DIMENSION Connection_errors_max_connections max incremental 1 $((1 * mysql_update_every))
283 -DIMENSION Connection_errors_peer_addr peer_addr incremental 1 $((1 * mysql_update_every))
284 -DIMENSION Connection_errors_select select incremental 1 $((1 * mysql_update_every))
285 -DIMENSION Connection_errors_tcpwrap tcpwrap incremental 1 $((1 * mysql_update_every))
280 +DIMENSION Connection_errors_accept accept incremental 1 1
281 +DIMENSION Connection_errors_internal internal incremental 1 1
282 +DIMENSION Connection_errors_max_connections max incremental 1 1
283 +DIMENSION Connection_errors_peer_addr peer_addr incremental 1 1
284 +DIMENSION Connection_errors_select select incremental 1 1
285 +DIMENSION Connection_errors_tcpwrap tcpwrap incremental 1 1
286 EOF
287 fi
288
charts.d/opensips.chart.sh
+40 -40
@@ -52,79 +52,79 @@ CHART opensips.users '' "OpenSIPS Users" "users" opensips '' line 20002 $opensip
52 DIMENSION usrloc_registered_users registered absolute 1 1
53 DIMENSION usrloc_location_users location absolute 1 1
54 DIMENSION usrloc_location_contacts contacts absolute 1 1
55 -DIMENSION usrloc_location_expires expires incremental -1 $((1 * opensips_update_every))
55 +DIMENSION usrloc_location_expires expires incremental -1 1
56
57 CHART opensips.registrar '' "OpenSIPS Registrar" "registrations/s" opensips '' line 20003 $opensips_update_every
58 -DIMENSION registrar_accepted_regs accepted incremental 1 $((1 * opensips_update_every))
59 -DIMENSION registrar_rejected_regs rejected incremental -1 $((1 * opensips_update_every))
58 +DIMENSION registrar_accepted_regs accepted incremental 1 1
59 +DIMENSION registrar_rejected_regs rejected incremental -1 1
60
61 CHART opensips.transactions '' "OpenSIPS Transactions" "transactions/s" opensips '' line 20004 $opensips_update_every
62 -DIMENSION tm_UAS_transactions UAS incremental 1 $((1 * opensips_update_every))
63 -DIMENSION tm_UAC_transactions UAC incremental -1 $((1 * opensips_update_every))
62 +DIMENSION tm_UAS_transactions UAS incremental 1 1
63 +DIMENSION tm_UAC_transactions UAC incremental -1 1
64
65 CHART opensips.core_rcv '' "OpenSIPS Core Receives" "queries/s" opensips '' line 20005 $opensips_update_every
66 -DIMENSION core_rcv_requests requests incremental 1 $((1 * opensips_update_every))
67 -DIMENSION core_rcv_replies replies incremental -1 $((1 * opensips_update_every))
66 +DIMENSION core_rcv_requests requests incremental 1 1
67 +DIMENSION core_rcv_replies replies incremental -1 1
68
69 CHART opensips.core_fwd '' "OpenSIPS Core Forwards" "queries/s" opensips '' line 20006 $opensips_update_every
70 -DIMENSION core_fwd_requests requests incremental 1 $((1 * opensips_update_every))
71 -DIMENSION core_fwd_replies replies incremental -1 $((1 * opensips_update_every))
70 +DIMENSION core_fwd_requests requests incremental 1 1
71 +DIMENSION core_fwd_replies replies incremental -1 1
72
73 CHART opensips.core_drop '' "OpenSIPS Core Drops" "queries/s" opensips '' line 20007 $opensips_update_every
74 -DIMENSION core_drop_requests requests incremental 1 $((1 * opensips_update_every))
75 -DIMENSION core_drop_replies replies incremental -1 $((1 * opensips_update_every))
74 +DIMENSION core_drop_requests requests incremental 1 1
75 +DIMENSION core_drop_replies replies incremental -1 1
76
77 CHART opensips.core_err '' "OpenSIPS Core Errors" "queries/s" opensips '' line 20008 $opensips_update_every
78 -DIMENSION core_err_requests requests incremental 1 $((1 * opensips_update_every))
79 -DIMENSION core_err_replies replies incremental -1 $((1 * opensips_update_every))
78 +DIMENSION core_err_requests requests incremental 1 1
79 +DIMENSION core_err_replies replies incremental -1 1
80
81 CHART opensips.core_bad '' "OpenSIPS Core Bad" "queries/s" opensips '' line 20009 $opensips_update_every
82 -DIMENSION core_bad_URIs_rcvd bad_URIs_rcvd incremental 1 $((1 * opensips_update_every))
83 -DIMENSION core_unsupported_methods unsupported_methods incremental 1 $((1 * opensips_update_every))
84 -DIMENSION core_bad_msg_hdr bad_msg_hdr incremental 1 $((1 * opensips_update_every))
82 +DIMENSION core_bad_URIs_rcvd bad_URIs_rcvd incremental 1 1
83 +DIMENSION core_unsupported_methods unsupported_methods incremental 1 1
84 +DIMENSION core_bad_msg_hdr bad_msg_hdr incremental 1 1
85
86 CHART opensips.tm_replies '' "OpenSIPS TM Replies" "replies/s" opensips '' line 20010 $opensips_update_every
87 -DIMENSION tm_received_replies received incremental 1 $((1 * opensips_update_every))
88 -DIMENSION tm_relayed_replies relayed incremental 1 $((1 * opensips_update_every))
89 -DIMENSION tm_local_replies local incremental 1 $((1 * opensips_update_every))
87 +DIMENSION tm_received_replies received incremental 1 1
88 +DIMENSION tm_relayed_replies relayed incremental 1 1
89 +DIMENSION tm_local_replies local incremental 1 1
90
91 CHART opensips.transactions_status '' "OpenSIPS Transactions Status" "transactions/s" opensips '' line 20011 $opensips_update_every
92 -DIMENSION tm_2xx_transactions 2xx incremental 1 $((1 * opensips_update_every))
93 -DIMENSION tm_3xx_transactions 3xx incremental 1 $((1 * opensips_update_every))
94 -DIMENSION tm_4xx_transactions 4xx incremental 1 $((1 * opensips_update_every))
95 -DIMENSION tm_5xx_transactions 5xx incremental 1 $((1 * opensips_update_every))
96 -DIMENSION tm_6xx_transactions 6xx incremental 1 $((1 * opensips_update_every))
92 +DIMENSION tm_2xx_transactions 2xx incremental 1 1
93 +DIMENSION tm_3xx_transactions 3xx incremental 1 1
94 +DIMENSION tm_4xx_transactions 4xx incremental 1 1
95 +DIMENSION tm_5xx_transactions 5xx incremental 1 1
96 +DIMENSION tm_6xx_transactions 6xx incremental 1 1
97
98 CHART opensips.transactions_inuse '' "OpenSIPS InUse Transactions" "transactions" opensips '' line 20012 $opensips_update_every
99 DIMENSION tm_inuse_transactions inuse absolute 1 1
100
101 CHART opensips.sl_replies '' "OpenSIPS SL Replies" "replies/s" opensips '' line 20013 $opensips_update_every
102 -DIMENSION sl_1xx_replies 1xx incremental 1 $((1 * opensips_update_every))
103 -DIMENSION sl_2xx_replies 2xx incremental 1 $((1 * opensips_update_every))
104 -DIMENSION sl_3xx_replies 3xx incremental 1 $((1 * opensips_update_every))
105 -DIMENSION sl_4xx_replies 4xx incremental 1 $((1 * opensips_update_every))
106 -DIMENSION sl_5xx_replies 5xx incremental 1 $((1 * opensips_update_every))
107 -DIMENSION sl_6xx_replies 6xx incremental 1 $((1 * opensips_update_every))
108 -DIMENSION sl_sent_replies sent incremental 1 $((1 * opensips_update_every))
109 -DIMENSION sl_sent_err_replies error incremental 1 $((1 * opensips_update_every))
110 -DIMENSION sl_received_ACKs ACKed incremental 1 $((1 * opensips_update_every))
102 +DIMENSION sl_1xx_replies 1xx incremental 1 1
103 +DIMENSION sl_2xx_replies 2xx incremental 1 1
104 +DIMENSION sl_3xx_replies 3xx incremental 1 1
105 +DIMENSION sl_4xx_replies 4xx incremental 1 1
106 +DIMENSION sl_5xx_replies 5xx incremental 1 1
107 +DIMENSION sl_6xx_replies 6xx incremental 1 1
108 +DIMENSION sl_sent_replies sent incremental 1 1
109 +DIMENSION sl_sent_err_replies error incremental 1 1
110 +DIMENSION sl_received_ACKs ACKed incremental 1 1
111
112 CHART opensips.dialogs '' "OpenSIPS Dialogs" "dialogs/s" opensips '' line 20014 $opensips_update_every
113 -DIMENSION dialog_processed_dialogs processed incremental 1 $((1 * opensips_update_every))
114 -DIMENSION dialog_expired_dialogs expired incremental 1 $((1 * opensips_update_every))
115 -DIMENSION dialog_failed_dialogs failed incremental -1 $((1 * opensips_update_every))
113 +DIMENSION dialog_processed_dialogs processed incremental 1 1
114 +DIMENSION dialog_expired_dialogs expired incremental 1 1
115 +DIMENSION dialog_failed_dialogs failed incremental -1 1
116
117 CHART opensips.net_waiting '' "OpenSIPS Network Waiting" "kilobytes" opensips '' line 20015 $opensips_update_every
118 DIMENSION net_waiting_udp UDP absolute 1 1024
119 DIMENSION net_waiting_tcp TCP absolute 1 1024
120
121 CHART opensips.uri_checks '' "OpenSIPS URI Checks" "checks / sec" opensips '' line 20016 $opensips_update_every
122 -DIMENSION uri_positive_checks positive incremental 1 $((1 * opensips_update_every))
123 -DIMENSION uri_negative_checks negative incremental -1 $((1 * opensips_update_every))
122 +DIMENSION uri_positive_checks positive incremental 1 1
123 +DIMENSION uri_negative_checks negative incremental -1 1
124
125 CHART opensips.traces '' "OpenSIPS Traces" "traces / sec" opensips '' line 20017 $opensips_update_every
126 -DIMENSION siptrace_traced_requests requests incremental 1 $((1 * opensips_update_every))
127 -DIMENSION siptrace_traced_replies replies incremental -1 $((1 * opensips_update_every))
126 +DIMENSION siptrace_traced_requests requests incremental 1 1
127 +DIMENSION siptrace_traced_replies replies incremental -1 1
128
129 CHART opensips.shmem '' "OpenSIPS Shared Memory" "kilobytes" opensips '' line 20018 $opensips_update_every
130 DIMENSION shmem_total_size total absolute 1 1024
charts.d/squid.chart.sh
+10 -10
@@ -70,22 +70,22 @@ squid_create() {
70 # create the charts
71 cat <<EOF
72 CHART squid.clients_net '' "Squid Client Bandwidth" "kilobits / sec" squid '' area 20001 $squid_update_every
73 -DIMENSION client_http_kbytes_in in incremental 8 $((1 * squid_update_every))
74 -DIMENSION client_http_kbytes_out out incremental -8 $((1 * squid_update_every))
75 -DIMENSION client_http_hit_kbytes_out hits incremental -8 $((1 * squid_update_every))
73 +DIMENSION client_http_kbytes_in in incremental 8 1
74 +DIMENSION client_http_kbytes_out out incremental -8 1
75 +DIMENSION client_http_hit_kbytes_out hits incremental -8 1
76
77 CHART squid.clients_requests '' "Squid Client Requests" "requests / sec" squid '' line 20003 $squid_update_every
78 -DIMENSION client_http_requests requests incremental 1 $((1 * squid_update_every))
79 -DIMENSION client_http_hits hits incremental 1 $((1 * squid_update_every))
80 -DIMENSION client_http_errors errors incremental -1 $((1 * squid_update_every))
78 +DIMENSION client_http_requests requests incremental 1 1
79 +DIMENSION client_http_hits hits incremental 1 1
80 +DIMENSION client_http_errors errors incremental -1 1
81
82 CHART squid.servers_net '' "Squid Server Bandwidth" "kilobits / sec" squid '' area 20002 $squid_update_every
83 -DIMENSION server_all_kbytes_in in incremental 8 $((1 * squid_update_every))
84 -DIMENSION server_all_kbytes_out out incremental -8 $((1 * squid_update_every))
83 +DIMENSION server_all_kbytes_in in incremental 8 1
84 +DIMENSION server_all_kbytes_out out incremental -8 1
85
86 CHART squid.servers_requests '' "Squid Server Requests" "requests / sec" squid '' line 20004 $squid_update_every
87 -DIMENSION server_all_requests requests incremental 1 $((1 * squid_update_every))
88 -DIMENSION server_all_errors errors incremental -1 $((1 * squid_update_every))
87 +DIMENSION server_all_requests requests incremental 1 1
88 +DIMENSION server_all_errors errors incremental -1 1
89 EOF
90
91 return 0
src/apps_plugin.c
+12 -12
@@ -1743,7 +1743,7 @@ void show_charts(void)
1743 for (w = target_root; w ; w = w->next) {
1744 if(w->target || (!w->processes && !w->exposed)) continue;
1745
1746 - fprintf(stdout, "DIMENSION %s '' incremental 100 %llu %s\n", w->name, (unsigned long long)(Hertz * update_every), w->hidden?"hidden,noreset":"noreset");
1746 + fprintf(stdout, "DIMENSION %s '' incremental 100 %llu %s\n", w->name, (unsigned long long)(Hertz), w->hidden?"hidden,noreset":"noreset");
1747 }
1748
1749 fprintf(stdout, "CHART apps.mem '' 'Apps Dedicated Memory (w/o shared)' 'MB' apps apps stacked 20003 %d\n", update_every);
@@ -1771,56 +1771,56 @@ void show_charts(void)
1771 for (w = target_root; w ; w = w->next) {
1772 if(w->target || (!w->processes && !w->exposed)) continue;
1773
1774 - fprintf(stdout, "DIMENSION %s '' incremental 100 %llu noreset\n", w->name, Hertz * processors * update_every);
1774 + fprintf(stdout, "DIMENSION %s '' incremental 100 %llu noreset\n", w->name, Hertz * processors);
1775 }
1776
1777 fprintf(stdout, "CHART apps.cpu_system '' 'Apps CPU System Time (%ld%% = %ld core%s)' 'cpu time %%' apps none stacked 20021 %d\n", (processors * 100), processors, (processors>1)?"s":"", update_every);
1778 for (w = target_root; w ; w = w->next) {
1779 if(w->target || (!w->processes && !w->exposed)) continue;
1780
1781 - fprintf(stdout, "DIMENSION %s '' incremental 100 %llu noreset\n", w->name, Hertz * processors * update_every);
1781 + fprintf(stdout, "DIMENSION %s '' incremental 100 %llu noreset\n", w->name, Hertz * processors);
1782 }
1783
1784 fprintf(stdout, "CHART apps.major_faults '' 'Apps Major Page Faults (swaps in)' 'page faults/s' apps apps stacked 20010 %d\n", update_every);
1785 for (w = target_root; w ; w = w->next) {
1786 if(w->target || (!w->processes && !w->exposed)) continue;
1787
1788 - fprintf(stdout, "DIMENSION %s '' incremental 1 %d noreset\n", w->name, update_every);
1788 + fprintf(stdout, "DIMENSION %s '' incremental 1 1 noreset\n", w->name);
1789 }
1790
1791 fprintf(stdout, "CHART apps.minor_faults '' 'Apps Minor Page Faults' 'page faults/s' apps none stacked 20011 %d\n", update_every);
1792 for (w = target_root; w ; w = w->next) {
1793 if(w->target || (!w->processes && !w->exposed)) continue;
1794
1795 - fprintf(stdout, "DIMENSION %s '' incremental 1 %d noreset\n", w->name, update_every);
1795 + fprintf(stdout, "DIMENSION %s '' incremental 1 1 noreset\n", w->name);
1796 }
1797
1798 fprintf(stdout, "CHART apps.lreads '' 'Apps Disk Logical Reads' 'kilobytes/s' apps none stacked 20042 %d\n", update_every);
1799 for (w = target_root; w ; w = w->next) {
1800 if(w->target || (!w->processes && !w->exposed)) continue;
1801
1802 - fprintf(stdout, "DIMENSION %s '' incremental 1 %d noreset\n", w->name, 1024 * update_every);
1802 + fprintf(stdout, "DIMENSION %s '' incremental 1 %d noreset\n", w->name, 1024);
1803 }
1804
1805 fprintf(stdout, "CHART apps.lwrites '' 'Apps I/O Logical Writes' 'kilobytes/s' apps none stacked 20042 %d\n", update_every);
1806 for (w = target_root; w ; w = w->next) {
1807 if(w->target || (!w->processes && !w->exposed)) continue;
1808
1809 - fprintf(stdout, "DIMENSION %s '' incremental 1 %d noreset\n", w->name, 1024 * update_every);
1809 + fprintf(stdout, "DIMENSION %s '' incremental 1 %d noreset\n", w->name, 1024);
1810 }
1811
1812 fprintf(stdout, "CHART apps.preads '' 'Apps Disk Reads' 'kilobytes/s' apps apps stacked 20002 %d\n", update_every);
1813 for (w = target_root; w ; w = w->next) {
1814 if(w->target || (!w->processes && !w->exposed)) continue;
1815
1816 - fprintf(stdout, "DIMENSION %s '' incremental 1 %d noreset\n", w->name, 1024 * update_every);
1816 + fprintf(stdout, "DIMENSION %s '' incremental 1 %d noreset\n", w->name, 1024);
1817 }
1818
1819 fprintf(stdout, "CHART apps.pwrites '' 'Apps Disk Writes' 'kilobytes/s' apps apps stacked 20002 %d\n", update_every);
1820 for (w = target_root; w ; w = w->next) {
1821 if(w->target || (!w->processes && !w->exposed)) continue;
1822
1823 - fprintf(stdout, "DIMENSION %s '' incremental 1 %d noreset\n", w->name, 1024 * update_every);
1823 + fprintf(stdout, "DIMENSION %s '' incremental 1 %d noreset\n", w->name, 1024);
1824 }
1825
1826 fprintf(stdout, "CHART apps.files '' 'Apps Open Files' 'open files' apps apps stacked 20050 %d\n", update_every);
@@ -1845,11 +1845,11 @@ void show_charts(void)
1845 }
1846
1847 fprintf(stdout, "CHART netdata.apps_cpu '' 'Apps Plugin CPU' 'milliseconds/s' netdata netdata stacked 10000 %d\n", update_every);
1848 - fprintf(stdout, "DIMENSION user '' incremental 1 %d\n", 1000 * update_every);
1849 - fprintf(stdout, "DIMENSION system '' incremental 1 %d\n", 1000 * update_every);
1848 + fprintf(stdout, "DIMENSION user '' incremental 1 %d\n", 1000);
1849 + fprintf(stdout, "DIMENSION system '' incremental 1 %d\n", 1000);
1850
1851 fprintf(stdout, "CHART netdata.apps_files '' 'Apps Plugin Files' 'files/s' netdata netdata line 10001 %d\n", update_every);
1852 - fprintf(stdout, "DIMENSION files '' incremental 1 %d\n", update_every);
1852 + fprintf(stdout, "DIMENSION files '' incremental 1 1\n");
1853 fprintf(stdout, "DIMENSION pids '' absolute 1 1\n");
1854 fprintf(stdout, "DIMENSION fds '' absolute 1 1\n");
1855 fprintf(stdout, "DIMENSION targets '' absolute 1 1\n");
src/plugin_checks.c
+2 -2
@@ -32,11 +32,11 @@ void *checks_main(void *ptr)
32
33 check1 = rrdset_create("netdata", "check1", NULL, "netdata", "Caller gives microseconds", "a million !", 99999, rrd_update_every, RRDSET_TYPE_LINE);
34 rrddim_add(check1, "absolute", NULL, -1, 1, RRDDIM_ABSOLUTE);
35 - rrddim_add(check1, "incremental", NULL, 1, 1 * rrd_update_every, RRDDIM_INCREMENTAL);
35 + rrddim_add(check1, "incremental", NULL, 1, 1, RRDDIM_INCREMENTAL);
36
37 check2 = rrdset_create("netdata", "check2", NULL, "netdata", "Netdata calcs microseconds", "a million !", 99999, rrd_update_every, RRDSET_TYPE_LINE);
38 rrddim_add(check2, "absolute", NULL, -1, 1, RRDDIM_ABSOLUTE);
39 - rrddim_add(check2, "incremental", NULL, 1, 1 * rrd_update_every, RRDDIM_INCREMENTAL);
39 + rrddim_add(check2, "incremental", NULL, 1, 1, RRDDIM_INCREMENTAL);
40
41 check3 = rrdset_create("netdata", "checkdt", NULL, "netdata", "Clock difference", "microseconds diff", 99999, rrd_update_every, RRDSET_TYPE_LINE);
42 rrddim_add(check3, "caller", NULL, 1, 1, RRDDIM_ABSOLUTE);
src/plugin_proc.c
+7 -7
@@ -136,8 +136,8 @@ void *proc_main(void *ptr)
136 if(!stcpu_thread) {
137 stcpu_thread = rrdset_create("netdata", "plugin_proc_cpu", NULL, "netdata", "NetData Proc Plugin CPU usage", "milliseconds/s", 9999, rrd_update_every, RRDSET_TYPE_STACKED);
138
139 - rrddim_add(stcpu_thread, "user", NULL, 1, 1000 * rrd_update_every, RRDDIM_INCREMENTAL);
140 - rrddim_add(stcpu_thread, "system", NULL, 1, 1000 * rrd_update_every, RRDDIM_INCREMENTAL);
139 + rrddim_add(stcpu_thread, "user", NULL, 1, 1000, RRDDIM_INCREMENTAL);
140 + rrddim_add(stcpu_thread, "system", NULL, 1, 1000, RRDDIM_INCREMENTAL);
141 }
142 else rrdset_next(stcpu_thread);
143
@@ -151,8 +151,8 @@ void *proc_main(void *ptr)
151 if(!stcpu) {
152 stcpu = rrdset_create("netdata", "server_cpu", NULL, "netdata", "NetData CPU usage", "milliseconds/s", 2000, rrd_update_every, RRDSET_TYPE_STACKED);
153
154 - rrddim_add(stcpu, "user", NULL, 1, 1000 * rrd_update_every, RRDDIM_INCREMENTAL);
155 - rrddim_add(stcpu, "system", NULL, 1, 1000 * rrd_update_every, RRDDIM_INCREMENTAL);
154 + rrddim_add(stcpu, "user", NULL, 1, 1000, RRDDIM_INCREMENTAL);
155 + rrddim_add(stcpu, "system", NULL, 1, 1000, RRDDIM_INCREMENTAL);
156 }
157 else rrdset_next(stcpu);
158
@@ -179,7 +179,7 @@ void *proc_main(void *ptr)
179 if(!streqs) {
180 streqs = rrdset_create("netdata", "requests", NULL, "netdata", "NetData Web Requests", "requests/s", 3001, rrd_update_every, RRDSET_TYPE_LINE);
181
182 - rrddim_add(streqs, "requests", NULL, 1, 1 * rrd_update_every, RRDDIM_INCREMENTAL);
182 + rrddim_add(streqs, "requests", NULL, 1, 1, RRDDIM_INCREMENTAL);
183 }
184 else rrdset_next(streqs);
185
@@ -192,8 +192,8 @@ void *proc_main(void *ptr)
192 if(!stbytes) {
193 stbytes = rrdset_create("netdata", "net", NULL, "netdata", "NetData Network Traffic", "kilobits/s", 3002, rrd_update_every, RRDSET_TYPE_AREA);
194
195 - rrddim_add(stbytes, "in", NULL, 8, 1024 * rrd_update_every, RRDDIM_INCREMENTAL);
196 - rrddim_add(stbytes, "out", NULL, -8, 1024 * rrd_update_every, RRDDIM_INCREMENTAL);
195 + rrddim_add(stbytes, "in", NULL, 8, 1024, RRDDIM_INCREMENTAL);
196 + rrddim_add(stbytes, "out", NULL, -8, 1024, RRDDIM_INCREMENTAL);
197 }
198 else rrdset_next(stbytes);
199
src/plugin_tc.c
+4 -4
@@ -227,7 +227,7 @@ static void tc_device_commit(struct tc_device *d)
227 if(!c->updated) continue;
228
229 if(c->isleaf && c->hasparent)
230 - rrddim_add(st, c->id, c->name?c->name:c->id, 8, 1024 * rrd_update_every, RRDDIM_INCREMENTAL);
230 + rrddim_add(st, c->id, c->name?c->name:c->id, 8, 1024, RRDDIM_INCREMENTAL);
231 }
232 }
233 else {
@@ -247,7 +247,7 @@ static void tc_device_commit(struct tc_device *d)
247 debug(D_TC_LOOP, "TC: Adding to chart '%s', dimension '%s'", st->id, c->id, c->name);
248
249 // new class, we have to add it
250 - rd = rrddim_add(st, c->id, c->name?c->name:c->id, 8, 1024 * rrd_update_every, RRDDIM_INCREMENTAL);
250 + rd = rrddim_add(st, c->id, c->name?c->name:c->id, 8, 1024, RRDDIM_INCREMENTAL);
251 }
252 else debug(D_TC_LOOP, "TC: Updating chart '%s', dimension '%s'", st->id, c->id);
253
@@ -582,8 +582,8 @@ void *tc_main(void *ptr)
582 if(!stcpu) stcpu = rrdset_find("netdata.plugin_tc_cpu");
583 if(!stcpu) {
584 stcpu = rrdset_create("netdata", "plugin_tc_cpu", NULL, "netdata", "NetData TC CPU usage", "milliseconds/s", 10000, rrd_update_every, RRDSET_TYPE_STACKED);
585 - rrddim_add(stcpu, "user", NULL, 1, 1000 * rrd_update_every, RRDDIM_INCREMENTAL);
586 - rrddim_add(stcpu, "system", NULL, 1, 1000 * rrd_update_every, RRDDIM_INCREMENTAL);
585 + rrddim_add(stcpu, "user", NULL, 1, 1000, RRDDIM_INCREMENTAL);
586 + rrddim_add(stcpu, "system", NULL, 1, 1000, RRDDIM_INCREMENTAL);
587 }
588 else rrdset_next(stcpu);
589
src/proc_diskstats.c
+10 -10
@@ -274,8 +274,8 @@ int do_proc_diskstats(int update_every, unsigned long long dt) {
274
275 st = rrdset_create(RRD_TYPE_DISK, disk, NULL, disk, "Disk I/O Bandwidth", "kilobytes/s", 2000, update_every, RRDSET_TYPE_AREA);
276
277 - rrddim_add(st, "reads", NULL, sector_size, 1024 * update_every, RRDDIM_INCREMENTAL);
278 - rrddim_add(st, "writes", NULL, sector_size * -1, 1024 * update_every, RRDDIM_INCREMENTAL);
277 + rrddim_add(st, "reads", NULL, sector_size, 1024, RRDDIM_INCREMENTAL);
278 + rrddim_add(st, "writes", NULL, sector_size * -1, 1024, RRDDIM_INCREMENTAL);
279 }
280 else rrdset_next_usec(st, dt);
281
@@ -292,8 +292,8 @@ int do_proc_diskstats(int update_every, unsigned long long dt) {
292 st = rrdset_create("disk_ops", disk, NULL, disk, "Disk Completed I/O Operations", "operations/s", 2001, update_every, RRDSET_TYPE_LINE);
293 st->isdetail = 1;
294
295 - rrddim_add(st, "reads", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
296 - rrddim_add(st, "writes", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
295 + rrddim_add(st, "reads", NULL, 1, 1, RRDDIM_INCREMENTAL);
296 + rrddim_add(st, "writes", NULL, -1, 1, RRDDIM_INCREMENTAL);
297 }
298 else rrdset_next_usec(st, dt);
299
@@ -326,7 +326,7 @@ int do_proc_diskstats(int update_every, unsigned long long dt) {
326 st = rrdset_create("disk_backlog", disk, NULL, disk, "Disk Backlog", "backlog (ms)", 2003, update_every, RRDSET_TYPE_AREA);
327 st->isdetail = 1;
328
329 - rrddim_add(st, "backlog", NULL, 1, 10 * update_every, RRDDIM_INCREMENTAL);
329 + rrddim_add(st, "backlog", NULL, 1, 10, RRDDIM_INCREMENTAL);
330 }
331 else rrdset_next_usec(st, dt);
332
@@ -342,7 +342,7 @@ int do_proc_diskstats(int update_every, unsigned long long dt) {
342 st = rrdset_create("disk_util", disk, NULL, disk, "Disk Utilization Time", "% of time working", 2004, update_every, RRDSET_TYPE_AREA);
343 st->isdetail = 1;
344
345 - rrddim_add(st, "utilization", NULL, 1, 10 * update_every, RRDDIM_INCREMENTAL);
345 + rrddim_add(st, "utilization", NULL, 1, 10, RRDDIM_INCREMENTAL);
346 }
347 else rrdset_next_usec(st, dt);
348
@@ -358,8 +358,8 @@ int do_proc_diskstats(int update_every, unsigned long long dt) {
358 st = rrdset_create("disk_mops", disk, NULL, disk, "Disk Merged Operations", "merged operations/s", 2021, update_every, RRDSET_TYPE_LINE);
359 st->isdetail = 1;
360
361 - rrddim_add(st, "reads", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
362 - rrddim_add(st, "writes", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
361 + rrddim_add(st, "reads", NULL, 1, 1, RRDDIM_INCREMENTAL);
362 + rrddim_add(st, "writes", NULL, -1, 1, RRDDIM_INCREMENTAL);
363 }
364 else rrdset_next_usec(st, dt);
365
@@ -376,8 +376,8 @@ int do_proc_diskstats(int update_every, unsigned long long dt) {
376 st = rrdset_create("disk_iotime", disk, NULL, disk, "Disk Total I/O Time", "milliseconds/s", 2022, update_every, RRDSET_TYPE_LINE);
377 st->isdetail = 1;
378
379 - rrddim_add(st, "reads", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
380 - rrddim_add(st, "writes", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
379 + rrddim_add(st, "reads", NULL, 1, 1, RRDDIM_INCREMENTAL);
380 + rrddim_add(st, "writes", NULL, -1, 1, RRDDIM_INCREMENTAL);
381 }
382 else rrdset_next_usec(st, dt);
383
src/proc_interrupts.c
+2 -2
@@ -110,7 +110,7 @@ int do_proc_interrupts(int update_every, unsigned long long dt) {
110
111 for(l = 0; l < lines ;l++) {
112 if(!irrs[l].used) continue;
113 - rrddim_add(st, irrs[l].id, irrs[l].name, 1, update_every, RRDDIM_INCREMENTAL);
113 + rrddim_add(st, irrs[l].id, irrs[l].name, 1, 1, RRDDIM_INCREMENTAL);
114 }
115 }
116 else rrdset_next(st);
@@ -137,7 +137,7 @@ int do_proc_interrupts(int update_every, unsigned long long dt) {
137
138 for(l = 0; l < lines ;l++) {
139 if(!irrs[l].used) continue;
140 - rrddim_add(st, irrs[l].id, irrs[l].name, 1, update_every, RRDDIM_INCREMENTAL);
140 + rrddim_add(st, irrs[l].id, irrs[l].name, 1, 1, RRDDIM_INCREMENTAL);
141 }
142 }
143 else rrdset_next(st);
src/proc_net_dev.c
+14 -14
@@ -83,8 +83,8 @@ int do_proc_net_dev(int update_every, unsigned long long dt) {
83 if(!st) {
84 st = rrdset_create("net", iface, NULL, iface, "Bandwidth", "kilobits/s", 1000, update_every, RRDSET_TYPE_AREA);
85
86 - rrddim_add(st, "received", NULL, 8, 1024 * update_every, RRDDIM_INCREMENTAL);
87 - rrddim_add(st, "sent", NULL, -8, 1024 * update_every, RRDDIM_INCREMENTAL);
86 + rrddim_add(st, "received", NULL, 8, 1024, RRDDIM_INCREMENTAL);
87 + rrddim_add(st, "sent", NULL, -8, 1024, RRDDIM_INCREMENTAL);
88 }
89 else rrdset_next(st);
90
@@ -101,9 +101,9 @@ int do_proc_net_dev(int update_every, unsigned long long dt) {
101 st = rrdset_create("net_packets", iface, NULL, iface, "Packets", "packets/s", 1001, update_every, RRDSET_TYPE_LINE);
102 st->isdetail = 1;
103
104 - rrddim_add(st, "received", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
105 - rrddim_add(st, "sent", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
106 - rrddim_add(st, "multicast", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
104 + rrddim_add(st, "received", NULL, 1, 1, RRDDIM_INCREMENTAL);
105 + rrddim_add(st, "sent", NULL, -1, 1, RRDDIM_INCREMENTAL);
106 + rrddim_add(st, "multicast", NULL, 1, 1, RRDDIM_INCREMENTAL);
107 }
108 else rrdset_next(st);
109
@@ -121,8 +121,8 @@ int do_proc_net_dev(int update_every, unsigned long long dt) {
121 st = rrdset_create("net_errors", iface, NULL, iface, "Interface Errors", "errors/s", 1002, update_every, RRDSET_TYPE_LINE);
122 st->isdetail = 1;
123
124 - rrddim_add(st, "inbound", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
125 - rrddim_add(st, "outbound", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
124 + rrddim_add(st, "inbound", NULL, 1, 1, RRDDIM_INCREMENTAL);
125 + rrddim_add(st, "outbound", NULL, -1, 1, RRDDIM_INCREMENTAL);
126 }
127 else rrdset_next(st);
128
@@ -139,8 +139,8 @@ int do_proc_net_dev(int update_every, unsigned long long dt) {
139 st = rrdset_create("net_drops", iface, NULL, iface, "Interface Drops", "drops/s", 1003, update_every, RRDSET_TYPE_LINE);
140 st->isdetail = 1;
141
142 - rrddim_add(st, "inbound", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
143 - rrddim_add(st, "outbound", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
142 + rrddim_add(st, "inbound", NULL, 1, 1, RRDDIM_INCREMENTAL);
143 + rrddim_add(st, "outbound", NULL, -1, 1, RRDDIM_INCREMENTAL);
144 }
145 else rrdset_next(st);
146
@@ -175,8 +175,8 @@ int do_proc_net_dev(int update_every, unsigned long long dt) {
175 st = rrdset_create("net_compressed", iface, NULL, iface, "Compressed Packets", "packets/s", 1200, update_every, RRDSET_TYPE_LINE);
176 st->isdetail = 1;
177
178 - rrddim_add(st, "received", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
179 - rrddim_add(st, "sent", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
178 + rrddim_add(st, "received", NULL, 1, 1, RRDDIM_INCREMENTAL);
179 + rrddim_add(st, "sent", NULL, -1, 1, RRDDIM_INCREMENTAL);
180 }
181 else rrdset_next(st);
182
@@ -193,9 +193,9 @@ int do_proc_net_dev(int update_every, unsigned long long dt) {
193 st = rrdset_create("net_events", iface, NULL, iface, "Network Interface Events", "events/s", 1200, update_every, RRDSET_TYPE_LINE);
194 st->isdetail = 1;
195
196 - rrddim_add(st, "frames", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
197 - rrddim_add(st, "collisions", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
198 - rrddim_add(st, "carrier", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
196 + rrddim_add(st, "frames", NULL, 1, 1, RRDDIM_INCREMENTAL);
197 + rrddim_add(st, "collisions", NULL, -1, 1, RRDDIM_INCREMENTAL);
198 + rrddim_add(st, "carrier", NULL, -1, 1, RRDDIM_INCREMENTAL);
199 }
200 else rrdset_next(st);
201
src/proc_net_ip_vs_stats.c
+5 -5
@@ -56,7 +56,7 @@ int do_proc_net_ip_vs_stats(int update_every, unsigned long long dt) {
56 if(!st) {
57 st = rrdset_create(RRD_TYPE_NET_IPVS, "sockets", NULL, RRD_TYPE_NET_IPVS, "IPVS New Connections", "connections/s", 1001, update_every, RRDSET_TYPE_LINE);
58
59 - rrddim_add(st, "connections", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
59 + rrddim_add(st, "connections", NULL, 1, 1, RRDDIM_INCREMENTAL);
60 }
61 else rrdset_next(st);
62
@@ -71,8 +71,8 @@ int do_proc_net_ip_vs_stats(int update_every, unsigned long long dt) {
71 if(!st) {
72 st = rrdset_create(RRD_TYPE_NET_IPVS, "packets", NULL, RRD_TYPE_NET_IPVS, "IPVS Packets", "packets/s", 1002, update_every, RRDSET_TYPE_LINE);
73
74 - rrddim_add(st, "received", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
75 - rrddim_add(st, "sent", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
74 + rrddim_add(st, "received", NULL, 1, 1, RRDDIM_INCREMENTAL);
75 + rrddim_add(st, "sent", NULL, -1, 1, RRDDIM_INCREMENTAL);
76 }
77 else rrdset_next(st);
78
@@ -88,8 +88,8 @@ int do_proc_net_ip_vs_stats(int update_every, unsigned long long dt) {
88 if(!st) {
89 st = rrdset_create(RRD_TYPE_NET_IPVS, "net", NULL, RRD_TYPE_NET_IPVS, "IPVS Bandwidth", "kilobits/s", 1000, update_every, RRDSET_TYPE_AREA);
90
91 - rrddim_add(st, "received", NULL, 8, 1024 * update_every, RRDDIM_INCREMENTAL);
92 - rrddim_add(st, "sent", NULL, -8, 1024 * update_every, RRDDIM_INCREMENTAL);
91 + rrddim_add(st, "received", NULL, 8, 1024, RRDDIM_INCREMENTAL);
92 + rrddim_add(st, "sent", NULL, -8, 1024, RRDDIM_INCREMENTAL);
93 }
94 else rrdset_next(st);
95
src/proc_net_netstat.c
+12 -12
@@ -79,8 +79,8 @@ int do_proc_net_netstat(int update_every, unsigned long long dt) {
79 if(!st) {
80 st = rrdset_create("system", "ipv4", NULL, "ipv4", "IPv4 Bandwidth", "kilobits/s", 2000, update_every, RRDSET_TYPE_AREA);
81
82 - rrddim_add(st, "received", NULL, 8, 1024 * update_every, RRDDIM_INCREMENTAL);
83 - rrddim_add(st, "sent", NULL, -8, 1024 * update_every, RRDDIM_INCREMENTAL);
82 + rrddim_add(st, "received", NULL, 8, 1024, RRDDIM_INCREMENTAL);
83 + rrddim_add(st, "sent", NULL, -8, 1024, RRDDIM_INCREMENTAL);
84 }
85 else rrdset_next(st);
86
@@ -97,8 +97,8 @@ int do_proc_net_netstat(int update_every, unsigned long long dt) {
97 st = rrdset_create("ipv4", "inerrors", NULL, "ipv4", "IPv4 Input Errors", "packets/s", 4000, update_every, RRDSET_TYPE_LINE);
98 st->isdetail = 1;
99
100 - rrddim_add(st, "noroutes", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
101 - rrddim_add(st, "trunkated", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
100 + rrddim_add(st, "noroutes", NULL, 1, 1, RRDDIM_INCREMENTAL);
101 + rrddim_add(st, "trunkated", NULL, 1, 1, RRDDIM_INCREMENTAL);
102 }
103 else rrdset_next(st);
104
@@ -115,8 +115,8 @@ int do_proc_net_netstat(int update_every, unsigned long long dt) {
115 st = rrdset_create("ipv4", "mcast", NULL, "ipv4", "IPv4 Multicast Bandwidth", "kilobits/s", 9000, update_every, RRDSET_TYPE_AREA);
116 st->isdetail = 1;
117
118 - rrddim_add(st, "received", NULL, 8, 1024 * update_every, RRDDIM_INCREMENTAL);
119 - rrddim_add(st, "sent", NULL, -8, 1024 * update_every, RRDDIM_INCREMENTAL);
118 + rrddim_add(st, "received", NULL, 8, 1024, RRDDIM_INCREMENTAL);
119 + rrddim_add(st, "sent", NULL, -8, 1024, RRDDIM_INCREMENTAL);
120 }
121 else rrdset_next(st);
122
@@ -133,8 +133,8 @@ int do_proc_net_netstat(int update_every, unsigned long long dt) {
133 st = rrdset_create("ipv4", "bcast", NULL, "ipv4", "IPv4 Broadcast Bandwidth", "kilobits/s", 8000, update_every, RRDSET_TYPE_AREA);
134 st->isdetail = 1;
135
136 - rrddim_add(st, "received", NULL, 8, 1024 * update_every, RRDDIM_INCREMENTAL);
137 - rrddim_add(st, "sent", NULL, -8, 1024 * update_every, RRDDIM_INCREMENTAL);
136 + rrddim_add(st, "received", NULL, 8, 1024, RRDDIM_INCREMENTAL);
137 + rrddim_add(st, "sent", NULL, -8, 1024, RRDDIM_INCREMENTAL);
138 }
139 else rrdset_next(st);
140
@@ -151,8 +151,8 @@ int do_proc_net_netstat(int update_every, unsigned long long dt) {
151 st = rrdset_create("ipv4", "mcastpkts", NULL, "ipv4", "IPv4 Multicast Packets", "packets/s", 9500, update_every, RRDSET_TYPE_LINE);
152 st->isdetail = 1;
153
154 - rrddim_add(st, "received", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
155 - rrddim_add(st, "sent", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
154 + rrddim_add(st, "received", NULL, 1, 1, RRDDIM_INCREMENTAL);
155 + rrddim_add(st, "sent", NULL, -1, 1, RRDDIM_INCREMENTAL);
156 }
157 else rrdset_next(st);
158
@@ -169,8 +169,8 @@ int do_proc_net_netstat(int update_every, unsigned long long dt) {
169 st = rrdset_create("ipv4", "bcastpkts", NULL, "ipv4", "IPv4 Broadcast Packets", "packets/s", 8500, update_every, RRDSET_TYPE_LINE);
170 st->isdetail = 1;
171
172 - rrddim_add(st, "received", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
173 - rrddim_add(st, "sent", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
172 + rrddim_add(st, "received", NULL, 1, 1, RRDDIM_INCREMENTAL);
173 + rrddim_add(st, "sent", NULL, -1, 1, RRDDIM_INCREMENTAL);
174 }
175 else rrdset_next(st);
176
src/proc_net_rpc_nfsd.c
+31 -31
@@ -422,9 +422,9 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
422 if(!st) {
423 st = rrdset_create("nfsd", "readcache", NULL, "nfsd", "Read Cache", "reads/s", 5000, update_every, RRDSET_TYPE_STACKED);
424
425 - rrddim_add(st, "hits", NULL, 1, update_every, RRDDIM_INCREMENTAL);
426 - rrddim_add(st, "misses", NULL, 1, update_every, RRDDIM_INCREMENTAL);
427 - rrddim_add(st, "nocache", NULL, 1, update_every, RRDDIM_INCREMENTAL);
425 + rrddim_add(st, "hits", NULL, 1, 1, RRDDIM_INCREMENTAL);
426 + rrddim_add(st, "misses", NULL, 1, 1, RRDDIM_INCREMENTAL);
427 + rrddim_add(st, "nocache", NULL, 1, 1, RRDDIM_INCREMENTAL);
428 }
429 else rrdset_next(st);
430
@@ -442,11 +442,11 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
442 st = rrdset_create("nfsd", "filehandles", NULL, "nfsd", "File Handles", "handles/s", 5001, update_every, RRDSET_TYPE_LINE);
443 st->isdetail = 1;
444
445 - rrddim_add(st, "stale", NULL, 1, update_every, RRDDIM_ABSOLUTE);
446 - rrddim_add(st, "total_lookups", NULL, 1, update_every, RRDDIM_INCREMENTAL);
447 - rrddim_add(st, "anonymous_lookups", NULL, 1, update_every, RRDDIM_INCREMENTAL);
448 - rrddim_add(st, "dir_not_in_dcache", NULL, -1, update_every, RRDDIM_INCREMENTAL);
449 - rrddim_add(st, "non_dir_not_in_dcache", NULL, -1, update_every, RRDDIM_INCREMENTAL);
445 + rrddim_add(st, "stale", NULL, 1, 1, RRDDIM_ABSOLUTE);
446 + rrddim_add(st, "total_lookups", NULL, 1, 1, RRDDIM_INCREMENTAL);
447 + rrddim_add(st, "anonymous_lookups", NULL, 1, 1, RRDDIM_INCREMENTAL);
448 + rrddim_add(st, "dir_not_in_dcache", NULL, -1, 1, RRDDIM_INCREMENTAL);
449 + rrddim_add(st, "non_dir_not_in_dcache", NULL, -1, 1, RRDDIM_INCREMENTAL);
450 }
451 else rrdset_next(st);
452
@@ -465,8 +465,8 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
465 if(!st) {
466 st = rrdset_create("nfsd", "io", NULL, "nfsd", "I/O", "kilobytes/s", 5002, update_every, RRDSET_TYPE_AREA);
467
468 - rrddim_add(st, "read", NULL, 1, 1000 * update_every, RRDDIM_INCREMENTAL);
469 - rrddim_add(st, "write", NULL, -1, 1000 * update_every, RRDDIM_INCREMENTAL);
468 + rrddim_add(st, "read", NULL, 1, 1000, RRDDIM_INCREMENTAL);
469 + rrddim_add(st, "write", NULL, -1, 1000, RRDDIM_INCREMENTAL);
470 }
471 else rrdset_next(st);
472
@@ -493,7 +493,7 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
493 if(!st) {
494 st = rrdset_create("nfsd", "threads_fullcnt", NULL, "nfsd", "Threads Full Count", "ops/s", 5004, update_every, RRDSET_TYPE_LINE);
495
496 - rrddim_add(st, "full_count", NULL, 1, update_every, RRDDIM_INCREMENTAL);
496 + rrddim_add(st, "full_count", NULL, 1, 1, RRDDIM_INCREMENTAL);
497 }
498 else rrdset_next(st);
499
@@ -537,17 +537,17 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
537 if(!st) {
538 st = rrdset_create("nfsd", "readahead", NULL, "nfsd", "Read Ahead Depth", "percentage", 5005, update_every, RRDSET_TYPE_STACKED);
539
540 - rrddim_add(st, "10%", NULL, 1, update_every, RRDDIM_PCENT_OVER_DIFF_TOTAL);
541 - rrddim_add(st, "20%", NULL, 1, update_every, RRDDIM_PCENT_OVER_DIFF_TOTAL);
542 - rrddim_add(st, "30%", NULL, 1, update_every, RRDDIM_PCENT_OVER_DIFF_TOTAL);
543 - rrddim_add(st, "40%", NULL, 1, update_every, RRDDIM_PCENT_OVER_DIFF_TOTAL);
544 - rrddim_add(st, "50%", NULL, 1, update_every, RRDDIM_PCENT_OVER_DIFF_TOTAL);
545 - rrddim_add(st, "60%", NULL, 1, update_every, RRDDIM_PCENT_OVER_DIFF_TOTAL);
546 - rrddim_add(st, "70%", NULL, 1, update_every, RRDDIM_PCENT_OVER_DIFF_TOTAL);
547 - rrddim_add(st, "80%", NULL, 1, update_every, RRDDIM_PCENT_OVER_DIFF_TOTAL);
548 - rrddim_add(st, "90%", NULL, 1, update_every, RRDDIM_PCENT_OVER_DIFF_TOTAL);
549 - rrddim_add(st, "100%", NULL, 1, update_every, RRDDIM_PCENT_OVER_DIFF_TOTAL);
550 - rrddim_add(st, "misses", NULL, 1, update_every, RRDDIM_PCENT_OVER_DIFF_TOTAL);
540 + rrddim_add(st, "10%", NULL, 1, 1, RRDDIM_PCENT_OVER_DIFF_TOTAL);
541 + rrddim_add(st, "20%", NULL, 1, 1, RRDDIM_PCENT_OVER_DIFF_TOTAL);
542 + rrddim_add(st, "30%", NULL, 1, 1, RRDDIM_PCENT_OVER_DIFF_TOTAL);
543 + rrddim_add(st, "40%", NULL, 1, 1, RRDDIM_PCENT_OVER_DIFF_TOTAL);
544 + rrddim_add(st, "50%", NULL, 1, 1, RRDDIM_PCENT_OVER_DIFF_TOTAL);
545 + rrddim_add(st, "60%", NULL, 1, 1, RRDDIM_PCENT_OVER_DIFF_TOTAL);
546 + rrddim_add(st, "70%", NULL, 1, 1, RRDDIM_PCENT_OVER_DIFF_TOTAL);
547 + rrddim_add(st, "80%", NULL, 1, 1, RRDDIM_PCENT_OVER_DIFF_TOTAL);
548 + rrddim_add(st, "90%", NULL, 1, 1, RRDDIM_PCENT_OVER_DIFF_TOTAL);
549 + rrddim_add(st, "100%", NULL, 1, 1, RRDDIM_PCENT_OVER_DIFF_TOTAL);
550 + rrddim_add(st, "misses", NULL, 1, 1, RRDDIM_PCENT_OVER_DIFF_TOTAL);
551 }
552 else rrdset_next(st);
553
@@ -576,8 +576,8 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
576 st = rrdset_create("nfsd", "net", NULL, "nfsd", "Network Reads", "reads/s", 5007, update_every, RRDSET_TYPE_STACKED);
577 st->isdetail = 1;
578
579 - rrddim_add(st, "udp", NULL, 1, update_every, RRDDIM_INCREMENTAL);
580 - rrddim_add(st, "tcp", NULL, 1, update_every, RRDDIM_INCREMENTAL);
579 + rrddim_add(st, "udp", NULL, 1, 1, RRDDIM_INCREMENTAL);
580 + rrddim_add(st, "tcp", NULL, 1, 1, RRDDIM_INCREMENTAL);
581 }
582 else rrdset_next(st);
583
@@ -598,9 +598,9 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
598 st = rrdset_create("nfsd", "rpc", NULL, "nfsd", "Remote Procedure Calls", "calls/s", 5008, update_every, RRDSET_TYPE_LINE);
599 st->isdetail = 1;
600
601 - rrddim_add(st, "all", NULL, 1, update_every, RRDDIM_INCREMENTAL);
602 - rrddim_add(st, "bad_format", NULL, -1, update_every, RRDDIM_INCREMENTAL);
603 - rrddim_add(st, "bad_auth", NULL, -1, update_every, RRDDIM_INCREMENTAL);
601 + rrddim_add(st, "all", NULL, 1, 1, RRDDIM_INCREMENTAL);
602 + rrddim_add(st, "bad_format", NULL, -1, 1, RRDDIM_INCREMENTAL);
603 + rrddim_add(st, "bad_auth", NULL, -1, 1, RRDDIM_INCREMENTAL);
604 }
605 else rrdset_next(st);
606
@@ -622,7 +622,7 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
622 st = rrdset_create("nfsd", "proc2", NULL, "nfsd", "NFS v2 Calls", "calls/s", 5009, update_every, RRDSET_TYPE_STACKED);
623
624 for(i = 0; nfsd_proc_values[i].present2 ; i++)
625 - rrddim_add(st, nfsd_proc_values[i].name, NULL, 1, update_every, RRDDIM_INCREMENTAL);
625 + rrddim_add(st, nfsd_proc_values[i].name, NULL, 1, 1, RRDDIM_INCREMENTAL);
626 }
627 else rrdset_next(st);
628
@@ -641,7 +641,7 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
641 st = rrdset_create("nfsd", "proc3", NULL, "nfsd", "NFS v3 Calls", "calls/s", 5010, update_every, RRDSET_TYPE_STACKED);
642
643 for(i = 0; nfsd_proc_values[i].present3 ; i++)
644 - rrddim_add(st, nfsd_proc_values[i].name, NULL, 1, update_every, RRDDIM_INCREMENTAL);
644 + rrddim_add(st, nfsd_proc_values[i].name, NULL, 1, 1, RRDDIM_INCREMENTAL);
645 }
646 else rrdset_next(st);
647
@@ -660,7 +660,7 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
660 st = rrdset_create("nfsd", "proc4", NULL, "nfsd", "NFS v4 Calls", "calls/s", 5011, update_every, RRDSET_TYPE_STACKED);
661
662 for(i = 0; nfsd_proc_values[i].present4 ; i++)
663 - rrddim_add(st, nfsd_proc_values[i].name, NULL, 1, update_every, RRDDIM_INCREMENTAL);
663 + rrddim_add(st, nfsd_proc_values[i].name, NULL, 1, 1, RRDDIM_INCREMENTAL);
664 }
665 else rrdset_next(st);
666
@@ -679,7 +679,7 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
679 st = rrdset_create("nfsd", "proc4ops", NULL, "nfsd", "NFS v4 Operations", "operations/s", 5012, update_every, RRDSET_TYPE_STACKED);
680
681 for(i = 0; nfsd4_ops_values[i].present ; i++)
682 - rrddim_add(st, nfsd4_ops_values[i].name, NULL, 1, update_every, RRDDIM_INCREMENTAL);
682 + rrddim_add(st, nfsd4_ops_values[i].name, NULL, 1, 1, RRDDIM_INCREMENTAL);
683 }
684 else rrdset_next(st);
685
src/proc_net_snmp.c
+30 -30
@@ -103,9 +103,9 @@ int do_proc_net_snmp(int update_every, unsigned long long dt) {
103 if(!st) {
104 st = rrdset_create(RRD_TYPE_NET_SNMP, "packets", NULL, RRD_TYPE_NET_SNMP, "IPv4 Packets", "packets/s", 3000, update_every, RRDSET_TYPE_LINE);
105
106 - rrddim_add(st, "received", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
107 - rrddim_add(st, "sent", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
108 - rrddim_add(st, "forwarded", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
106 + rrddim_add(st, "received", NULL, 1, 1, RRDDIM_INCREMENTAL);
107 + rrddim_add(st, "sent", NULL, -1, 1, RRDDIM_INCREMENTAL);
108 + rrddim_add(st, "forwarded", NULL, 1, 1, RRDDIM_INCREMENTAL);
109 }
110 else rrdset_next(st);
111
@@ -123,9 +123,9 @@ int do_proc_net_snmp(int update_every, unsigned long long dt) {
123 st = rrdset_create(RRD_TYPE_NET_SNMP, "fragsout", NULL, RRD_TYPE_NET_SNMP, "IPv4 Fragments Sent", "packets/s", 3010, update_every, RRDSET_TYPE_LINE);
124 st->isdetail = 1;
125
126 - rrddim_add(st, "ok", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
127 - rrddim_add(st, "failed", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
128 - rrddim_add(st, "all", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
126 + rrddim_add(st, "ok", NULL, 1, 1, RRDDIM_INCREMENTAL);
127 + rrddim_add(st, "failed", NULL, -1, 1, RRDDIM_INCREMENTAL);
128 + rrddim_add(st, "all", NULL, 1, 1, RRDDIM_INCREMENTAL);
129 }
130 else rrdset_next(st);
131
@@ -143,9 +143,9 @@ int do_proc_net_snmp(int update_every, unsigned long long dt) {
143 st = rrdset_create(RRD_TYPE_NET_SNMP, "fragsin", NULL, RRD_TYPE_NET_SNMP, "IPv4 Fragments Reassembly", "packets/s", 3011, update_every, RRDSET_TYPE_LINE);
144 st->isdetail = 1;
145
146 - rrddim_add(st, "ok", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
147 - rrddim_add(st, "failed", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
148 - rrddim_add(st, "all", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
146 + rrddim_add(st, "ok", NULL, 1, 1, RRDDIM_INCREMENTAL);
147 + rrddim_add(st, "failed", NULL, -1, 1, RRDDIM_INCREMENTAL);
148 + rrddim_add(st, "all", NULL, 1, 1, RRDDIM_INCREMENTAL);
149 }
150 else rrdset_next(st);
151
@@ -163,14 +163,14 @@ int do_proc_net_snmp(int update_every, unsigned long long dt) {
163 st = rrdset_create(RRD_TYPE_NET_SNMP, "errors", NULL, RRD_TYPE_NET_SNMP, "IPv4 Errors", "packets/s", 3002, update_every, RRDSET_TYPE_LINE);
164 st->isdetail = 1;
165
166 - rrddim_add(st, "InDiscards", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
167 - rrddim_add(st, "OutDiscards", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
166 + rrddim_add(st, "InDiscards", NULL, 1, 1, RRDDIM_INCREMENTAL);
167 + rrddim_add(st, "OutDiscards", NULL, -1, 1, RRDDIM_INCREMENTAL);
168
169 - rrddim_add(st, "InHdrErrors", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
170 - rrddim_add(st, "InAddrErrors", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
171 - rrddim_add(st, "InUnknownProtos", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
169 + rrddim_add(st, "InHdrErrors", NULL, 1, 1, RRDDIM_INCREMENTAL);
170 + rrddim_add(st, "InAddrErrors", NULL, 1, 1, RRDDIM_INCREMENTAL);
171 + rrddim_add(st, "InUnknownProtos", NULL, 1, 1, RRDDIM_INCREMENTAL);
172
173 - rrddim_add(st, "OutNoRoutes", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
173 + rrddim_add(st, "OutNoRoutes", NULL, -1, 1, RRDDIM_INCREMENTAL);
174 }
175 else rrdset_next(st);
176
@@ -244,8 +244,8 @@ int do_proc_net_snmp(int update_every, unsigned long long dt) {
244 if(!st) {
245 st = rrdset_create(RRD_TYPE_NET_SNMP, "tcppackets", NULL, "tcp", "IPv4 TCP Packets", "packets/s", 2600, update_every, RRDSET_TYPE_LINE);
246
247 - rrddim_add(st, "received", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
248 - rrddim_add(st, "sent", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
247 + rrddim_add(st, "received", NULL, 1, 1, RRDDIM_INCREMENTAL);
248 + rrddim_add(st, "sent", NULL, -1, 1, RRDDIM_INCREMENTAL);
249 }
250 else rrdset_next(st);
251
@@ -262,8 +262,8 @@ int do_proc_net_snmp(int update_every, unsigned long long dt) {
262 st = rrdset_create(RRD_TYPE_NET_SNMP, "tcperrors", NULL, "tcp", "IPv4 TCP Errors", "packets/s", 2700, update_every, RRDSET_TYPE_LINE);
263 st->isdetail = 1;
264
265 - rrddim_add(st, "InErrs", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
266 - rrddim_add(st, "RetransSegs", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
265 + rrddim_add(st, "InErrs", NULL, 1, 1, RRDDIM_INCREMENTAL);
266 + rrddim_add(st, "RetransSegs", NULL, -1, 1, RRDDIM_INCREMENTAL);
267 }
268 else rrdset_next(st);
269
@@ -280,11 +280,11 @@ int do_proc_net_snmp(int update_every, unsigned long long dt) {
280 st = rrdset_create(RRD_TYPE_NET_SNMP, "tcphandshake", NULL, "tcp", "IPv4 TCP Handshake Issues", "events/s", 2900, update_every, RRDSET_TYPE_LINE);
281 st->isdetail = 1;
282
283 - rrddim_add(st, "EstabResets", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
284 - rrddim_add(st, "OutRsts", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
285 - rrddim_add(st, "ActiveOpens", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
286 - rrddim_add(st, "PassiveOpens", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
287 - rrddim_add(st, "AttemptFails", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
283 + rrddim_add(st, "EstabResets", NULL, 1, 1, RRDDIM_INCREMENTAL);
284 + rrddim_add(st, "OutRsts", NULL, -1, 1, RRDDIM_INCREMENTAL);
285 + rrddim_add(st, "ActiveOpens", NULL, 1, 1, RRDDIM_INCREMENTAL);
286 + rrddim_add(st, "PassiveOpens", NULL, 1, 1, RRDDIM_INCREMENTAL);
287 + rrddim_add(st, "AttemptFails", NULL, 1, 1, RRDDIM_INCREMENTAL);
288 }
289 else rrdset_next(st);
290
@@ -327,8 +327,8 @@ int do_proc_net_snmp(int update_every, unsigned long long dt) {
327 if(!st) {
328 st = rrdset_create(RRD_TYPE_NET_SNMP, "udppackets", NULL, "udp", "IPv4 UDP Packets", "packets/s", 2601, update_every, RRDSET_TYPE_LINE);
329
330 - rrddim_add(st, "received", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
331 - rrddim_add(st, "sent", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
330 + rrddim_add(st, "received", NULL, 1, 1, RRDDIM_INCREMENTAL);
331 + rrddim_add(st, "sent", NULL, -1, 1, RRDDIM_INCREMENTAL);
332 }
333 else rrdset_next(st);
334
@@ -345,10 +345,10 @@ int do_proc_net_snmp(int update_every, unsigned long long dt) {
345 st = rrdset_create(RRD_TYPE_NET_SNMP, "udperrors", NULL, "udp", "IPv4 UDP Errors", "events/s", 2701, update_every, RRDSET_TYPE_LINE);
346 st->isdetail = 1;
347
348 - rrddim_add(st, "RcvbufErrors", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
349 - rrddim_add(st, "SndbufErrors", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
350 - rrddim_add(st, "InErrors", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
351 - rrddim_add(st, "NoPorts", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
348 + rrddim_add(st, "RcvbufErrors", NULL, 1, 1, RRDDIM_INCREMENTAL);
349 + rrddim_add(st, "SndbufErrors", NULL, -1, 1, RRDDIM_INCREMENTAL);
350 + rrddim_add(st, "InErrors", NULL, 1, 1, RRDDIM_INCREMENTAL);
351 + rrddim_add(st, "NoPorts", NULL, 1, 1, RRDDIM_INCREMENTAL);
352 }
353 else rrdset_next(st);
354
src/proc_net_stat_conntrack.c
+16 -16
@@ -116,9 +116,9 @@ int do_proc_net_stat_conntrack(int update_every, unsigned long long dt) {
116 if(!st) {
117 st = rrdset_create(RRD_TYPE_NET_STAT_CONNTRACK, "new", NULL, RRD_TYPE_NET_STAT_CONNTRACK, "Netfilter New Connections", "connections/s", 1001, update_every, RRDSET_TYPE_LINE);
118
119 - rrddim_add(st, "new", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
120 - rrddim_add(st, "ignore", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
121 - rrddim_add(st, "invalid", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
119 + rrddim_add(st, "new", NULL, 1, 1, RRDDIM_INCREMENTAL);
120 + rrddim_add(st, "ignore", NULL, -1, 1, RRDDIM_INCREMENTAL);
121 + rrddim_add(st, "invalid", NULL, -1, 1, RRDDIM_INCREMENTAL);
122 }
123 else rrdset_next(st);
124
@@ -136,9 +136,9 @@ int do_proc_net_stat_conntrack(int update_every, unsigned long long dt) {
136 st = rrdset_create(RRD_TYPE_NET_STAT_CONNTRACK, "changes", NULL, RRD_TYPE_NET_STAT_CONNTRACK, "Netfilter Connection Changes", "changes/s", 1002, update_every, RRDSET_TYPE_LINE);
137 st->isdetail = 1;
138
139 - rrddim_add(st, "inserted", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
140 - rrddim_add(st, "deleted", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
141 - rrddim_add(st, "delete_list", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
139 + rrddim_add(st, "inserted", NULL, 1, 1, RRDDIM_INCREMENTAL);
140 + rrddim_add(st, "deleted", NULL, -1, 1, RRDDIM_INCREMENTAL);
141 + rrddim_add(st, "delete_list", NULL, -1, 1, RRDDIM_INCREMENTAL);
142 }
143 else rrdset_next(st);
144
@@ -156,9 +156,9 @@ int do_proc_net_stat_conntrack(int update_every, unsigned long long dt) {
156 st = rrdset_create(RRD_TYPE_NET_STAT_CONNTRACK, "expect", NULL, RRD_TYPE_NET_STAT_CONNTRACK, "Netfilter Connection Expectations", "expectations/s", 1003, update_every, RRDSET_TYPE_LINE);
157 st->isdetail = 1;
158
159 - rrddim_add(st, "created", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
160 - rrddim_add(st, "deleted", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
161 - rrddim_add(st, "new", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
159 + rrddim_add(st, "created", NULL, 1, 1, RRDDIM_INCREMENTAL);
160 + rrddim_add(st, "deleted", NULL, -1, 1, RRDDIM_INCREMENTAL);
161 + rrddim_add(st, "new", NULL, 1, 1, RRDDIM_INCREMENTAL);
162 }
163 else rrdset_next(st);
164
@@ -176,9 +176,9 @@ int do_proc_net_stat_conntrack(int update_every, unsigned long long dt) {
176 st = rrdset_create(RRD_TYPE_NET_STAT_CONNTRACK, "search", NULL, RRD_TYPE_NET_STAT_CONNTRACK, "Netfilter Connection Searches", "searches/s", 1010, update_every, RRDSET_TYPE_LINE);
177 st->isdetail = 1;
178
179 - rrddim_add(st, "searched", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
180 - rrddim_add(st, "restarted", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
181 - rrddim_add(st, "found", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
179 + rrddim_add(st, "searched", NULL, 1, 1, RRDDIM_INCREMENTAL);
180 + rrddim_add(st, "restarted", NULL, -1, 1, RRDDIM_INCREMENTAL);
181 + rrddim_add(st, "found", NULL, 1, 1, RRDDIM_INCREMENTAL);
182 }
183 else rrdset_next(st);
184
@@ -196,10 +196,10 @@ int do_proc_net_stat_conntrack(int update_every, unsigned long long dt) {
196 st = rrdset_create(RRD_TYPE_NET_STAT_CONNTRACK, "errors", NULL, RRD_TYPE_NET_STAT_CONNTRACK, "Netfilter Errors", "events/s", 1005, update_every, RRDSET_TYPE_LINE);
197 st->isdetail = 1;
198
199 - rrddim_add(st, "icmp_error", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
200 - rrddim_add(st, "insert_failed", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
201 - rrddim_add(st, "drop", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
202 - rrddim_add(st, "early_drop", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
199 + rrddim_add(st, "icmp_error", NULL, 1, 1, RRDDIM_INCREMENTAL);
200 + rrddim_add(st, "insert_failed", NULL, -1, 1, RRDDIM_INCREMENTAL);
201 + rrddim_add(st, "drop", NULL, -1, 1, RRDDIM_INCREMENTAL);
202 + rrddim_add(st, "early_drop", NULL, -1, 1, RRDDIM_INCREMENTAL);
203 }
204 else rrdset_next(st);
205
src/proc_stat.c
+3 -3
@@ -125,7 +125,7 @@ int do_proc_stat(int update_every, unsigned long long dt) {
125 st = rrdset_create("system", "intr", NULL, "cpu", "CPU Interrupts", "interrupts/s", 900, update_every, RRDSET_TYPE_LINE);
126 st->isdetail = 1;
127
128 - rrddim_add(st, "interrupts", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
128 + rrddim_add(st, "interrupts", NULL, 1, 1, RRDDIM_INCREMENTAL);
129 }
130 else rrdset_next(st);
131
@@ -143,7 +143,7 @@ int do_proc_stat(int update_every, unsigned long long dt) {
143 if(!st) {
144 st = rrdset_create("system", "ctxt", NULL, "cpu", "CPU Context Switches", "context switches/s", 800, update_every, RRDSET_TYPE_LINE);
145
146 - rrddim_add(st, "switches", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
146 + rrddim_add(st, "switches", NULL, 1, 1, RRDDIM_INCREMENTAL);
147 }
148 else rrdset_next(st);
149
@@ -170,7 +170,7 @@ int do_proc_stat(int update_every, unsigned long long dt) {
170 st = rrdset_create("system", "forks", NULL, "cpu", "New Processes", "processes/s", 700, update_every, RRDSET_TYPE_LINE);
171 st->isdetail = 1;
172
173 - rrddim_add(st, "started", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
173 + rrddim_add(st, "started", NULL, 1, 1, RRDDIM_INCREMENTAL);
174 }
175 else rrdset_next(st);
176
src/proc_vmstat.c
+6 -6
@@ -166,8 +166,8 @@ int do_proc_vmstat(int update_every, unsigned long long dt) {
166 if(!st) {
167 st = rrdset_create("system", "swapio", NULL, "mem", "Swap I/O", "kilobytes/s", 250, update_every, RRDSET_TYPE_AREA);
168
169 - rrddim_add(st, "in", NULL, sysconf(_SC_PAGESIZE), 1024 * update_every, RRDDIM_INCREMENTAL);
170 - rrddim_add(st, "out", NULL, -sysconf(_SC_PAGESIZE), 1024 * update_every, RRDDIM_INCREMENTAL);
169 + rrddim_add(st, "in", NULL, sysconf(_SC_PAGESIZE), 1024, RRDDIM_INCREMENTAL);
170 + rrddim_add(st, "out", NULL, -sysconf(_SC_PAGESIZE), 1024, RRDDIM_INCREMENTAL);
171 }
172 else rrdset_next(st);
173
@@ -183,8 +183,8 @@ int do_proc_vmstat(int update_every, unsigned long long dt) {
183 if(!st) {
184 st = rrdset_create("system", "io", NULL, "disk", "Disk I/O", "kilobytes/s", 150, update_every, RRDSET_TYPE_AREA);
185
186 - rrddim_add(st, "in", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
187 - rrddim_add(st, "out", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
186 + rrddim_add(st, "in", NULL, 1, 1, RRDDIM_INCREMENTAL);
187 + rrddim_add(st, "out", NULL, -1, 1, RRDDIM_INCREMENTAL);
188 }
189 else rrdset_next(st);
190
@@ -201,8 +201,8 @@ int do_proc_vmstat(int update_every, unsigned long long dt) {
201 st = rrdset_create("system", "pgfaults", NULL, "mem", "Memory Page Faults", "page faults/s", 500, update_every, RRDSET_TYPE_LINE);
202 st->isdetail = 1;
203
204 - rrddim_add(st, "minor", NULL, 1, 1 * update_every, RRDDIM_INCREMENTAL);
205 - rrddim_add(st, "major", NULL, -1, 1 * update_every, RRDDIM_INCREMENTAL);
204 + rrddim_add(st, "minor", NULL, 1, 1, RRDDIM_INCREMENTAL);
205 + rrddim_add(st, "major", NULL, -1, 1, RRDDIM_INCREMENTAL);
206 }
207 else rrdset_next(st);
208
src/rrd.c
+22 -12
@@ -978,28 +978,46 @@ unsigned long long rrdset_done(RRDSET *st)
978 rd->last_collected_value = rd->collected_value;
979 }
980
981 - rd->calculated_value += (calculated_number)(rd->collected_value - rd->last_collected_value);
981 + rd->calculated_value += (calculated_number)(rd->collected_value - rd->last_collected_value)
982 + * (calculated_number)rd->multiplier
983 + / (calculated_number)rd->divisor
984 + * (calculated_number)1000000ULL
985 + / (calculated_number)st->usec_since_last_update;
986
987 if(unlikely(st->debug))
988 debug(D_RRD_STATS, "%s/%s: CALC INC "
985 - CALCULATED_NUMBER_FORMAT " += "
989 + CALCULATED_NUMBER_FORMAT " += ("
990 COLLECTED_NUMBER_FORMAT " - " COLLECTED_NUMBER_FORMAT
991 + " * %ld"
992 + " / %ld"
993 + " * 1000000"
994 + " / %llu"
995 + ")"
996 , st->id, rd->name
997 , rd->calculated_value
998 , rd->collected_value, rd->last_collected_value
999 + , (calculated_number)rd->multiplier
1000 + , (calculated_number)rd->divisor
1001 + , st->usec_since_last_update
1002 );
1003 break;
1004
1005 case RRDDIM_ABSOLUTE:
994 - rd->calculated_value = (calculated_number)rd->collected_value;
1006 + rd->calculated_value = (calculated_number)rd->collected_value
1007 + * (calculated_number)rd->multiplier
1008 + / (calculated_number)rd->divisor;
1009
1010 if(unlikely(st->debug))
1011 debug(D_RRD_STATS, "%s/%s: CALC ABS/ABS-NO-IN "
1012 CALCULATED_NUMBER_FORMAT " = "
1013 COLLECTED_NUMBER_FORMAT
1014 + " * %ld"
1015 + " / %ld"
1016 , st->id, rd->name
1017 , rd->calculated_value
1018 , rd->collected_value
1019 + , (calculated_number)rd->multiplier
1020 + , (calculated_number)rd->divisor
1021 );
1022 break;
1023
@@ -1097,22 +1115,14 @@ unsigned long long rrdset_done(RRDSET *st)
1115 }
1116
1117 if(likely(rd->updated && rd->counter > 1 && iterations < st->gap_when_lost_iterations_above)) {
1100 - rd->values[st->current_entry] = pack_storage_number(
1101 - new_value
1102 - * (calculated_number)rd->multiplier
1103 - / (calculated_number)rd->divisor
1104 - , storage_flags );
1118 + rd->values[st->current_entry] = pack_storage_number(new_value, storage_flags );
1119
1120 if(unlikely(st->debug))
1121 debug(D_RRD_STATS, "%s/%s: STORE[%ld] "
1122 CALCULATED_NUMBER_FORMAT " = " CALCULATED_NUMBER_FORMAT
1109 - " * %ld"
1110 - " / %ld"
1123 , st->id, rd->name
1124 , st->current_entry
1125 , unpack_storage_number(rd->values[st->current_entry]), new_value
1114 - , rd->multiplier
1115 - , rd->divisor
1126 );
1127 }
1128 else {
src/unit_test.c
+1 -1
@@ -267,7 +267,7 @@ int unit_test(long delay, long shift)
267 RRDDIM *rdabsi = NULL;
268
269 if(do_abs) rdabs = rrddim_add(st, "absolute", "absolute", 1, 1, RRDDIM_ABSOLUTE);
270 - if(do_inc) rdinc = rrddim_add(st, "incremental", "incremental", 1, 1 * rrd_update_every, RRDDIM_INCREMENTAL);
270 + if(do_inc) rdinc = rrddim_add(st, "incremental", "incremental", 1, 1, RRDDIM_INCREMENTAL);
271 if(do_abst) rdabst = rrddim_add(st, "percentage-of-absolute-row", "percentage-of-absolute-row", 1, 1, RRDDIM_PCENT_OVER_ROW_TOTAL);
272 if(do_absi) rdabsi = rrddim_add(st, "percentage-of-incremental-row", "percentage-of-incremental-row", 1, 1, RRDDIM_PCENT_OVER_DIFF_TOTAL);
273