Bug 834058

Summary: [RFE] logconv.pl : use of getopts to parse commandline options
Product: Red Hat Enterprise Linux 6 Reporter: Nathan Kinder <nkinder>
Component: 389-ds-baseAssignee: Rich Megginson <rmeggins>
Status: CLOSED ERRATA QA Contact: Sankar Ramalingam <sramling>
Severity: unspecified Docs Contact:
Priority: high    
Version: 6.4CC: jgalipea, mreynolds
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.2.11.12-1.el6 Doc Type: Enhancement
Doc Text:
Feature: logconv.pl Reason: Improved cli option handling. Result (if any): much easier to add new options
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 08:19:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nathan Kinder 2012-06-20 18:03:39 UTC
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
}}}

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
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>

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
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]

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.

http://rhn.redhat.com/errata/RHSA-2013-0503.html