/[monit]/monit/http/cervlet.c
ViewVC logotype

Diff of /monit/http/cervlet.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.166 by martinp, Wed Dec 8 15:22:41 2004 UTC revision 1.167 by martinp, Thu Dec 9 17:02:46 2004 UTC
# Line 964  static void do_home_device(HttpRequest r Line 964  static void do_home_device(HttpRequest r
964                
965        out_print(res,        out_print(res,
966          "<td align=\"right\">%.1f%% [%.1f&nbsp;MB]</td>",          "<td align=\"right\">%.1f%% [%.1f&nbsp;MB]</td>",
967          (float)100 * (float)(s->inf->f_blocks - s->inf->f_blocksfree) /          s->inf->space_percent/10.,
968          (float)s->inf->f_blocks,          (float)s->inf->space_total / (float)1048576 * (float)s->inf->f_bsize);
         (float)(s->inf->f_blocks - s->inf->f_blocksfree) / (float)1048576 *  
         (float)s->inf->f_bsize);  
969    
970        if(s->inf->f_files > 0) {        if(s->inf->f_files > 0) {
971    
972          out_print(res,          out_print(res,
973            "<td align=\"right\">%.1f%% [%ld&nbsp;objects]</td>",            "<td align=\"right\">%.1f%% [%ld&nbsp;objects]</td>",
974            (float)100 * (float)(s->inf->f_files - s->inf->f_filesfree) /            s->inf->inode_percent/10.,
975            (float)s->inf->f_files,            s->inf->inode_total);
           s->inf->f_files - s->inf->f_filesfree);  
976    
977        } else {        } else {
978    
# Line 1466  static void print_service_rules_device(H Line 1463  static void print_service_rules_device(H
1463                    
1464        if(dl->resource == RESOURCE_ID_INODE) {        if(dl->resource == RESOURCE_ID_INODE) {
1465                        
1466          out_print(res,          if(dl->limit_absolute > -1) {
1467            "<tr><td>Inodes usage limit</td><td>If %s %ld %s "            out_print(res,
1468            "then %s else if recovered then %s</td></tr>",              "<tr><td>Inodes usage limit</td><td>If %s %ld "
1469            operatornames[dl->operator],              "then %s else if recovered then %s</td></tr>",
1470            (dl->limit_absolute > -1)?dl->limit_absolute:dl->limit_percent,              operatornames[dl->operator],
1471            (dl->limit_absolute > -1)?"":"%",              dl->limit_absolute,
1472            actionnames[a->failed->id], actionnames[a->passed->id]);              actionnames[a->failed->id], actionnames[a->passed->id]);
1473            } else {
1474              out_print(res,
1475                "<tr><td>Inodes usage limit</td><td>If %s %.1f%% "
1476                "then %s else if recovered then %s</td></tr>",
1477                operatornames[dl->operator],
1478                dl->limit_percent/10.,
1479                actionnames[a->failed->id], actionnames[a->passed->id]);
1480            }
1481                        
1482        } else if(dl->resource == RESOURCE_ID_SPACE) {        } else if(dl->resource == RESOURCE_ID_SPACE) {
1483                        
1484          out_print(res,          if(dl->limit_absolute > -1) {
1485            "<tr><td>Space usage limit</td><td>If %s %ld %s "            out_print(res,
1486            "then %s else if recovered then %s</td></tr>",              "<tr><td>Space usage limit</td><td>If %s %ld blocks "
1487            operatornames[dl->operator],              "then %s else if recovered then %s</td></tr>",
1488            (dl->limit_absolute > -1)?dl->limit_absolute:dl->limit_percent,              operatornames[dl->operator],
1489            (dl->limit_absolute > -1)?"blocks":"%",              dl->limit_absolute,
1490            actionnames[a->failed->id], actionnames[a->passed->id]);              actionnames[a->failed->id], actionnames[a->passed->id]);
1491            } else {
1492              out_print(res,
1493                "<tr><td>Space usage limit</td><td>If %s %.1f%% "
1494                "then %s else if recovered then %s</td></tr>",
1495                operatornames[dl->operator],
1496                dl->limit_percent/10.,
1497                actionnames[a->failed->id], actionnames[a->passed->id]);
1498            }
1499        }        }
1500      }      }
1501    }    }

Legend:
Removed from v.1.166  
changed lines
  Added in v.1.167

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26