@cryptotaxi247 / netdata-1 / commits / 349284c90

use the renamed id in cgroups

Costa Tsaousis (ktsaou) committed Jan 15, 2017 at 01:58 UTC 349284c901bdf3d17302a1e7dd3f279fafbd8b33
1 file changed +14 -14
src/sys_fs_cgroup.c
+14 -14
@@ -1235,7 +1235,7 @@ void update_cgroup_charts(int update_every) {
1235
1236 if(cg->cpuacct_stat.updated) {
1237 if(unlikely(!cg->st_cpu)) {
1238 - cg->st_cpu = rrdset_find_bytype(cgroup_chart_type(type, cg->id, RRD_ID_LENGTH_MAX), "cpu");
1238 + cg->st_cpu = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "cpu");
1239 if(!cg->st_cpu) {
1240 snprintfz(title, CHART_TITLE_MAX, "CPU Usage (%d%% = %d core%s) for cgroup %s", (processors * 100), processors, (processors > 1) ? "s" : "", cg->chart_title);
1241 cg->st_cpu = rrdset_create(type, "cpu", NULL, "cpu", "cgroup.cpu", title, "%", 40000, update_every, RRDSET_TYPE_STACKED);
@@ -1256,7 +1256,7 @@ void update_cgroup_charts(int update_every) {
1256 unsigned int i;
1257
1258 if(unlikely(!cg->st_cpu_per_core)) {
1259 - cg->st_cpu_per_core = rrdset_find_bytype(cgroup_chart_type(type, cg->id, RRD_ID_LENGTH_MAX), "cpu_per_core");
1259 + cg->st_cpu_per_core = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "cpu_per_core");
1260 if(!cg->st_cpu_per_core) {
1261 snprintfz(title, CHART_TITLE_MAX, "CPU Usage (%d%% = %d core%s) Per Core for cgroup %s", (processors * 100), processors, (processors > 1) ? "s" : "", cg->chart_title);
1262 cg->st_cpu_per_core = rrdset_create(type, "cpu_per_core", NULL, "cpu", "cgroup.cpu_per_core", title, "%", 40100, update_every, RRDSET_TYPE_STACKED);
@@ -1279,7 +1279,7 @@ void update_cgroup_charts(int update_every) {
1279 if(cg->memory.updated) {
1280 if(cg->memory.cache + cg->memory.rss + cg->memory.rss_huge + cg->memory.mapped_file > 0) {
1281 if(unlikely(!cg->st_mem)) {
1282 - cg->st_mem = rrdset_find_bytype(cgroup_chart_type(type, cg->id, RRD_ID_LENGTH_MAX), "mem");
1282 + cg->st_mem = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "mem");
1283 if(!cg->st_mem) {
1284 snprintfz(title, CHART_TITLE_MAX, "Memory Usage for cgroup %s", cg->chart_title);
1285 cg->st_mem = rrdset_create(type, "mem", NULL, "mem", "cgroup.mem", title, "MB", 40210, update_every, RRDSET_TYPE_STACKED);
@@ -1304,7 +1304,7 @@ void update_cgroup_charts(int update_every) {
1304 }
1305
1306 if(unlikely(!cg->st_writeback)) {
1307 - cg->st_writeback = rrdset_find_bytype(cgroup_chart_type(type, cg->id, RRD_ID_LENGTH_MAX), "writeback");
1307 + cg->st_writeback = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "writeback");
1308 if(!cg->st_writeback) {
1309 snprintfz(title, CHART_TITLE_MAX, "Writeback Memory for cgroup %s", cg->chart_title);
1310 cg->st_writeback = rrdset_create(type, "writeback", NULL, "mem", "cgroup.writeback", title, "MB", 40300, update_every, RRDSET_TYPE_AREA);
@@ -1323,7 +1323,7 @@ void update_cgroup_charts(int update_every) {
1323
1324 if(cg->memory.pgpgin + cg->memory.pgpgout > 0) {
1325 if(unlikely(!cg->st_mem_activity)) {
1326 - cg->st_mem_activity = rrdset_find_bytype(cgroup_chart_type(type, cg->id, RRD_ID_LENGTH_MAX), "mem_activity");
1326 + cg->st_mem_activity = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "mem_activity");
1327 if(!cg->st_mem_activity) {
1328 snprintfz(title, CHART_TITLE_MAX, "Memory Activity for cgroup %s", cg->chart_title);
1329 cg->st_mem_activity = rrdset_create(type, "mem_activity", NULL, "mem", "cgroup.mem_activity", title, "MB/s", 40400, update_every, RRDSET_TYPE_LINE);
@@ -1341,7 +1341,7 @@ void update_cgroup_charts(int update_every) {
1341
1342 if(cg->memory.pgfault + cg->memory.pgmajfault > 0) {
1343 if(unlikely(!cg->st_pgfaults)) {
1344 - cg->st_pgfaults = rrdset_find_bytype(cgroup_chart_type(type, cg->id, RRD_ID_LENGTH_MAX), "pgfaults");
1344 + cg->st_pgfaults = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "pgfaults");
1345 if(!cg->st_pgfaults) {
1346 snprintfz(title, CHART_TITLE_MAX, "Memory Page Faults for cgroup %s", cg->chart_title);
1347 cg->st_pgfaults = rrdset_create(type, "pgfaults", NULL, "mem", "cgroup.pgfaults", title, "MB/s", 40500, update_every, RRDSET_TYPE_LINE);
@@ -1360,7 +1360,7 @@ void update_cgroup_charts(int update_every) {
1360
1361 if(cg->memory.usage_in_bytes_updated) {
1362 if(unlikely(!cg->st_mem_usage)) {
1363 - cg->st_mem_usage = rrdset_find_bytype(cgroup_chart_type(type, cg->id, RRD_ID_LENGTH_MAX), "mem_usage");
1363 + cg->st_mem_usage = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "mem_usage");
1364 if(!cg->st_mem_usage) {
1365 snprintfz(title, CHART_TITLE_MAX, "Total Memory for cgroup %s", cg->chart_title);
1366 cg->st_mem_usage = rrdset_create(type, "mem_usage", NULL, "mem", "cgroup.mem_usage", title, "MB", 40200, update_every, RRDSET_TYPE_STACKED);
@@ -1378,7 +1378,7 @@ void update_cgroup_charts(int update_every) {
1378
1379 if(cg->memory.failcnt_updated && cg->memory.failcnt > 0) {
1380 if(unlikely(!cg->st_mem_failcnt)) {
1381 - cg->st_mem_failcnt = rrdset_find_bytype(cgroup_chart_type(type, cg->id, RRD_ID_LENGTH_MAX), "mem_failcnt");
1381 + cg->st_mem_failcnt = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "mem_failcnt");
1382 if(!cg->st_mem_failcnt) {
1383 snprintfz(title, CHART_TITLE_MAX, "Memory Limit Failures for cgroup %s", cg->chart_title);
1384 cg->st_mem_failcnt = rrdset_create(type, "mem_failcnt", NULL, "mem", "cgroup.mem_failcnt", title, "MB", 40250, update_every, RRDSET_TYPE_LINE);
@@ -1394,7 +1394,7 @@ void update_cgroup_charts(int update_every) {
1394
1395 if(cg->io_service_bytes.updated && cg->io_service_bytes.Read + cg->io_service_bytes.Write > 0) {
1396 if(unlikely(!cg->st_io)) {
1397 - cg->st_io = rrdset_find_bytype(cgroup_chart_type(type, cg->id, RRD_ID_LENGTH_MAX), "io");
1397 + cg->st_io = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "io");
1398 if(!cg->st_io) {
1399 snprintfz(title, CHART_TITLE_MAX, "I/O Bandwidth (all disks) for cgroup %s", cg->chart_title);
1400 cg->st_io = rrdset_create(type, "io", NULL, "disk", "cgroup.io", title, "KB/s", 41200, update_every, RRDSET_TYPE_AREA);
@@ -1412,7 +1412,7 @@ void update_cgroup_charts(int update_every) {
1412
1413 if(cg->io_serviced.updated && cg->io_serviced.Read + cg->io_serviced.Write > 0) {
1414 if(unlikely(!cg->st_serviced_ops)) {
1415 - cg->st_serviced_ops = rrdset_find_bytype(cgroup_chart_type(type, cg->id, RRD_ID_LENGTH_MAX), "serviced_ops");
1415 + cg->st_serviced_ops = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "serviced_ops");
1416 if(!cg->st_serviced_ops) {
1417 snprintfz(title, CHART_TITLE_MAX, "Serviced I/O Operations (all disks) for cgroup %s"
1418 , cg->chart_title);
@@ -1431,7 +1431,7 @@ void update_cgroup_charts(int update_every) {
1431
1432 if(cg->throttle_io_service_bytes.updated && cg->throttle_io_service_bytes.Read + cg->throttle_io_service_bytes.Write > 0) {
1433 if(unlikely(!cg->st_throttle_io)) {
1434 - cg->st_throttle_io = rrdset_find_bytype(cgroup_chart_type(type, cg->id, RRD_ID_LENGTH_MAX), "throttle_io");
1434 + cg->st_throttle_io = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "throttle_io");
1435 if(!cg->st_throttle_io) {
1436 snprintfz(title, CHART_TITLE_MAX, "Throttle I/O Bandwidth (all disks) for cgroup %s", cg->chart_title);
1437 cg->st_throttle_io = rrdset_create(type, "throttle_io", NULL, "disk", "cgroup.throttle_io", title, "KB/s", 41200, update_every, RRDSET_TYPE_AREA);
@@ -1450,7 +1450,7 @@ void update_cgroup_charts(int update_every) {
1450
1451 if(cg->throttle_io_serviced.updated && cg->throttle_io_serviced.Read + cg->throttle_io_serviced.Write > 0) {
1452 if(unlikely(!cg->st_throttle_serviced_ops)) {
1453 - cg->st_throttle_serviced_ops = rrdset_find_bytype(cgroup_chart_type(type, cg->id, RRD_ID_LENGTH_MAX), "throttle_serviced_ops");
1453 + cg->st_throttle_serviced_ops = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "throttle_serviced_ops");
1454 if(!cg->st_throttle_serviced_ops) {
1455 snprintfz(title, CHART_TITLE_MAX, "Throttle Serviced I/O Operations (all disks) for cgroup %s", cg->chart_title);
1456 cg->st_throttle_serviced_ops = rrdset_create(type, "throttle_serviced_ops", NULL, "disk", "cgroup.throttle_serviced_ops", title, "operations/s", 41200, update_every, RRDSET_TYPE_LINE);
@@ -1468,7 +1468,7 @@ void update_cgroup_charts(int update_every) {
1468
1469 if(cg->io_queued.updated) {
1470 if(unlikely(!cg->st_queued_ops)) {
1471 - cg->st_queued_ops = rrdset_find_bytype(cgroup_chart_type(type, cg->id, RRD_ID_LENGTH_MAX), "queued_ops");
1471 + cg->st_queued_ops = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "queued_ops");
1472 if(!cg->st_queued_ops) {
1473 snprintfz(title, CHART_TITLE_MAX, "Queued I/O Operations (all disks) for cgroup %s", cg->chart_title);
1474 cg->st_queued_ops = rrdset_create(type, "queued_ops", NULL, "disk", "cgroup.queued_ops", title, "operations", 42000, update_every, RRDSET_TYPE_LINE);
@@ -1486,7 +1486,7 @@ void update_cgroup_charts(int update_every) {
1486
1487 if(cg->io_merged.updated && cg->io_merged.Read + cg->io_merged.Write > 0) {
1488 if(unlikely(!cg->st_merged_ops)) {
1489 - cg->st_merged_ops = rrdset_find_bytype(cgroup_chart_type(type, cg->id, RRD_ID_LENGTH_MAX), "merged_ops");
1489 + cg->st_merged_ops = rrdset_find_bytype(cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX), "merged_ops");
1490 if(!cg->st_merged_ops) {
1491 snprintfz(title, CHART_TITLE_MAX, "Merged I/O Operations (all disks) for cgroup %s", cg->chart_title);
1492 cg->st_merged_ops = rrdset_create(type, "merged_ops", NULL, "disk", "cgroup.merged_ops", title, "operations/s", 42100, update_every, RRDSET_TYPE_LINE);