]> arthur.barton.de Git - netdata.git/commitdiff
small adjustments to plugin_tc.c
authorStefan Forstenlechner <stefanforstenlechner@gmail.com>
Tue, 17 Jan 2017 13:07:20 +0000 (17:07 +0400)
committerStefan Forstenlechner <stefanforstenlechner@gmail.com>
Mon, 23 Jan 2017 22:45:30 +0000 (23:45 +0100)
according to @ktsaou comments.

src/plugin_tc.c

index bc89de621905bc5fe91ca41a534973e64bfba578..d539d899862c566d4b3d1bd361f16166ecef3462 100644 (file)
@@ -247,7 +247,7 @@ static inline void tc_device_commit(struct tc_device *d) {
     // we need the root qdisc
     for(c = d->classes ; c ; c = c->next) {
         // debug(D_TC_LOOP, "TC: Device '%s', class '%s', isLeaf=%d, HasParent=%d, Seen=%d", d->name?d->name:d->id, c->name?c->name:c->id, c->isleaf, c->hasparent, c->seen);
-        debug(D_TC_LOOP, "TC: Device '%s', class '%s', isleaf=%s, isqdisc=%s, hasparent=%s bytes=%d, packtes=%d, dropped=%d, tokens=%d, ctokens=%d", d->name?d->name:d->id, c->name?c->name:c->id, c->isleaf?"true":"false", c->isqdisc?"true":"false", c->hasparent?"true":"false", c->bytes, c->packets, c->dropped, c->tokens, c->ctokens);
+        debug(D_TC_LOOP, "TC: Device '%s', class '%s', isleaf=%s, isqdisc=%s, hasparent=%s bytes=%llu, packtes=%llu, dropped=%llu, tokens=%llu, ctokens=%llu", d->name?d->name:d->id, c->name?c->name:c->id, c->isleaf?"true":"false", c->isqdisc?"true":"false", c->hasparent?"true":"false", c->bytes, c->packets, c->dropped, c->tokens, c->ctokens);
         if(unlikely(c->updated && c->isqdisc && !c->parentid)) {
             active_qos = 1;
             bytes_sum = c->bytes;
@@ -846,7 +846,7 @@ void *tc_main(void *ptr) {
                     char *leafid   = words[6];  // leafid
                     char qdisc = 0;
 
-                    if(strcmp(words[0], "qdisc") == 0) {
+                    if(first_hash == QDISC_HASH) {
                         qdisc = 1;
                     }
                     if(strcmp(parent, "root") == 0) {