@cryptotaxi247 / netdata-1 / commits / 439e3ab84

get class names from class_monitor of fireqos

Costa Tsaousis committed Mar 26, 2014 at 20:57 UTC 439e3ab84b4c983b72303420ee984e151d15a3a8
2 files changed +6 -4
netdata.c
+3 -1
@@ -1925,8 +1925,10 @@ void *tc_main(void *ptr)
1925 }
1926 else if(device && (strcmp(p, "SETCLASSNAME") == 0)) {
1927 char *name = strsep(&b, " |\n");
1928 + char *path = strsep(&b, " |\n");
1929 char *id = strsep(&b, " |\n");
1929 - if(id && *id && name && *name) tc_device_set_class_name(device, id, name);
1930 + char *qdisc = strsep(&b, " |\n");
1931 + if(id && *id && path && *path) tc_device_set_class_name(device, id, path);
1932 }
1933 else if((strcmp(p, "MYPID") == 0)) {
1934 char *id = strsep(&b, " \n");
tc-all.sh
+3 -3
@@ -17,11 +17,11 @@ do
17 /sbin/tc -s class show dev $x
18 if [ -f /var/run/fireqos/ifaces/$x ]
19 then
20 - name=`cat /var/run/fireqos/ifaces/$x`
20 + name="`cat /var/run/fireqos/ifaces/$x`"
21 echo "SETDEVICENAME $name"
22 interface_classes=
23 - source /var/run/fireqos/$name.conf
24 - for x in $interface_classes
23 + . /var/run/fireqos/$name.conf
24 + for x in $interface_classes_monitor
25 do
26 echo "SETCLASSNAME $x"
27 done