If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Monitoring sessions

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-06-07, 06:14
georgipa georgipa is offline
Registered User
 
Join Date: Dec 2002
Location: Madrid - Spain
Posts: 283
Thumbs down Monitoring sessions

Hi,

Somebody can explain me this question.

I execute onstat -u as user informix, there are a process
8cd53788 Y--P--- 218399 bfernanr 27 82787928 0 1 10001135 0
I execute onstat -g ses 218399 and the values of this process do not change, but if I execute onstat -u otherwise the output showme this process. I thing do not is active and not will be dispalyed in onstat -u.

Excuse me my english.

Thank you for you help.
Reply With Quote
  #2 (permalink)  
Old 09-06-07, 15:42
jwain jwain is offline
Registered User
 
Join Date: Aug 2003
Location: Allentown pa
Posts: 41
The session will stay active even if its not doing anything. Thats controled by the application thats connecting to the DB. In other words it keeps connection and awaits a command from the app
__________________
Jeff Wain
Reply With Quote
  #3 (permalink)  
Old 09-06-07, 15:44
jwain jwain is offline
Registered User
 
Join Date: Aug 2003
Location: Allentown pa
Posts: 41
If someone does dbaccess dbname and does not get out the session will also stay sleeping
__________________
Jeff Wain
Reply With Quote
  #4 (permalink)  
Old 09-06-07, 15:46
jwain jwain is offline
Registered User
 
Join Date: Aug 2003
Location: Allentown pa
Posts: 41
You can tell if something is running with onstat -u if the number of I/O is increasing not woth onstat -s ses it will only show the last parsed sql run by whatever
__________________
Jeff Wain
Reply With Quote
  #5 (permalink)  
Old 09-07-07, 08:11
Tyveleyn Tyveleyn is offline
Registered User
 
Join Date: Aug 2006
Location: The Netherlands
Posts: 248
Here's a script in bash, based on onstat -u I use to monitor running sessions. It stores a helpfile in $HOME and lists sessions that are not present in the helpfile or sessions which' nreads or nwrites have changed. Maybe it's helpfull in your case.
Code:
#!/bin/bash                                                                    
                                                                               
w | sed -n '1p'                                                                
echo                                                                           
onstat -u|awk '                                                                
BEGIN   {                                                                      
            j = 1                                                              
            file = substr(ARGV[1], index(ARGV[1], "=")+1)                      
            file = file "/" substr(ARGV[2], index(ARGV[1], "=")+1) ".hlp"      
            while(getline prev[j] < file > 0) { j++ }                          
        }                                                                      
NR==2   {printf("%s\n", substr($0, 1, (i = index($0, "days")) > 0 ? i+3 : 80))}
NR==3   {for(i = 0; i < 80; i++) printf("%c", "="); printf("\n")}              
NR==5   {printf("%s\n", $0)}                                                   
        {                                                                      
            if (NR > 5 && NF > 9)                                              
            {                                                                  
                line[++y] = $1 " " $3 " " $9 " " $10                           
                for(i = 1; i <= j; i++)                                        
                    if(line[y] == prev[i])                                     
                        break                                                  
                    else if(i == j)                                            
                        print $0                                               
                    else                                                       
                        continue                                               
            }                                                                  
        }                                                                      
END     {                                                                      
            for(i = 1; i <= y; i++)                                            
                print line[i] > file                                           
            print                                                              
        }' v=$HOME f=`basename $0`
Regards
Reply With Quote
  #6 (permalink)  
Old 09-20-07, 13:28
ceinma ceinma is offline
Registered User
 
Join Date: Apr 2007
Location: Jundiai / SP - Brasil
Posts: 311
may be this can help you to identify inactive connections...

onstat -g ntt | more

"The onstat -g ntt command displays the global network information plus user thread access times. The output is sorted in reverse order by session ID."

columns:
open The time this connection was opened.
read The last time a read operation occurred.
write The last time a write operation occurred.
__________________
________________________________________
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).
________________________________________
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On