/[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.70 by chopp, Fri Aug 1 11:39:25 2003 UTC revision 1.71 by martinp, Sun Aug 3 19:19:39 2003 UTC
# Line 662  static void print_status(Service_T s, Ht Line 662  static void print_status(Service_T s, Ht
662                                
663            printf_ssl_socket(res->ssl,            printf_ssl_socket(res->ssl,
664              "File '%s' exist\n\t"              "File '%s' exist\n\t"
665              "Size: %.3f MB UID: %d GID: %d Permission: %o\n\t"              "Size: %luB UID: %d GID: %d Permission: %o\n\t"
666              "Monitoring status: %s\n",              "Monitoring status: %s\n",
667              s->name,              s->name,
668              (float) stat_buf.st_size / 1048576, (int)stat_buf.st_uid,              (unsigned long)stat_buf.st_size, (int)stat_buf.st_uid, (int)stat_buf.st_gid,
669              (int)stat_buf.st_gid, (int)(stat_buf.st_mode & 07777),              (int)(stat_buf.st_mode & 07777),
670              statusnames[s->do_monitor]);              statusnames[s->do_monitor]);
671    
672          } else {          } else {
673    
674           fprintf(out,           fprintf(out,
675             "File '%s' exist\n\t"             "File '%s' exist\n\t"
676             "Size: %.3f MB UID: %d GID: %d Permission: %o\n\t"             "Size: %luB UID: %d GID: %d Permission: %o\n\t"
677             "Monitoring status: %s\n",             "Monitoring status: %s\n",
678             s->name,             s->name,
679             (float) stat_buf.st_size / 1048576, (int)stat_buf.st_uid,             (unsigned long)stat_buf.st_size, (int)stat_buf.st_uid,
680             (int)stat_buf.st_gid, (int)(stat_buf.st_mode & 07777),             (int)stat_buf.st_gid, (int)(stat_buf.st_mode & 07777),
681             statusnames[s->do_monitor]);             statusnames[s->do_monitor]);
682    
# Line 1021  static void do_home_file(HttpRequest req Line 1021  static void do_home_file(HttpRequest req
1021                  "<tr %s>"                  "<tr %s>"
1022                  "<td width=\"20%\"><a href='/%s'>%s</a></td>"                  "<td width=\"20%\"><a href='/%s'>%s</a></td>"
1023                  "<td align=\"left\"><font color=green>exist</font></td>"                  "<td align=\"left\"><font color=green>exist</font></td>"
1024                  "<td align=\"right\">%.3f MB</td>"                  "<td align=\"right\">%lu B</td>"
1025                  "<td align=\"right\">%o</td>"                  "<td align=\"right\">%o</td>"
1026                  "<td align=\"right\">%d</td>"                  "<td align=\"right\">%d</td>"
1027                  "<td align=\"right\">%d</td>"                  "<td align=\"right\">%d</td>"
1028                  "</tr>",                  "</tr>",
1029                  on?"bgcolor=\"#EFEFEF\"":"",                  on?"bgcolor=\"#EFEFEF\"":"",
1030                  s->name, s->name,                  s->name, s->name,
1031                  (float) stat_buf.st_size / 1048576,                  (unsigned long)stat_buf.st_size,
1032                  stat_buf.st_mode & 07777,                  stat_buf.st_mode & 07777,
1033                  stat_buf.st_uid,                  stat_buf.st_uid,
1034                  stat_buf.st_gid                  stat_buf.st_gid
# Line 1389  static void do_task_directory(HttpReques Line 1389  static void do_task_directory(HttpReques
1389        }        }
1390      }      }
1391    }    }
1392      if(s->perm != -1)
1393          out_print(res, "<tr><td>Associated permission</a></td><td>%o</td></tr>",
1394                    s->perm);
1395    out_print(res,    out_print(res,
1396              "<tr><td>Check service</a></td><td>Every %d cycle</td></tr>",              "<tr><td>Check service</a></td><td>Every %d cycle</td></tr>",
1397              s->every?s->every:1);              s->every?s->every:1);
# Line 1401  static void do_task_directory(HttpReques Line 1404  static void do_task_directory(HttpReques
1404    out_print(res,    out_print(res,
1405              "<tr><td>GID</a></td><td>%d</td></tr>",              "<tr><td>GID</a></td><td>%d</td></tr>",
1406              stat_buf.st_gid);              stat_buf.st_gid);
   if(s->perm != -1)  
       out_print(res, "<tr><td>Associated permission</a></td><td>%o</td></tr>",  
                 s->perm);  
1407    out_print(res,    out_print(res,
1408              "<tr><td>Permission</a></td><td>%o</td></tr>",              "<tr><td>Permission</a></td><td>%o</td></tr>",
1409              stat_buf.st_mode & 07777);              stat_buf.st_mode & 07777);
# Line 1557  static void do_task_file(HttpRequest req Line 1557  static void do_task_file(HttpRequest req
1557        }        }
1558      }      }
1559    }    }
1560      {
1561        Size_T sl;
1562        for(sl= s->sizelist; sl; sl= sl->next) {
1563          if(sl->test_changes) {
1564            out_print(res,
1565                      "<tr><td>Associated size</a></td>"
1566                      "<td>If %s was changed then %s</td></tr>",
1567                      s->path, actionnames[sl->action]);
1568          } else {
1569            out_print(res,
1570                      "<tr><td>Associated size</a></td>"
1571                      "<td>If %s %s %lu byte(s) then %s</td></tr>",
1572                      s->path, operatornames[sl->operator],
1573                      sl->size, actionnames[sl->action]);
1574          }
1575        }
1576      }
1577      if(s->perm != -1)
1578          out_print(res, "<tr><td>Associated permission</a></td><td>%o</td></tr>",
1579                    s->perm);
1580    out_print(res,    out_print(res,
1581              "<tr><td>Check service</a></td><td>Every %d cycle</td></tr>",              "<tr><td>Check service</a></td><td>Every %d cycle</td></tr>",
1582              s->every?s->every:1);              s->every?s->every:1);
# Line 1564  static void do_task_file(HttpRequest req Line 1584  static void do_task_file(HttpRequest req
1584              "<tr><td>Timeout</a></td><td>Timeout if %d restart within %d cycles"              "<tr><td>Timeout</a></td><td>Timeout if %d restart within %d cycles"
1585              "</td></tr>", s->to_start, s->to_cycle);              "</td></tr>", s->to_start, s->to_cycle);
1586    out_print(res,    out_print(res,
1587              "<tr><td>Size</a></td><td>%.3f MB</td></tr>",              "<tr><td>Size</a></td><td>%lu B</td></tr>",
1588              (float) stat_buf.st_size / 1048576);              (unsigned long)stat_buf.st_size);
1589    out_print(res,    out_print(res,
1590              "<tr><td>UID</a></td><td>%d</td></tr>",              "<tr><td>UID</a></td><td>%d</td></tr>",
1591              stat_buf.st_uid);              stat_buf.st_uid);
1592    out_print(res,    out_print(res,
1593              "<tr><td>GID</a></td><td>%d</td></tr>",              "<tr><td>GID</a></td><td>%d</td></tr>",
1594              stat_buf.st_gid);              stat_buf.st_gid);
   if(s->perm != -1)  
       out_print(res, "<tr><td>Associated permission</a></td><td>%o</td></tr>",  
                 s->perm);  
1595    out_print(res,    out_print(res,
1596              "<tr><td>Permission</a></td><td>%o</td></tr>",              "<tr><td>Permission</a></td><td>%o</td></tr>",
1597              stat_buf.st_mode & 07777);              stat_buf.st_mode & 07777);

Legend:
Removed from v.1.70  
changed lines
  Added in v.1.71

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