Red Hat Bugzilla – Bug 834058
[RFE] logconv.pl : use of getopts to parse commandline options
Last modified: 2013-02-21 03:19:31 EST
This bug is created as a clone of upstream ticket: https://fedorahosted.org/389/ticket/325 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 RHEL }}}
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.
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.
Marking the bug as Verified since logconv.pl tool in now enhanced with getopts. [root@newsankarlapy ~]# logconv.pl --help Usage: ./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>
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 Usage: 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]
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. http://rhn.redhat.com/errata/RHSA-2013-0503.html