logconv.py.1 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. .TH LOGCONV.PY 1 "January 22, 2025"
  2. .SH NAME
  3. logconv.py \- Analyzes Directory Server access log files
  4. .SH SYNOPSIS
  5. .B logconv.py
  6. [\fI\-h\fR] [\fI\-v\fR] [\fI\-V\fR] [\fI\-s SIZE_LIMIT\fR] [\fI\-d ROOT_DN\fR] [\fI\-B BIND_DN\fR]
  7. [\fI\-X EXCLUDE_IP\fR] [\fI\-S START_TIME\fR] [\fI\-E END_TIME\fR]
  8. [\fI\-m SEC_STATS_FILENAME\fR] [\fI\-M MIN_STATS_FILENAME\fR] [\fI access log(s)\fR]
  9. .PP
  10. .SH DESCRIPTION
  11. Analyzes Directory Server access log files for specific information defined on the command
  12. line.
  13. .SH OPTIONS
  14. .TP
  15. .B \fB\-h, \-\-help\fR
  16. help/usage.
  17. .TP
  18. .B \fB\-v, \-\-version\fR
  19. Display log analyzer version.
  20. .TP
  21. .B \fB\-V, \-\-verbose\fR
  22. Enable verbose mode for detailed statistic processing.
  23. .TP
  24. .B \fB\-s, \-\-sizeLimit\fR SIZE_LIMIT
  25. Number of results to return per category.
  26. .br
  27. DEFAULT: 20
  28. .TP
  29. .B \fB\-d, \-\-rootDN\fR ROOT_DN
  30. Directory Managers DN.
  31. .br
  32. DEFAULT: "cn=Directory Manager"
  33. .TP
  34. .B \fB\-B, \-\-bind\fR BIND_DN
  35. Generates an activity report based specified bind DN.
  36. .br
  37. Options: <ALL | ANONYMOUS | "Actual bind DN">
  38. .TP
  39. .B \fB\-X, \-\-excludeIP\fR EXCLUDE_IP
  40. IP address to exclude from analysis, could be used to exclude load balancers.
  41. .br
  42. To specify multiple IP addresses you could use: -X 192.168.1.1 -X 10.1.2.1
  43. .TP
  44. .B \fB\-S, \-\-startTime\fR START_TIME
  45. Time to begin analysing logfile from.
  46. .br
  47. Copy and paste a timestamp from the access logs:
  48. .br
  49. "[04/Jun/2024:10:31:20.014629085 +0200]"
  50. .br
  51. or
  52. .br
  53. Use common log format:
  54. .br
  55. "[04/Jun/2024:10:31:20 +0200]"'
  56. .TP
  57. .B \fB\-E, \-\-endTime\fR END_TIME
  58. Time to stop analysing logfile.
  59. .br
  60. Copy and paste a timestamp from the access logs:
  61. .br
  62. "[04/Jun/2024:11:30:05.435779416 +0200]"
  63. .br
  64. or
  65. .br
  66. Use common log format:
  67. .br
  68. "[04/Jun/2024:11:30:05 +0200]"
  69. .TP
  70. .B \fB\-m, \-\-reportFileSecs\fR SEC_STATS_FILENAME
  71. Capture operation stats at second intervals and write to csv file.
  72. .TP
  73. .B \fB\-M, \-\-reportFileMins\fR MIN_STATS_FILENAME
  74. Capture operation stats at minute intervals and write to csv file.
  75. .TP
  76. .B \fB\-j, \-\-recommends\fR
  77. Provide some preformance recommendations post analysis.
  78. .SH USAGE
  79. Examples:
  80. .IP
  81. Analyze logs in verbose mode
  82. .br
  83. logconv.py \fB\-V\fR /var/log/dirsrv/slapd-host/access*
  84. .IP
  85. Limit results to 10 entries per category
  86. .br
  87. logconv.py --sizeLimit 10 /var/log/dirsrv/slapd-host/access*
  88. .IP
  89. Specify a custom root DN
  90. .br
  91. logconv.py \fB\--rootDN\fR "cn=custom manager" /var/log/dirsrv/slapd-host/access*
  92. .IP
  93. Generate a report for anonymous binds
  94. .br
  95. logconv.py \fB\-B\fR ANONYMOUS /var/log/dirsrv/slapd-host/access*
  96. .IP
  97. Exclude specific IP address(s) from log analysis
  98. .br
  99. logconv.py \fB\-X\fR 192.168.1.1 \fB\--exclude_ip\fR 11.22.33.44 /var/log/dirsrv/slapd-host/access*
  100. .IP
  101. Analyze logs within a specific time range
  102. .br
  103. logconv.py \fB-S\fR "[04/Jun/2024:10:31:20.014629085 +0200]" \fB--endTime\fR "[04/Jun/2024:11:30:05 +0200]" /var/log/dirsrv/slapd-host/access*
  104. .IP
  105. Generate performance stats at second intervals
  106. .br
  107. logconv.py \fB-m\fR log-second-stats.csv /var/log/dirsrv/slapd-host/access*
  108. .IP
  109. Generate performance stats at minute intervals
  110. .br
  111. logconv.py \fB-M\fR log-minute-stats.csv /var/log/dirsrv/slapd-host/access*
  112. .IP
  113. Display recommendations post log analysis
  114. .br
  115. logconv.py \fB-j\fR /var/log/dirsrv/slapd-host/access*
  116. .SH AUTHOR
  117. logconv.py was written by the 389 Project.
  118. .SH "REPORTING BUGS"
  119. Report bugs to https://github.com/389ds/389-ds-base/issues/new
  120. .SH COPYRIGHT
  121. Copyright \(co 2001 Sun Microsystems, Inc. Used by permission.
  122. .br
  123. Copyright \(co 2025 Red Hat, Inc.
  124. .br
  125. This manual page was written by Michele Baldessari <[email protected]>,
  126. for the Debian project (but may be used by others).
  127. .br
  128. This is free software. You may redistribute copies of it under the terms of
  129. the Directory Server license found in the LICENSE file of this
  130. software distribution. This license is essentially the GNU General Public
  131. License version 2 with an exception for plug-in distribution.