in reply to Trying to find open connections at apache2
An external solution would be to use lsof, as demonstrated here
Whether this is appropriate depends on the problem you are trying to solve.