Results 1 to 9 of 9
  1. #1
    Join Date
    Sep 2008
    Posts
    33

    Unanswered: Bad server performance

    Hi Gurus,

    I have a server with poor performance.I have checked the TOP and found that one of the process was taking 90% CPU time.I was unable to track that session with PID.I guess that might be unix process.Is there anyway we track the session using the PID of the process from top command.

    Any Answers are greatly appreciated....


    Thanks&&Regards
    Mallik.

  2. #2
    Join Date
    Aug 2005
    Posts
    140
    What's the name of the process?
    I dont understand why do you want to find out the corresponding informix session if you think its unix(not informix) process.

  3. #3
    Join Date
    Sep 2008
    Posts
    33
    Hi,

    Am sorry that was informix process(oninit) but i am unable to trace that session.

  4. #4
    Join Date
    Aug 2005
    Posts
    140
    in onstat -g glo, find the process number of your process(column PID)-you get the virtual processor number and virtaul process class that are interesting for you.

    in onstat -g ath - find the threads that are running on this virtual processor (column VP-CLASS).

    Take the value of RSTC column for these threads(from onstat -g ath), and find the coresponding sessions in onstat -u (comparing the RSTC value with column ADDRESS)

    hope this helps

  5. #5
    Join Date
    Aug 2005
    Posts
    140
    as i was thinking about that...it's not a good solution. Becasue thread from one session can run on several virtual processors(of course not at the same time). So I think if you have more VP of the same class... there is no direct way how to assign informix session to the operating system process number.

  6. #6
    Join Date
    Sep 2008
    Posts
    33
    HI stanislav,

    Thanks for your reply,I have tried to find out but I could not trace that session bacause there were many VP's running in the same class.But if we can exactly figure out that session(which is taking 95% CPU time from top)that would really help me..

    Regards
    Mallik

  7. #7
    Join Date
    Apr 2007
    Location
    Jundiai / SP - Brasil
    Posts
    311
    Before the IDS 11.50 this kind of identification are very annoying and must be manually or with shell script...

    In IDS 11.50 you can get the CPU utilization of each thread with command:
    onstat -g cpu

    Before this version, so far I know, you need to get a statical sample... something with this logical:

    Code:
    > act.out
    i = 0
    while i < 60
    do
       onstat -g act | awk '/tid/,/^ *$/ { print $1 } ' | egrep -v "tid|^ *$" >> act.out
      i=$((i+1))
    done 
    cat act.out | sort -n | uniq -c  | sort -n
    This code, are not exactly a shell, I just write the logic to get the thread where use more CPU.
    The Idea above is repeat the commant "onstat -g act" 60 times and see who appear more time...
    but, remember , you will get the thread number, you still need identificate the session id of this thread what can be do with this SQL:
    Code:
    select us_tid as tid , us_sid as sid , us_name as user from sysuserthreads
    ________________________________________
    César Inacio Martins
    Jundiai / SP - Brasil
    http://www.imartins.com.br/informix - em Português
    http://www.imartins.com.br/informix - English (translated by Google).
    ________________________________________

  8. #8
    Join Date
    Sep 2008
    Posts
    33
    Hi Cienma,

    Thanks a ton!!!!!!!!!!!!!Will try to work out with this.

    Regards-Mallik

  9. #9
    Join Date
    Aug 2005
    Posts
    140
    ceinma is right...and just for info,
    you can idenfificate the session id from "onstat -g act" output also by comparing column "address" in "onstat - u" with column "rstcb" in "onstat -g act" (if they are user threads) ....as i mentioned before. So you don't have to use system tables.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •