Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Monitoring Unix Question
Sthepen :
I am very thankfull for you help ...
But it is not all...
Imagine you working at environment that doesn't know the
database, and need to solve problems.
So, the CPU is a item that you helped me to find out the user that is using it a lot,
and in general, what more can i do, thinks like that :
1.) the average of load of the server 2.) disk i/o using 3.) the swap in disk of the memory
Best regards
Eriovaldo
> If you have the "top" utility installed on the Unix box, thi
s makes an easy
> to use interface to identify CPU hogs. For non-
root users to run it, your
> sys admin might have to change default permissions on certai
n "files" such
> as /dev/kmem; or possibly make top SUID root.
>
> If you don't have top, or you can't run it as non-
root, you can try using
> the following ps command to sort things by %
CPU, but I think there might be
> differences among OS's on some of the more exotic ps and sor
t options:
>
> ps -eo pid -o %cpu | sort -rk2 | head -20
>
> After you have identified which PID is the hog, and can see
that it is a
> dedicated server process, you can run something like the fol
lowing to match
> SID & SERIAL# to the correct OS process ID. If you must bru
tally kill the
> process, kill the session in the database, then kill the pid
in the OS.
>
> set linesize whatever_you_like
> set pagesize whatever_you_like
>
> col username format a15
> col osuser format a15
>
> select s.username,
> s.osuser,
> s.sid,
> s.serial#,
> s.process "USER PRCS",
> p.spid "SVR PRCS"
> from v$process p,v$session s
> where p.addr = s.paddr
> and s.username <> ' '
> /
>
>
> > -----Original Message-----
> > From: ecandrietta [mailto:ecandrietta_at_uol.com.br]
> > Sent: Thursday, November 14, 2002 1:20 PM
> > To: Multiple recipients of list ORACLE-L
> > Subject: Monitoring Unix Question
> >
> >
> >
> > Friends :
> >
> > How can i do for get what is running inside a PID that is
> > using a lot of CPU ?
> >
> > How can I get the query that is running inside the databas
e
> > according PID of unix ?
> >
> > I would like to know commands of the unix and the query th
at
> > i need to run in the database for find out the problem.
> >
> > Regards
> >
> > Eriovaldo
> >
> >
> >
> > ---
> > UOL, o melhor da Internet
> > http://www.uol.com.br/
> >
> > --
> > Please see the official ORACLE-
L FAQ: http://www.orafaq.com
> > --
> > Author: ecandrietta
> > INET: ecandrietta_at_uol.com.br
> >
> > Fat City Network Services -- 858-538-
5051 http://www.fatcity.com
> > San Diego, California --
Mailing list and web hosting services
> > ----------------------------------------------------------
--- UOL, o melhor da Internet http://www.uol.com.br/ -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: ecandrietta INET: ecandrietta_at_uol.com.br Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Sat Nov 16 2002 - 16:28:24 CST