Article
Problem
A Forum reader asked the following question:
"I want to know how many LDAP connections are active on a server. Is there a way to get that information? We are running eDirectory 8.7.3 on Windows 2000."
And here's the response from Novell's Aaron Burgemeister ...
Solution
It's simple enough to code. On *nix platforms it would look like this:
netstat -anp | grep "389\|636" | grep ESTABLISHED | wc -l
The above line says to show all connections numerically, looking for 389's or 636's. (Those are secure / insecure ports - that can be trimmed down to one port or another if you like.) In those ports, look for those connections that are established - the command gives you a count of lines (how many there are).
On Windows it's a similar process:
netstat -an
Take that output and look for lines with "389" and "ESTABLISHED" and then count the lines. This is simple enough in Perl, probably a one-line Perl script, if you install it from ActiveState or something similar.
Peter Kuo adds:
"Note that unless you have presistent connections, usually an LDAP 'connection' doesn't really exist - in the sense that the client authenticates, queries for the info, gets the data, and disconnects right away."
Akos Szechy adds:
"On Windows you can also use the same utilities, as there is a port for grep and wc at http://unxutils.sourceforge.net/ ... It works quite nicely."
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.
Related Articles
User Comments
- Be the first to comment! To leave a comment you need to Login or Register
- 4957 reads


0