Sponsored Content
Full Discussion: Truss output interpretation
Top Forums UNIX for Advanced & Expert Users Truss output interpretation Post 302921541 by Don Cragun on Saturday 18th of October 2014 03:39:16 AM
Old 10-18-2014
OK. So you're sending a request to a server on a socket and immediately after sending the request, you try to read a response from the server with NDELAY set in the socket options. There is no server and no network that can respond that fast to a request.

There are a couple of obvious things you could try:
  1. Drop the TCP_NDELAY socket option so the read() will wait for data instead of returning immediately if no data is present.
  2. Drop the 1st read() and start with the poll() or pollsys() to wait for data to be present before attempting the read().
I haven't tried to evaluate the arguments to pollsys() to see if your program is waiting for data on a group of file descriptors or just waiting for data on fd #4. If it is just waiting for data on fd #4, I would start by trying #1; but if your program can continue processing if data is available on another file descriptor as well, choose option 2.

With what you have shown us there is no way for us to guess why it is taking more than 24 seconds for the server to respond to your request.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

truss

I'm a DBA so no abuse please! I've for 5 Oracle Forms processes that are spinning and am trying to find out if they're doing anything: Running HPUX 11.11 CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND 9 ? 2735 oracle 241 20 24228K 16668K run 2607:29 84.92... (2 Replies)
Discussion started by: fraze
2 Replies

2. UNIX for Advanced & Expert Users

truss output

Hi, We keep getting hanging Oracle process for our ETL. The dba's asked me to do o truss. All I see is pages and pages of the following,:cool: pollsys(0xFFFFFFFF7FFF38C8, 1, 0xFFFFFFFF7FFF3800, 0x00000000) = 0 pollsys(0xFFFFFFFF7FFF38C8, 1, 0xFFFFFFFF7FFF3800, 0x00000000) = 0... (0 Replies)
Discussion started by: happyadm
0 Replies

3. Shell Programming and Scripting

how to use truss?

Hi all, while trying to debug and figure out why a lofiadm command was not working on my script, i came across a cmd called "truss" all i know about it is that it executes the specified command and produces a trace of the system calls it performs, the signals it receives, and the machine faults... (5 Replies)
Discussion started by: wrapster
5 Replies

4. Shell Programming and Scripting

truss output

Hi I have to get redirect the truss ouput to file. I am doing truss -p 12121 >> output.txt But it still displays on the screen adn output.txt is empty Can some help how to do this? Thanks in advance Ammu (1 Reply)
Discussion started by: ammu
1 Replies

5. Shell Programming and Scripting

need help with truss !

i have to gather some info about a process and redirect it to a1.txt file. For this i m using truss command truss -po a1.txt $PID_Detail where $PID_Detail= 1482944 3362976 -------------------------------------------------------------------------- Below the script: #!/bin/ksh for i... (6 Replies)
Discussion started by: ali560045
6 Replies

6. AIX

lspath output interpretation

On my VIo I see the following for my disks: $ lspath | grep hdisk6 Enabled hdisk6 fscsi0 200600a0b82193f7,4000000000000 Enabled hdisk6 fscsi0 200700a0b82193f7,4000000000000 Enabled hdisk6 fscsi2 200600a0b82193f8,4000000000000 Failed hdisk6 fscsi2 200700a0b82193f8,4000000000000 $ lspath |... (8 Replies)
Discussion started by: petervg
8 Replies

7. AIX

Truss output

Hello, I'm using AIX 5.3.12.5 and trying to understand truss output. I'm running a job with real time of 16 minutes but only 4 minutes of CPU time. I'm trying to understand what the process is doing. I'm getting a lot of kread, kpread, kwrite, kpwrite... localhost:~ x$ grep... (1 Reply)
Discussion started by: Kovacs
1 Replies

8. UNIX for Dummies Questions & Answers

Truss output

Hi, I want to trace a background java program which runs in infinite loop. I have used truss command for this. But the program terminated after some hours with below truss output: Received signal #1, SIGHUP, in lwp_cond_wait() /1: siginfo: SIG#0 Please let me know what... (0 Replies)
Discussion started by: Hara Prasad
0 Replies

9. UNIX for Advanced & Expert Users

Truss output

Hi, I want to trace a background java program which runs in infinite loop. I have used truss command for this. But the program terminated after some hours with below truss output: Received signal #1, SIGHUP, in lwp_cond_wait() /1: siginfo: SIG#0 Please let me know what... (5 Replies)
Discussion started by: Hara Prasad
5 Replies

10. UNIX for Advanced & Expert Users

unable to understand the output of TRUSS command

Hi, I am trying to set ulimit for soft stack unlimited, but this is not taking effect, after tracing the ulimit -a unlimited command, the below output was generated, which i am unable to comprehend. Could any one help me with this? prcbap1-r10prod: truss -d ulimit -s unlimited Tue Dec 30... (2 Replies)
Discussion started by: NasirAbbasi
2 Replies
EvmConnection(5)						File Formats Manual						  EvmConnection(5)

NAME
EvmConnection - Connection to the Event Management daemon DESCRIPTION
An EVM connection is the context through which data is passed to and from the EVM daemon. A connection has the following attributes: Con- nection Type Response Mode Transport Type Callback, and associated Callback Argument Connection Context These attributes are described in the following sections. An EVM client is any program that processes events through the EVM daemon. EVM supports three distinct types of client: posting clients, subscribing (listening) clients, and service clients. Regardless of type, all clients connect to the EVM daemon in the same way. Connection Type The type of connection established determines the client type. There are associated constants to be used when the connection is created. The client uses this connection to post events to the daemon for distribution. The client uses this connection to listen for events dis- tributed by the daemon. The client uses this connection to request that the daemon provide a service, such as retrieve events from a log. A client may use all three types of connection, but must establish each connection separately. Response Mode The response mode associated with a connection determines the manner in which certain API functions will deal with the daemon's responses to request messages. See the EvmConnCreate(3) reference page for full details of each mode. The modes are: The API functions will return as soon as the request has been sent to the daemon, and the caller will not receive the daemon's response. The API functions will send the request to the daemon, and wait until a response has been received before returning to the caller. The returned status code will reflect the response. The API functions will return as soon as the request has been sent to the daemon, and the caller must monitor the connection for a response. When the response is received, the connection's callback function will be invoked to handle it. Transport type This specifies the type of connection to be made to the daemon. Valid connection types are as follows: Connection is through a domain socket to a daemon running on the local host. Connection is through a TCP/IP socket to a daemon running on a remote host. Callback This attribute specifies the function you want to handle any incoming responses resulting from activity on the connection. Callbacks are discussed in more detail in the EvmCallback(5) reference page. This attribute is valid only when the Response Mode is EvmRESPONSE_CALL- BACK. Connection Context This attribute is a handle to a connection returned when a connection is created. You must pass this handle to all other functions you call which need to access the connection. Connection Monitoring Once you have established a connection, the API functions will take care of all communication activity with the daemon. However, you must make sure that these functions get an opportunity to do their work when activity occurs. EVM provides several ways for you to do this - the method you choose depends on the model of your program. If your program is I/O driven, waiting for I/O to occur on one or more file descriptors, handling activity as it occurs and then returning to wait for more I/O, it probably spends most of its time in a select() call. In this case, you should use EvmConnFdGet() to establish which file descriptor the EVM connection is using, and then include that fd in your select() read mask. When you detect activity on the connection, invoke EvmConnDispatch() to handle the activity. If your program is driven purely by activity on a single EVM connection, you can let the API handle the I/O entirely by using EvmConnWait() to wait for activity to occur on the connection. When the function returns, dispatch the I/O using EvmConnDispatch(), and then return to EvmConnWait(). If your program is driven in some other way, and there are certain points (for example, at the end of some control loop) at which you want to handle EVM activity, you can call EvmConnCheck() to check for any outstanding activity. If this function indicates that there is some- thing to do, you can call EvmConnDispatch(); otherwise you can continue immediately with normal processing. Destroying a connection When you are finished with the connection, use EvmConnDestroy() to disconnect from the daemon. It is important to check the return status for any failure each time you call a connection function and destroy the connection if a failure occurred. The file descriptor associated with the connection remains open until you destroy the connection even if I/O errors have been detected on the connection. SEE ALSO
Functions: select(2) Routines: EvmConnControl(3), EvmConnCreate(3), EvmConnFdGet(3), EvmConnCheck(3), EvmConnWait(3), EvmConnDispatch(3), EvmConnDestroy(3) Event Management: EVM(5) Event Callback: EvmCallback(5) EVM Events: EvmEvent(5) delim off EvmConnection(5)
All times are GMT -4. The time now is 04:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy