From f9c49e9759e279408b1928dc681cc9d6a91778e5 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Thu, 1 Feb 2007 13:51:40 +0000 Subject: el cheapo vector debugging --- opentracker.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'opentracker.c') diff --git a/opentracker.c b/opentracker.c index 6200087..06ba0f0 100644 --- a/opentracker.c +++ b/opentracker.c @@ -241,11 +241,18 @@ static void httpresponse( const int64 s, char *data ) { mode = STATS_MRTG; else if( !byte_diff(data,4,"top5")) mode = STATS_TOP5; + else if( !byte_diff(data,4,"dmem")) + mode = STATS_DMEM; else HTTPERROR_400_PARAM; } } + if( mode == STATS_DMEM ) { + if( !( reply_size = return_memstat_for_tracker( &reply ) ) ) HTTPERROR_500; + return sendmallocdata( s, reply, reply_size ); + } + /* Enough for http header + whole scrape string */ if( !( reply_size = return_stats_for_tracker( SUCCESS_HTTP_HEADER_LENGTH + static_outbuf, mode ) ) ) HTTPERROR_500; -- cgit v1.2.3