Bug 834058 - [RFE] logconv.pl : use of getopts to parse commandline options
Summary: [RFE] logconv.pl : use of getopts to parse commandline options
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: 389-ds-base
Version: 6.4
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Rich Megginson
QA Contact: Sankar Ramalingam
Depends On:
TreeView+ depends on / blocked
Reported: 2012-06-20 18:03 UTC by Nathan Kinder
Modified: 2013-02-21 08:19 UTC (History)
2 users (show)

Fixed In Version: 389-ds-base-
Doc Type: Enhancement
Doc Text:
Feature: logconv.pl Reason: Improved cli option handling. Result (if any): much easier to add new options
Clone Of:
Last Closed: 2013-02-21 08:19:31 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0503 normal SHIPPED_LIVE Moderate: 389-ds-base security, bug fix, and enhancement update 2013-02-21 08:18:44 UTC

Description Nathan Kinder 2012-06-20 18:03:39 UTC
This bug is created as a clone of upstream ticket:

https://bugzilla.redhat.com/show_bug.cgi?id=803952 (''Fedora'')

Description of problem:

longconv.pl could use Getopts::Long to parse the options provided on the
command line

This will allow us to use extended options if needed, in the future.

Example: we could allow the user to say --verbose in addition to -V

Version-Release number of selected component (if applicable):

rawhide as at Fri, Mar 16, 2012

How reproducible:

Not applicable

Steps to Reproduce:

Not applicable

Actual results:

Not applicable

Expected results:

Not applicable

Additional info:

Getopts::Long is part of the standard Perl distribution thats in Fedora and

Comment 1 RHEL Program Management 2012-07-10 07:10:17 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 2 RHEL Program Management 2012-07-10 23:02:02 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 4 Sankar Ramalingam 2012-11-19 10:45:08 UTC
Marking the bug as Verified since logconv.pl tool in now enhanced with getopts. 

[root@newsankarlapy ~]# logconv.pl --help

 ./logconv.pl [-h] [-d|--rootdn <rootDN>] [-s|--sizeLimit <size limit>] [-v|verison] [-Vi|verbose]
 [-S|--startTime <start time>] [-E|--endTime <end time>] 
 [-efcibaltnxrgjuyp] [ access log ... ... ]

- Commandline Switches:

         -h, --help         help/usage
         -d, --rootDN        <Directory Managers DN>  DEFAULT -> cn=directory manager
         -s, --sizeLimit    <Number of results to return per catagory>  DEFAULT -> 20
         -X, --excludeIP    <IP address to exclude from connection stats>  E.g. Load balancers
         -v, --version      show version of tool
         -S, --startTime    <time to begin analyzing logfile from>
             E.g. "[28/Mar/2002:13:14:22 -0800]"
         -E, --endTime      <time to stop analyzing logfile>
             E.g. "[28/Mar/2002:13:24:62 -0800]"
         -m, --reportFileSecs  <CSV output file - per second stats>
         -M, --reportFileMins  <CSV output file - per minute stats>
         -V, --verbose         <enable verbose output - includes all stats listed below>

Comment 5 Jenny Severance 2013-01-14 15:17:43 UTC
automated tests

----------------- Starting Test logconv_05 -------------------------
Running logconv with --help and --version to check whether getopts implemented
Running logconv.pl with --help to check getopts implemented for the tool
Logconv tool is implemented with getopts for the usage
Successfully completed logconv.pl --help command
TestCase [logconv05] result-> [PASS]
Running logconv.pl with --version to check getopts implemented for the tool
Access Log Analyzer v6.1
Logconv tool is implemented with getopts for the usage
Successfully completed logconv.pl --version command
TestCase [logconv05] result-> [PASS]
RemoveInstance /usr/lib64/dirsrv/slapd-logconv 32029
Instance slapd-logconv removed.
Instance successfully removed by RemoveInstance function
TestCase [cleanup] result-> [PASS]

Comment 6 errata-xmlrpc 2013-02-21 08:19:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.