Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
A DBA asked how to spot "runaway" or leftover sessions purely from inside Informix (onstat/SQL), since he can't kill processes at the OS level and shell scripts spawning SQL make the client PID hard to trace. Replies distinguished runaway from zombie sessions: use ps -ef at OS level, and within the engine compare nreads/nwrites and CPU/memory in onstat -u and onstat -g ses against expected workload, and match session PIDs to live OS processes to find orphaned sessions; onperf was also suggested for a quick visual. No single definitive check emerged — the advice is heuristic, requiring knowledge of normal values.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Hi All,
I want to identify what are run away process still running in the database. I
can do "onstat -g ses <sessionid> and get the pid of the session. However, i
can't validate that it is a runaway job.
Is there a way that i can select from a database? or onstat, how would i know,
what are the indication?
Thanks,
It appears you're asking four different questions, each with a different
answer:
1. How to identify a runaway client process, which is an OS question
2. How to identify a runaway DBMS session or thread
3. How to identify a zombie client process
4. How to identify a zombie DBMS session or thread
I'm guessing that by "runaway", you mean threads or processes using far
too much CPU time.
For OS processes, you'll have to use OS commands or tools. You didn't
tell us the platform, so I'll guess. On Linux or Unix, ps -ef is what I
normally use. A defunct process is normally labelled as such, and by
watching the time use, you can usually find the processing chewing up
inordinate time. That does mean you have to understand which processes
normally do use a lot of CPU cycles. The equivalent on Windows servers
is different, and I'm not sure of exactly how to do it.
A runaway thread or session in the DBMS is often found by examining the
nreads and nwrites columns of onstat -u and onstat -g ses for suspect
sessions. Again, you have to know the magnitude of the expected values.
Large reporting queries may to millions of reads for example, and that
would not constitute a runaway session. But looking up a customer's
balance due should take something under 100 reads in all probablilty.
Zombie sessions are trickier. I start by matching up the process id of
each client (from onstat -g ses) with OS processes. If some sessions have
no client process, then that's suspect as a defunct session.
Cheers,
Dick Snoke
IBM ChannelWorks
dsnoke@us.ibm.com
(404) 487-1595
From: "JACK PAPA" <informix2009@gmail.com>
To: ids@iiug.org
Date: 08/20/2010 02:50 AM
Subject: How to identify a run away process in Database [20973]
Sent by: ids-bounces@iiug.org
Hi All,
I want to identify what are run away process still running in the
database. I
can do "onstat -g ses <sessionid> and get the pid of the session. However,
i
can't validate that it is a runaway job.
Is there a way that i can select from a database? or onstat, how would i
know,
what are the indication?
Thanks,
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Hi,
I've used ps -ef|grep pid, or ps -ef|grep uid on the OS level. I'm asking if
there's any significant (like tty is equal "-" ) command to identify from the
DB. I'm asking this because a shell script can embed multiple shell script
that calls SQLs to run on the DB. Now, since on the OS level, i cannot kill
any process as it is Admin task, I can kill processes inside the DB.
one question, is there a way to identify a zombie or defunct process in DB?.
The user cannot give me the PID (OS Level) as the application was not properly
exited. This left some sessions inside the database.
Example: a ControlM job is calling Multiple scipt shell script and these calls
SQLs.
onstat ?
Hello!
Here, I only monitor the OS processes, grepping for the '?' character,
excluding the services, or users, that
I are regularly (normally runs).
The db sessions of any os process like this "blacklist" is inside de
Informix 4gl program that called it.
So when we kill the OS process that was blocked, the database session(s)
are even dead.
The other trouble is when the connection is external to the database
(.net app for example).
Then there is no OS process running, just the database session.
On that case, I monitor the sessions threads with most cpu time, most
memory used, and so on.
(Of course it´s a linux machine, ok?)
Hope this helps.
Best regards.
Em 20/08/2010 09:12, JACK PAPA escreveu:
> Hi,
>
> I've used ps -ef|grep pid, or ps -ef|grep uid on the OS level. I'm asking if
> there's any significant (like tty is equal "-" ) command to identify from the
> DB. I'm asking this because a shell script can embed multiple shell script
> that calls SQLs to run on the DB. Now, since on the OS level, i cannot kill
> any process as it is Admin task, I can kill processes inside the DB.
>
> one question, is there a way to identify a zombie or defunct process in DB?.
> The user cannot give me the PID (OS Level) as the application was not
properly
> exited. This left some sessions inside the database.
>
> Example: a ControlM job is calling Multiple scipt shell script and these
calls
> SQLs.
>
> onstat ?
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Alexandre Marini
Tecnologia da Informação - DBA
msn: alexandre_marini@hotmail.com
SEFAZ-MS / SGI-UGSR / Sistemas IBM-Informix
Cert-Info-Mgmt_color <Cert-Info-Mgmt_color.jpg>
IBM Informix Dynamic Server Certified Professional V10 / V11
↪ replying to Alexandre
KARL OLIVER — — source: IIUG Forums & Mailing Lists
I user onperf a gui tool that works well this will very quickly show you whats
top of the heap very quickly. Have have to have xwindows running though. It is
An old tool that i run . Comes standard with informix
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.