Re: nmon and Top Processes
Posted in 2013
Important note: Use any of this scripts at your own risk. Most of them have
been in use in some customers successfully for some time (years) but that
doesn't mean they don't contain bugs. For sure, there are bugs.
Regards
On Tue, Mar 19, 2013 at 10:00 PM, Fernando Nunes <domusonline@gmail.com>wrote:
> Hello Tom,
>
> As Jonathan wrote, Informix doesn't have a 1:1 PID vs session relation (at
> least Informix Dynamic Server), but I suppose you already know that.
> In order to quickly find the sessions consuming more CPU at a specific
> time you can use a script that interacts through several "onstat -g act"
> and counts the number of times the sessions are caught running.
> The is a script on the IIUG repository called *top* that allows you to do
> that on a very rudimentary way. Some years agor I picked that script and
> tried to enhance it.
> You can find the result (and several others, but unfortunately
> undocumented) here:
>
> http://onlinedomus.com/informix/viewvc.cgi/PUBLIC/informix/scripts/ix/
>
> (look for ixtop).
>
> If you run "ixtop -h" it will provide a brief help. The most important
> options are "-n" and "-c":
> -n N will run onstat -g act N times
> -c C means only sessions that were caught C times within the N runs are
> displayed
>
> One of the original problems in the original script is that onstat -g act
> would take a long time to run (specially on systems with audit turned on).
> The solution was o run an "onstat -i" and echo "g act" to it. Much faster,
> meaning the measure is much more meaningful and we can run it many times
> (the default IIRC is 50 or 100 times)
> Be carefull with the following: The version on that page has a bug that if
> you interrupt it it will probably leave "onstat -i" running and consuming
> lots of CPU! I already have the fix but haven't "published" it yet.
>
> Other important options are:
> -t T that will show you only the T top most sessions
> -e "ses" (other options are available, but depnd on other scripts). This
> will immediately run "onstat -g ses" for the sessions it founds. This is
> important, because many times if you wait to get the session numbers and
> then try to get their info, what you'll see are not the problematic queries
> but the ones that follow them (or you may catch the session already idle).
>
> ixtop will also show you the top "tables" (given a criteria like seq
> scans, bufreads, bufwrites etc...)
> It can also show similar info, but for sessions. But here consider that
> it's the absolute values (not the latest N seconds for example). For that I
> believe that what Cesar posted may be more helpful. The problem in showing
> absolute values is that long standing sessions like the ones from
> application servers tend to be on top, just because they are older.
>
> Regards.
>
>
> On Tue, Mar 19, 2013 at 6:27 PM, <tomcaml@gmail.com> wrote:
>
>> When watching the top processes in nmon and what is driving oninit for
>> work, PID's are shown next to the %cpu used.
>>
>> how can i relate those PID's back to sessions id's within the instance?
>>
>> thanks,
>> tom
>> _______________________________________________
>> Informix-list mailing list
>> Informix-list@iiug.org
>> http://www.iiug.org/mailman/listinfo/informix-list
>>
>
>
>
> --
> Fernando Nunes
> Portugal
>
> http://informix-technology.blogspot.com
> My email works... but I don't check it frequently...
>
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...
Many Thanks to all! Tom