Which session is using the most cpu resouce?
Posted in 2004
Topics: General Discussion
Can I tell which session is using the most cpu resouce? I can use ps check which process or thread using the most cpu resouce. But Can I make a relationship between threads or sessions of informix and processes or threads of operate system?
Henry,
Sorry this response is so delayed; been a little busy. I'll also apologize
for not being able to answer it completely, but I've got some direction for
you.
The way that I look at this is to use "top" or "glance" or "ps" to determine
which oninit process is at the top of the list. You're going to need the
PID for that process. The next step then is to do an onstat -g glo to see
what kind of VP the oninit process represents. You may find, for instance,
that an AIO VP is consuming most of your resources (which would be a
different kind of issue than if a CPU VP were consuming them). I don't have
the screen right in front of me, but I do know that there's a correlation
between the PID and the VP in the onstat -g glo.
The next step, assuming that you've found a CPU VP is your "heavy hitter",
is to run an onstat -g act, and check which threads are active, and
specifically which threads are active on that CPU VP. Once you've done
that, if need be, you can trace that thread back to the "offending" session,
determine the SQL, and any other information you need.
Let me know if that's not what you were looking for, and I'll see what I can
do to give you a better answer.
Thanks.
Dan Michaelis
Senior Software Developer
eOriginal, Inc
Suite 800
351 West Camden Street
Baltimore, MD 21201
410-625-5187 -- Office
-----Original Message-----
From: HENRY CHEUNG [mailto:zzjijun@21cn.com]
Sent: Saturday, July 03, 2004 4:37 AM
To: ids@iiug.org
Subject: Which session is using the most cpu resouce? [3192]
Can I tell which session is using the most cpu resouce?
I can use ps check which process or thread using the most cpu resouce. But
Can I make a relationship between threads or sessions of informix and
processes or threads of operate system?