Directory Server Tools and One-Liners

Here is a collection of scripts that can be helpful in a Directory Server installation. Click on the links or see the attachments tab to download.

Name Description
AllfromLibLDAP Dtrace
DSBulkLoader general purpose tool for applying bulk loads from an LDIF file to a directory service over the LDAP protocol.
cache.pl View directory server cache metrics
logconv.pl Access log analyzer
logconv.sh drives the log analyzer script.
analyzeDirectoryLogs.pl constructs a file from the previous days' access log entries and runs the log analyzer program on that file.
analyzeDirectoryLogsHourly.pl analyze directory server logs hourly when driven by logConvHourly.sh and cron
logconvHourly.sh drives the log analyzer script to generate a report of Directory Server operations from the access file for the previous hour.
opsPerSecond.pl calculates operations per second from an access log.
access.pl scans an access file and reports on operations per second.
countOps.sh counts the number of operations by type in a collection of directory server access files.
dseeEtimes analyze access log etimes in detail
clients.pl prints a count of TCP connections to/from a port - default 389 - and prints a report detailing the number of connections by state.

Sample output from opsPerSecond.pl :

/Users/terrygardner/tools $ ./opsPerSecond.pl ../access
FILE LINES SECONDS TOTAL SRCH DEL MOD ADD MODRDN BIND UNBIND EXT CONNECTIONS
../access 3018093 45802 1408348 25.6 0.0 0.4 0.0 0.0 2.4 1.2 1.2 1.8

Sample output from access.pl :

dd:mmm:yyyy:hh:mm:ss   new closed binds unbinds srchs  mods  adds
31:Oct:2007:10:57:26     1     0     0     0     6     0     0
31:Oct:2007:10:57:27     1     2     1     0    26     0     0
31:Oct:2007:10:57:28     0     0     0     0    17     0     0
31:Oct:2007:10:57:29     1     1     3     0    32     0     0
31:Oct:2007:10:57:30     1     1     0     0    42     1     0
31:Oct:2007:10:57:31     0     0     0     0    28     0     0
31:Oct:2007:10:57:32     1     1     1     0    22     0     0
31:Oct:2007:10:57:33     1     1     2     0    21     1     0
31:Oct:2007:10:57:34     0     0     0     0    38     1     0
31:Oct:2007:10:57:35     1     1     0     0    24     0     0
31:Oct:2007:10:57:36     1     1     0     0    16     0     0
31:Oct:2007:10:57:37     0     0     5     0    32     4     0
31:Oct:2007:10:57:38     1     0     1     0    27     1     0
31:Oct:2007:10:57:39     1     2     0     0    40     1     0
31:Oct:2007:10:57:40     0     0     0     0    12     1     0
31:Oct:2007:10:57:41     1     1     1     0    46     1     0
31:Oct:2007:10:57:42     1     1     2     0    22     2     0
31:Oct:2007:10:57:43     0     0     2     0    29     0     0
31:Oct:2007:10:57:44     0     0     0     0    26     0     0
dd:mmm:yyyy:hh:mm:ss   new closed binds unbinds srchs  mods  adds
31:Oct:2007:10:57:45     2     2     0     0    19     0     0
31:Oct:2007:10:57:46     0     0     2     0    26     1     0
31:Oct:2007:10:57:47     0     0     1     0    29     0     0
31:Oct:2007:10:57:48     2     2     0     0    28     0     0
31:Oct:2007:10:57:49     0     0     1     0    15     0     0
31:Oct:2007:10:57:50     0     0     2     0    40     3     0
31:Oct:2007:10:57:51     2     2     1     0    26     1     0
31:Oct:2007:10:57:52     0     0     0     0    27     2     0
31:Oct:2007:10:57:53     0     0     1     0    22     0     0
31:Oct:2007:10:57:54     2     2     1     0    22     3     0
31:Oct:2007:10:57:55     0     0     0     0    41     1     0
31:Oct:2007:10:57:56     0     0     3     0    20     1     0
31:Oct:2007:10:57:57     2     2     2     0    23     3     0
31:Oct:2007:10:57:58     1     1     1     0    28     2     0
31:Oct:2007:10:57:59     4     4     5     0    24     4     0
31:Oct:2007:10:58:00     2     2     1     0    32     0     0
31:Oct:2007:10:58:01     0     0     1     0    29     1     0
31:Oct:2007:10:58:02     0     0     0     0    15     0     0
31:Oct:2007:10:58:03     2     2     0     0    17     0     0
31:Oct:2007:10:58:04     0     0     1     0    24     0     0

Sample output from countOps.sh :

/Users/terrygardner/tools $ ./countOps.sh ../access
SRCH:
1171827
ADD:
512
DEL:
1938
MOD:
19189
BIND:
108475
UserEditsCommentsLabels
ff1959 36117
enriqueflores 001
johnno 001
joy.cu 010
pgrfrank 001

Labels

perl perl Delete
ldap ldap Delete
directoryserver directoryserver Delete
scripts scripts Delete
tools tools Delete
dsee dsee Delete
bash bash Delete
shell shell Delete
monitoring monitoring Delete
priming priming Delete
jprime jprime Delete
logconv logconv Delete
cache cache Delete
metrics metrics Delete
etimes etimes Delete
etime etime Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Dec 16, 2008

    joy.cu says:

    logconvHourly.sh seems to want a script called logconv2csv.awk which I can't fin...

    logconvHourly.sh seems to want a script called logconv2csv.awk which I can't find?

    Thanks

    Joy

    1. Feb 25, 2009

      ff1959 says:

      logconv2csv.awk has been attached. Sorry for the inconvenience.

      logconv2csv.awk has been attached. Sorry for the inconvenience.

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact