Results 1 to 3 of 3
I believe that named pipes have a maximum size - as I recall the max size increased via some recent kernel release.
Anyway - my application is I have a ...
- 08-14-2011 #1Just Joined!
- Join Date
- Aug 2011
- Posts
- 2
determining how full a named pipe is
I believe that named pipes have a maximum size - as I recall the max size increased via some recent kernel release.
Anyway - my application is I have a task that connects with a remote server and receives lines of text... I process the text and send it on to another task on my server that parses the text and makes some database entries.
I would like to monitor the 'fullness' of the named pipe because if it starts to get to the point of being full I'd like to know - I may be able to throttle the data rate from the upstream server or I may decide to use more than one pipe but without knowing if there is a problem.....
So how do I monitor the named pipe? Much of my work uses php 5.3 but a native linux solution or something in c++ would be ok. I'm using Ubuntu 11 server
- 08-15-2011 #2Just Joined!
- Join Date
- Nov 2009
- Posts
- 53
Hello Roy,
Look up the select() man entry.
This will enable you to determine if the pipe is available to write to.
Set up the pipe as non-blocking. You can then test the result of any "write" you attempt. If you get the error "EWOULDBLOCK", then the pipe is unable to handle the current write.
- 08-16-2011 #3Just Joined!
- Join Date
- Aug 2011
- Posts
- 2
Thanks - I'll give that a try.


Reply With Quote