Subject | Re: FB Classic Server / how many connected user |
---|---|
Author | Photios Loupis (4T) |
Post date | 2004-10-05T04:09:27Z |
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:
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:
>Windows
> I do not use Classic Server, but based on the fact that Classic
> spawns a process for every connection user then the following
> Script should work...<Behnke@h...>
>
>
> ' -- 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"
> wrote:connected
> > Dear Members,
> >
> > is there a way to find out how many concurrent users are
> on
> > the Database ?
> >
> > Many thanks
> >
> > Gerhard