<p dir="ltr">You can try setting a lower limit, like 5 ports, and using netcat to open 4 connections. Then use strace/ptrace on a curl or wget and see what happens.</p>
<div class="gmail_quote">On Feb 8, 2013 8:45 PM, "Ben Walton" <<a href="mailto:bdwalton-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org">bdwalton-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p dir="ltr">What condition do you need to detect? Are you looking to solve/monitor an application or system problem? I expect the kernel would log something but the source our experimentation are the oracles for this as I've never tried it.</p>


<p dir="ltr">Also, why would you do this? (For my own curiosity...)</p>
<p dir="ltr">Thanks<br>
-Ben</p>
<div class="gmail_quote">On Feb 8, 2013 4:21 PM, "Tyler Aviss" <<a href="mailto:tjaviss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" target="_blank">tjaviss-Re5JQEeQqe8@public.gmane.orgm</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr"><div>My understanding is that the following setting basically sets the range of high "local ports" used for outgoing connections</div><div><br></div><div>Either in sysctl.conf</div>
/proc/sys/net/ipv4/ip_local_port_range = LOW HIGH<div><br></div><div>This can also be set by using sysctl or echoing to proc (but lost on reboot).</div><div><br></div><div><br></div><div><br></div>
<div>My question is, what would be a symptom of exhausting the port pool?</div><div>Say if you have a port range of 10001 15000, and you attempt connection #5001... what happens?</div><div><br></div><div>
Is there something visible in dmesg/kern.log/syslog that indicates an error opening ports? Do you see the port opening/connection attempt time out, or just block?</div><div><br></div><div>I know if you start nipping at the limits of your max filehandles, an kernel error is rather apparent, but I'm not sure what happens for ports.</div>


<div><br></div><div>As most people prefer to leave this at the default, there isn't a lot of information other than how to set the port range</div><div><br></div><div><br><div><br clear="all"><div><br>
</div>-- <br>Tyler Aviss<br>Systems Support<br>LPIC/LPIC-2/DCTS/CLA<br><br>"Computers don't make mistakes. They can, however, execute those provided to them very quickly"
</div></div></div>
</blockquote></div>
</blockquote></div>