Thread View: news.software.nntp
5 messages
5 total messages
Started by Michael Hucka
Wed, 22 Jan 1997 00:00
Simple way to get a list of inbound nntp connections to INN?
Author: Michael Hucka
Date: Wed, 22 Jan 1997 00:00
Date: Wed, 22 Jan 1997 00:00
18 lines
1213 bytes
1213 bytes
Is there a simple way to get a list of which sites are currently connected to
innd? What I've been doing so far is
lsof | grep innd | grep nntp
since I haven't found an obvious command to do it. But this is like using a
golden brick to swat a fly.
Seems like `ctlinnd' should have an option similar to "feedinfo", but in the
reverse direction; i.e., listing inbound connections.
--
Mike Hucka hucka@umich.edu <URL: http://ai.eecs.umich.edu/people/hucka>
PhD to be, computational models of human visual processing (AI Lab) University
UNIX systems administrator & programmer/analyst (EECS DCO) of Michigan
Re: Simple way to get a list of inbound nntp connections to INN?
Author: Michael Hucka
Date: Wed, 22 Jan 1997 00:00
Date: Wed, 22 Jan 1997 00:00
22 lines
1481 bytes
1481 bytes
>>>>> On 22 Jan 1997, jgreco@ns.sol.net (Joe Greco) wrote:
jgreco> In article <82buaioyu4.fsf@eagle.eecs.umich.edu>, Michael Hucka
jgreco> <hucka@eecs.umich.edu> wrote:
>> Is there a simple way to get a list of which sites are currently
>> connected to innd? What I've been doing so far is
jgreco> Try:
jgreco> .... ctlinnd -t60 name ...
Ah. Well, I feel dumb. It wasn't obvious to me what a "channel" was in this
context, so this didn't leap out at me from the man page. Now it's obvious ...
--
Mike Hucka hucka@umich.edu <URL: http://ai.eecs.umich.edu/people/hucka>
PhD to be, computational models of human visual processing (AI Lab) University
UNIX systems administrator & programmer/analyst (EECS DCO) of Michigan
Re: Simple way to get a list of inbound nntp connections to INN?
Author: Joe Greco
Date: Wed, 22 Jan 1997 00:00
Date: Wed, 22 Jan 1997 00:00
103 lines
2699 bytes
2699 bytes
In article <82buaioyu4.fsf@eagle.eecs.umich.edu>,
Michael Hucka <hucka@eecs.umich.edu> wrote:
>Is there a simple way to get a list of which sites are currently connected to
>innd? What I've been doing so far is
>
> lsof | grep innd | grep nntp
>
>since I haven't found an obvious command to do it. But this is like using a
>golden brick to swat a fly.
>
>Seems like `ctlinnd' should have an option similar to "feedinfo", but in the
>reverse direction; i.e., listing inbound connections.
Try:
#! /bin/sh
PATH=${PATH}:/usr/local/news/bin:/usr/local/bin; export PATH
uptime
echo ""
ctlinnd mode
echo ""
newsdelay
echo ""
echo 'Server connections:'
ctlinnd -t60 name '' 2>&1 \
| egrep -v ':proc:|:file:|:file$|^remconn:|^control:|^localconn:' \
| sed -e 's/:[0-9]*$//' \
| sort \
| uniq -c \
| sed -e '/^[ ]*$/d' \
| awk '{print length($0), $0}' \
| sort -n \
| sed 's/^[0-9][0-9]* *//' \
| awk '
BEGIN {
linelen = 0;
}
{
len = length($0);
if (len >= 80) {
end = "";
}
else if (len >= 72) {
end = "\t\t\t";
len += 16 + (8 - len % 8);
}
else if (len >= 64) {
end = "\t";
len += (8 - len % 8);
}
else if (len >= 56) {
end = "\t\t";
len += 8 + (8 - len % 8);
}
else if (len >= 48) {
end = "\t\t\t";
len += 16 + (8 - len % 8);
}
else if (len >= 40) {
end = "\t";
len += (8 - len % 8);
}
else if (len >= 32) {
end = "\t";
len += (8 - len % 8);
}
else if (len >= 24) {
end = "\t\t";
len += 8 + (8 - len % 8);
}
else if (len >= 16) {
end = "\t";
len += (8 - len % 8);
}
else if (len >= 8) {
end = "\t\t";
len += 8 + (8 - len % 8);
}
else {
end = "\t\t\t";
len += 16 + (8 - len % 8);
}
if (len + linelen > 80) {
printf("\n");
linelen = len;
}
else {
linelen += len;
}
printf("%s%s", $0, end);
}
END {
if (end != "\n") {
printf("\n");
}
printf("\n");
}'
... JG
Re: Simple way to get a list of inbound nntp connections to INN?
Author: bill davidsen
Date: Wed, 22 Jan 1997 00:00
Date: Wed, 22 Jan 1997 00:00
20 lines
1188 bytes
1188 bytes
In article <5c52p8$g0c@earth.alpha.net>, Joe Greco <jgreco@ns.sol.net> wrote: | >Seems like `ctlinnd' should have an option similar to "feedinfo", but in the | >reverse direction; i.e., listing inbound connections. | | Try: [ *big* script ] ctlinnd name '' | sort | pr -t -3 - Note: some versions of pr may want a "-b" as well, to make all columns the same length. -- -bill davidsen (davidsen@tmr.com) "As a software development model, Anarchy does not scale well." -Dave Welch
Re: Simple way to get a list of inbound nntp connections to INN?
Author: James Brister
Date: Wed, 22 Jan 1997 00:00
Date: Wed, 22 Jan 1997 00:00
18 lines
1019 bytes
1019 bytes
Michael Hucka <hucka@eecs.umich.edu> writes: > Is there a simple way to get a list of which sites are currently connected to > innd? Have a look at ctlinnd name '' You would need to strip out the control and outbound connection entries. James -- James Brister brister@vix.com Internet Software Consortium http://www.isc.org/isc inn@isc.org
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads