LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-13-2012, 08:35 PM   #1
ALB
LQ Newbie
 
Registered: Mar 2012
Posts: 10

Rep: Reputation: Disabled
strace question poll taking a long time on an open command


I am trying to understand what this means.

After running an strace on Apache I found a poll that took a long time to execute. I have read that the poll command references the file descriptor which you can find the associated command that returned that fd in the first place.

I found that the poll:

9338 17:14:10 poll([{fd=45, events=POLLIN}], 1, 120000) = 1 ([{fd=45, revents=POLLIN}]) <2.310145>

Seems to be related to this:

9338 17:14:10 socket(PF_FILE, SOCK_STREAM, 0) = 45 <0.000058>

Can anyone explain the poll function and/or what to make of this?

Edit: I had the wrong pair of calls.

Last edited by ALB; 04-13-2012 at 08:40 PM.
 
Old 04-13-2012, 11:55 PM   #2
Asido
Member
 
Registered: Jan 2010
Location: Denmark
Distribution: Gentoo, Archlinux, FreeBSD, Slackware
Posts: 84

Rep: Reputation: 24
poll() performs a similar task to select(2): it waits for one of a set of file descriptors to become ready to perform I/O.
POLLIN = There is data to read.

So basically what's happening is it blocks until file descriptor has some data ready to be read.
 
Old 04-15-2012, 03:57 PM   #3
ALB
LQ Newbie
 
Registered: Mar 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
Thank you for the response.

socket(PF_FILE, SOCK_STREAM, 0) - This seems like it is opening a socket to pull a file from the network... do have that mostly right?

I think it has to do with NFS but I am not sure if that can be gleamed from an Apache strace.
 
Old 04-16-2012, 11:13 AM   #4
Asido
Member
 
Registered: Jan 2010
Location: Denmark
Distribution: Gentoo, Archlinux, FreeBSD, Slackware
Posts: 84

Rep: Reputation: 24
Check www.die.net
It has everything you are looking for.
i.e.: http://linux.die.net/man/2/socket
 
Old 04-23-2012, 07:06 PM   #5
ALB
LQ Newbie
 
Registered: Mar 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
Thank you!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora9 now taking long time to boot terry-duell Fedora 7 12-10-2008 10:16 PM
Xorg taking a long time to start Thaidog Linux - General 1 10-16-2007 01:50 AM
Kernel Decompress Taking a long time v2-ncl Linux - Laptop and Netbook 0 11-10-2003 08:47 AM
route command taking a long time tpatwood Linux - Networking 1 07-01-2003 04:22 PM
Seriously this is taking a long time!! Omega Linux - Newbie 13 04-25-2003 05:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration