🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #18151

More stats for INN

#18151
From: Jeff Garzik
Date: Mon, 02 Jun 1997 00:00
62 lines
2452 bytes
This is a multi-part message in MIME format.

--------------7E4671BD4CDE57851D4B059
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Here's a little Perl script I wrote to display the current status of
the  INN server.  It shows the inn mode, each incoming connection and
its status, outgoing connections, and connected readers.  It caches page
output so that the ctlinnd calls are made, at most, every 200 seconds. 
Live output is at

	http://news.spinne.com/cgi-bin/inn-status

The patch to display connection stats is attached below.  It modifies
the "ctlinnd name" output to display current accepted, rejected, and
refused stats.  I tried to get the patch to display seconds-connected as
well, but I kept getting a short read error??  The Perl source code for
the simple CGI display script is at

	ftp://ftp.spinne.com/pub/usenet/tools/inn-status.pl

-- 
Jeff Garzik
News Administrator, Spinne, Inc.
http://www.spinne.com/usenet/

--------------7E4671BD4CDE57851D4B059
Content-Type: text/plain; charset=us-ascii; name="cc.c.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="cc.c.patch"

*** ../inn-plain/innd/cc.c	Tue Dec 17 09:40:40 1996
--- innd/cc.c	Mon Jun  2 05:21:16 1997
***************
*** 876,881 ****
--- 877,883 ----
      register char     *p;
      register int      count;
      int                       i;
+     char              Gs1[128];
  
      p = av[0];
      if (*p != '\0') {
***************
*** 892,897 ****
--- 894,902 ----
            BUFFappend(&CCreply, NL, 1);
        p = CHANname(cp);
        BUFFappend(&CCreply, p, strlen(p));
+       sprintf(Gs1, ":accepted %ld:refused %ld:rejected %ld",
+               cp->Received, cp->Refused, cp->Rejected);
+         BUFFappend(&CCreply, Gs1, strlen(Gs1));
      }
      BUFFappend(&CCreply, NIL, 1);
      return CCreply.Data;

--------------7E4671BD4CDE57851D4B059--


Technical Details
Message-ID: <33936551.69494AC7@spinne.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <33936551.69494AC7@spinne.com>
Subject: More stats for INN
Date: Mon, 02 Jun 1997 00:00:00 +0000
From: Jeff Garzik <jeff.garzik@spinne.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 245953645
Organization: Spinne http://spinne.com
Newsgroups: news.software.nntp