X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;ds=sidebyside;f=src%2Fhttp_command.c;h=de4ae13a0b4689c6bb9dfc5346cd97b7cd296393;hb=1bb568a75bc0d9f55b0d36cbc8891db5574acf19;hp=4123cccecf99c2fa98826bf18554f79dbd6463fe;hpb=a1892356917081446d2714369c68da7322a824a4;p=pazpar2-moved-to-github.git
diff --git a/src/http_command.c b/src/http_command.c
index 4123ccc..de4ae13 100644
--- a/src/http_command.c
+++ b/src/http_command.c
@@ -48,19 +48,28 @@ void print_meminfo(WRBUF wrbuf)
{
struct mallinfo minfo;
minfo = mallinfo();
- wrbuf_printf(wrbuf, " \n"
- " %d\n"
- " %d\n"
- " %d\n"
- " %d\n"
- " %d\n"
- " %d\n"
- " %d\n"
- " %d\n"
- " %d\n"
- " \n",
- minfo.arena, minfo.uordblks, minfo.fordblks,minfo.ordblks, minfo.keepcost, minfo.hblks, minfo.hblkhd, minfo.arena + minfo.hblkhd, minfo.uordblks + minfo.hblkhd);
-
+ wrbuf_printf(wrbuf, " \n"
+ " %d\n"
+ " %d\n"
+ " %d\n"
+ " %d\n"
+ " %d\n"
+ " %d\n"
+ " %d\n"
+ " %d\n"
+ " %d\n"
+ " %d\n"
+ " \n",
+ minfo.arena,
+ minfo.ordblks,
+ minfo.smblks,
+ minfo.hblks,
+ minfo.hblkhd,
+ minfo.usmblks,
+ minfo.fsmblks,
+ minfo.uordblks,
+ minfo.fordblks,
+ minfo.keepcost);
}
#else
#define print_meminfo(x)
@@ -694,21 +703,6 @@ static void cmd_session_status(struct http_channel *c)
release_session(c, s);
}
-static void cmd_server_status(struct http_channel *c)
-{
- int sessions = sessions_count();
- int clients = clients_count();
-
- response_open_ok(c, "server-status");
-
- wrbuf_printf(c->wrbuf, "\n %d\n", sessions);
- wrbuf_printf(c->wrbuf, " %d\n", clients);
- print_meminfo(c->wrbuf);
-
- response_close(c, "server-status");
- xmalloc_trav(0);
-}
-
static void bytarget_response(struct http_channel *c, struct http_session *s,
const char *cmd_status)
{
@@ -1487,6 +1481,9 @@ static void cmd_info(struct http_channel *c)
}
}
#endif
+ wrbuf_printf(c->wrbuf, " %d\n", sessions_get_count());
+ wrbuf_printf(c->wrbuf, " %d\n", clients_count());
+ print_meminfo(c->wrbuf);
info_services(c->server, c->wrbuf);
response_close(c, "info");
@@ -1505,7 +1502,6 @@ struct {
{ "termlist", cmd_termlist },
{ "exit", cmd_exit },
{ "session-status", cmd_session_status },
- { "server-status", cmd_server_status },
{ "service", cmd_service },
{ "ping", cmd_ping },
{ "record", cmd_record },