Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

get top 5 i/o busy session

 
   Database Forums (Home) -> Informix RSS
Next:  Best strategy for creating an application scoped ..  
Author Message
joe

External


Since: Jan 23, 2011
Posts: 2



(Msg. 1) Posted: Sat Jan 29, 2011 12:51 am
Post subject: get top 5 i/o busy session
Archived from groups: comp>databases>informix (more info?)

How to get top 10 i/o busy session by running
'onstat -u' and order by " nreads+nwrites" column that addition
values of "nreads and nwrites"

onstat -u | sort -rnk9 | head -n5
will get top 5 nreads sessions

onstat -u | sort -rnk10| head -n5
will get top 5 nwrites sessions

 >> Stay informed about: get top 5 i/o busy session 
Back to top
Login to vote
Malc

External


Since: Jan 29, 2011
Posts: 1



(Msg. 2) Posted: Sat Jan 29, 2011 2:48 am
Post subject: Re: get top 5 i/o busy session [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

We wrote a dirty little script we call "top10", called from the shell
as per the usage() statement:


usage()
{
echo "usage: top10 chunkio|chunkr|chunkw|mem|userrd|
userwr"
sleep
3
exit
}
case $#
in
1)
break;;
*)
usage;;
esac

getmemstats()
{
onstat -g ses|sort -n -r -k 7|head|grep "^[0-9]"|
\
awk '{printf "%8s %8s %8s %8s %8s\n", $1, $2, $4, $7, $8 }' >
t1.out
echo SID USER PID TOTMEM USEDMEM PROCESS |awk '{printf "%10s %10s
%10s %10s %10s %20s\n", $1, $2, $3, $4, $5,
$6 }'
while true;
do

dataline=`line`
[ $? -ne 0 ]&&
break
set
$dataline
if [ $3 -lt
0 ];then

proc=UNKNOWN

else
proc=`ps -fp$3|grep -v "PPID"|awk '{print
$NF}'`

fi
echo $1 $2 $3 $4 $5 $proc|awk '{printf "%10s %10s %10s %10s
%10s %20s\n", $1, $2, $3, $4, $5,
$6 }'
done <
t1.out
rm
t1.out
}

case $1
in
chunkio)
# chunk usage by overall I/
O:
echo "gfd pathname totalops dskread dskwrite io/
s";
onstat -g iof|sort -n -r -k6|
head;;
chunkr)
# chunk usage by
reads:
echo "gfd pathname totalops dskread dskwrite io/
s";
onstat -g iof|sort -n -r -k4|
head;;
chunkw)
# chunk usage by
writes:
echo "gfd pathname totalops dskread dskwrite io/
s";
onstat -g iof|sort -n -r -k5|
head;;
mem)
#
Memory
getmemstats;;
userrd)
# User Read
Activity
onstat -u|egrep -v " informix |Informix Dynamic|Userthreads|^$|address
"|sort -n -r -k 9|
head;;
userwr)
# User Write
Activity
onstat -u|egrep -v " informix |Informix Dynamic|Userthreads|^$|address
"|sort -n -r -k 10|
head;;
*)
usage;;
esac

 >> Stay informed about: get top 5 i/o busy session 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Informix Session Information - Hello, We have the following situation. Our 4GL developers have a need to identify and save in a variable the current session isolation level. If the isolation level is not "dirty read" they would set it to dirty read. Then they would execute...

Informix session VS 'oninit' CPU usage - Hi Gurus, a question for you. And sorry in advance if it has been already answered: I cannot find any previous reference to what I am looking for. I use Informix IDS 9.40.UC6 on Sun Solaris 9. Looking at the OS statstics, sometimes it can be observed..

Testing the 'free' versions - moving from Dev edition to I.. - Just a quick wisdom request - I have the Developer edition on a Linux box and want to replace it with Innovator-C; what's the best method to do this? Just untar the new version over the old and run 'ids_install' again, or should I remove the old Dev..

AUTO: Douglas Dailey/Lenexa/IBM is out of the office (retu.. - I am out of the office until 12/05/2011. Note: This is an automated response to your message "Informix-list Digest, Vol 302, Issue 4" sent on 12/3/2011 10:00:01. This is the only notification you will receive while this person is away.

Need help to empty data in chunk before drop it. - Hello all, I've located one bad chunk in my database. I tried to drop it, but I can't drop chunk#26 because some tables extent still in this chunk. Since, most of the data in this chunk are related to system tables, I am not sure if it is safe to unload...
   Database Forums (Home) -> Informix All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]