Re: [Emerald] How many ports are used.

Josh Hillman ( (no email) )
Tue, 11 May 1999 15:12:21 -0400

Here's a slightly modified one that I've been using for a while.
The number of people online is simply the number of "row affected"

DECLARE @datetime char(20)
SELECT @datetime = '5/1/99 9:45pm'

SELECT Username,
"Start Of Call"=DateAdd(Second, 0-AcctSessionTime-AcctDelayTime,
"End Of Call"=DateAdd(Second, 0-AcctDelayTime, CallDate),
"Seconds Online"=AcctSessionTime,
FROM Calls
WHERE DateAdd(Second, 0-AcctSessionTime-AcctDelayTime, CallDate) <=
AND DateAdd(Second, 0-AcctDelayTime, CallDate) >= @datetime
AND AcctStatusType = 2

Josh Hillman

-----Original Message-----
From: Dale E. Reed Jr. <>
To: <>
Date: Tuesday, May 11, 1999 2:09 PM
Subject: Re: [Emerald] How many ports are used.

>Ed Miller wrote:
>> A while back I had a SQL script that gave me how many
>> ports were in use at a time I entered into the script.
>> I have lost it when one of my machines went south
>> and need it very badly. Does anyone out there have
>> one that will tell me how many people are on line at
>> any one time.
>> I have people that said they could not get in at
>> night and I need to know if it is the phone co. or
>> my ports are full.
>> I suspect that it is a fast busy but I need proof that
>> my line are not full.
>diggin into bag 'o scripts...I think this will do:
>Select count(*)
>From Calls
>Where DateAdd(Second, (0-AcctSessionTime-AcctDelayTime), CallDate) <=
> and DateAdd(Second, (0-AcctDelayTime), CallDate) >= 'x/x/x'
>Dale E. Reed Jr. Emerald and RadiusNT
>IEA Software, Inc.