Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

snoopldap.d 501B

123456789101112131415161718192021222324
  1. #!/usr/sbin/dtrace -s
  2. #pragma D option quiet
  3. BEGIN
  4. {
  5. printf("%-8s %-8s %-16s %-15s %-15s %s\n",
  6. "LATENCY", "OPTYPE", "REMOTE IP", "BIND DN", "REQ DN",
  7. "STATUS");
  8. }
  9. ldapjs*:::server-*-start
  10. {
  11. starts[arg0] = timestamp;
  12. }
  13. ldapjs*:::server-*-done
  14. /starts[arg0]/
  15. {
  16. printf("%6dms %-8s %-16s %-15s %-15s %d\n",
  17. (timestamp - starts[arg0]) / 1000000, strtok(probename + 7, "-"),
  18. copyinstr(arg1), copyinstr(arg2), copyinstr(arg3), arg4);
  19. starts[arg0] = 0;
  20. }