Subject Re: FB Classic Server / how many connected user
Author Photios Loupis (4T)
Apologies, a small problem with the script submitted in last post.
The IF statement uses Process.Name (a string attribute) to determine
the process name, therefore the <processfilename> must be enclosed in
double quotes.

' -- Declare variables
Dim iCount

' -- Initialise the variables
iCount = 0

' -- Search for the Application <processfilename>
for each Process in GetObject("winmgmts:
{impersonationLevel=impersonate}").InstancesOf("Win32_process")
if (Process.Name = "<processfilename>") then
iCount = iCount + 1
end if
Next

' -- Display the Process count
wscript.echo "Process Count: " & CStr(iCount)

--- In firebird-support@yahoogroups.com, "Photios Loupis (4T)"
<loupisp@a...> wrote:
>
> I do not use Classic Server, but based on the fact that Classic
> spawns a process for every connection user then the following
Windows
> Script should work...
>
>
> ' -- Declare variables
> Dim iCount
>
> ' -- Initialise the variables
> iCount = 0
>
> ' -- Search for the Application <processfilename>
> for each Process in GetObject("winmgmts:
> {impersonationLevel=impersonate}").InstancesOf("Win32_process")
> if (Process.Name = <processfilename>) then
> iCount = iCount + 1
> end if
> Next
>
> ' -- Display the Process count
> wscript.echo "Process Count: " & CStr(iCount)
>
>
>
> --- In firebird-support@yahoogroups.com, "gbehnke2000"
<Behnke@h...>
> wrote:
> > Dear Members,
> >
> > is there a way to find out how many concurrent users are
connected
> on
> > the Database ?
> >
> > Many thanks
> >
> > Gerhard