Home > Archive > SQL Anywhere Feedback > January 2006 > Find process ID (PID) of database engine









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Find process ID (PID) of database engine
David Kerber

2005-12-20, 1:23 pm

I'd like to be able to find the Windows process ID (PID as listed in
task manager) of the database engine service (dbsrv9). This is so I can
determine which of multiple dbsrv9 instances is using excessive CPU
time, and correct it.

Killing the dbsrv9 processes one at a time to find the guilty instance
is not an attractive option. And the services are not set to interact
with the desktop, so "go to process" doesn't help either.

Showing this in the engine properties window in Sybase Central would be
the preferred option even if it had to be run on the server running the
engine, but anything which works to give me that information would help
a lot.

--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
Nick Elson

2006-01-03, 11:23 am

To be honest, I am a little bit confused by this request. This is
also something I felt with [but didn't mention in] your original
thread on the other newgroup.

The reasons for my confusion are as follows:

- the tools that would show you the excessive CPU time also
expose the PID [Perfmon, Taskmgr, ....]

- those are usually the same tools from which you could kill
processes (and by PID in fact)

on the other hand

- if the server is being excessive someplace
[at least excessive enough to ?require? being killed] it may
not be responsive enough for a connection to query such a
server property

and to a lesser extent

- running multiple servers on the same machine may also be a
factor to your excessive system resource utilization [if not just
an unwise use of software since cache, CPU and other
resources can become highly partitioned when multiple server
are used instead of one big server running multiple databases]

Or are you asking not for the ability to KILL the process but
shutdown the server (as they say in ASE-land) politely?

Assuming the latter, how does using an event to monitor the
server properties

ProcessCPU
ProcessCPUSystem
ProcessCPUUser

and decide based upon that when to shut down?


But just as seriously, is this something you come across frequently?


"David Kerber" < ns_dkerber@ns_wraenv
iro.com> wrote in message
news:MPG. 1e120ac64aec27bc9897
c6@forums.sybase.com...
> I'd like to be able to find the Windows process ID (PID as listed in
> task manager) of the database engine service (dbsrv9). This is so I can
> determine which of multiple dbsrv9 instances is using excessive CPU
> time, and correct it.
>
> Killing the dbsrv9 processes one at a time to find the guilty instance
> is not an attractive option. And the services are not set to interact
> with the desktop, so "go to process" doesn't help either.
>
> Showing this in the engine properties window in Sybase Central would be
> the preferred option even if it had to be run on the server running the
> engine, but anything which works to give me that information would help
> a lot.
>
> --
> Remove the ns_ from if replying by e-mail (but keep posts in the
> newsgroups if possible).



David Kerber

2006-01-03, 11:23 am

The basic problem is that if I see in task manager that one of my dbsrv9
instances is using excessive cpu time (excessive meaning "more than I
think it should"), I don't know which database(s) it is running. That
means I don't know which database to start profiling, or if it becomes
necessary, which one to shut down. I also don't know which users to
tell or what server applications it will affect. This applies no matter
whether I can shut it down politely through SC, or I have to kill it
rudely through task manager or the kill utility.

I realize that running multiple databases on a single engine is more
efficient with resources, but some of my apps are not yet stable enough
that I trust them not to misbehave and drive the engine to use 100% CPU
time under certain conditions. That's why I keep them on their own
engines so I can kill them if they misbehave without affecting my other
databases. Using separate engines also makes it easier to monitor which
databases might just need more performance tweaks even if they don't tie
up all the cpu time or cause operational problems right now.

This request essentially became moot when somebody in the other forum
pointed out that dbconsole has the information I was looking for, but it
would still be nice to be able to find it in SybaseCentral as well.

Thanks!


In article <43ba9ec5$1@forums-1-dub>, no_span_nicelson@syb
ase.com
says...[color=darkred]
> To be honest, I am a little bit confused by this request. This is
> also something I felt with [but didn't mention in] your original
> thread on the other newgroup.
>
> The reasons for my confusion are as follows:
>
> - the tools that would show you the excessive CPU time also
> expose the PID [Perfmon, Taskmgr, ....]
>
> - those are usually the same tools from which you could kill
> processes (and by PID in fact)
>
> on the other hand
>
> - if the server is being excessive someplace
> [at least excessive enough to ?require? being killed] it may
> not be responsive enough for a connection to query such a
> server property
>
> and to a lesser extent
>
> - running multiple servers on the same machine may also be a
> factor to your excessive system resource utilization [if not just
> an unwise use of software since cache, CPU and other
> resources can become highly partitioned when multiple server
> are used instead of one big server running multiple databases]
>
> Or are you asking not for the ability to KILL the process but
> shutdown the server (as they say in ASE-land) politely?
>
> Assuming the latter, how does using an event to monitor the
> server properties
>
> ProcessCPU
> ProcessCPUSystem
> ProcessCPUUser
>
> and decide based upon that when to shut down?
>
>
> But just as seriously, is this something you come across frequently?
>
>
> "David Kerber" < ns_dkerber@ns_wraenv
iro.com> wrote in message
> news:MPG. 1e120ac64aec27bc9897
c6@forums.sybase.com...

--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
Greg Fenton

2006-01-03, 8:23 pm

David Kerber wrote:
> The basic problem is that if I see in task manager that one of my dbsrv9
> instances is using excessive cpu time (excessive meaning "more than I
> think it should"), I don't know which database(s) it is running.


Along with the dbconsole suggestion, you might consider a tool such as
ProcessExplorer that you can download (free, source code and all!) from
sysinternals.com. It is a *fantastic* administration tool to have on
hand and will let you see the entire command line used to start up the
server.

Hope this helps,
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com