Bug 177309 - ntptrace output errors: only command line option that works is '-n'
ntptrace output errors: only command line option that works is '-n'
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: ntp (Show other bugs)
4.0
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Miroslav Lichvar
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-09 10:14 EST by Sean Smith
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version: RHBA-2007-0189
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-05-01 13:41:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sean Smith 2006-01-09 10:14:56 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051111 Firefox/1.5

Description of problem:
According to the ntptrace man page, the following options to ntptrace are available: -v (verbose), -d (debugging), -n (numerical output of hostnames), -t (timeout), -r (retries).  The problem is that the only command line option that does not result in some sort of error when ntptrace is executed is '-n'.  All other options result in errored output.

Version-Release number of selected component (if applicable):
ntp-4.2.0.a.20040617-4

How reproducible:
Always

Steps to Reproduce:
1. Execute 'ntptrace -n'.  Output is as expected per man page.
2. Execute 'ntptrace -t 2' results errored output.  See below.
3. Execute 'ntptrace -r 2' results errored output.  See below.
4. Execute 'ntptrace -dv' results errored output.  See below.

  

Actual Results:  Step 2 Output:
$ ntptrace -t 2
Unknown option: t
/usr/sbin/ntpq: connect: Invalid argument
/usr/sbin/ntpq -n -c rv 2 failed at /usr/sbin/ntptrace line 34.

Step 3 Output:
$ ntptrace -r 2
Unknown option: r
/usr/sbin/ntpq: connect: Invalid argument
/usr/sbin/ntpq -n -c rv 2 failed at /usr/sbin/ntptrace line 34.

Step 4 Output:
ntptrace -dv
Unknown option: d
Unknown option: v
localhost.localdomain: stratum 3, offset -0.001509, synch distance 0.034222


Expected Results:  Step 2 should have executed the ntptrace command with a timeout of 2 seconds, resulting in the following output:
# ntptrace -t 2
localhost.localdomain: stratum 11, offset 0.000026, synch distance 0.01170

Step 3 should have executed the ntptrace command with two retries, resulting in the following output:
# ntptrace -r 2
localhost.localdomain: stratum 11, offset 0.000079, synch distance 0.01140

Step 4 should have executed the ntptrace command with verbosity and debugging output, resulting in the following output:
# ntptrace -dv
DoTransmit(127.0.0.1)
DoTransmit to 127.0.0.1
ReceiveBuf(127.0.0.1, 127.0.0.1)
server 127.0.0.1, port 123
stratum 11, precision -17, leap 00
refid 127.127.1.0 delay 0.00027, dispersion 0.00000 offset 0.000120
rootdelay 0.00000, rootdispersion 0.01109, synch dist 0.01109
reference time:      c76cfb70.ea26809d  Mon, Jan  9 2006 10:10:40.914
originate timestamp: c76cfb7a.299dece5  Mon, Jan  9 2006 10:10:50.162
transmit timestamp:  c76cfb7a.298b827f  Mon, Jan  9 2006 10:10:50.162

Additional info:

This works on RHEL3 with the following RPM: ntp-4.1.2-4.EL3.1.src.rpm.  Interestingly, if you run file on the ntptrace on both platforms, they are different.

RHEL3 with ntp-4.1.2-4.EL3.1.src.rpm: /usr/sbin/ntptrace: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), stripped

RHEL4 with ntp-4.2.0.a.20040617-4.src.rpm: /usr/sbin/ntptrace: perl script text executable

My guess is that the upstream maintainers decided to go a different direction with ntptrace by executing it as a Perl script which uses ntpq to extract the information it needs instead of maintaining both binaries, ntptrace and ntpq.
Comment 1 Petr Raszyk 2006-01-10 09:00:38 EST
Thanks,

ntptrace in FEDORA CORE 1 is an executable.
It has been a perl-script (calling ntpq) since
FEDORA CORE2.
The flags ntptrace<->ntpq are not compatible.
We should change (probably) man-pages only.

I see this as a 'step back' (ntptrace.c == ca. 800 lines).

Comment 3 Jay Turner 2006-08-21 22:27:13 EDT
QE ack for 4.5.
Comment 4 Daniel Riek 2006-09-05 12:36:43 EDT
The component of this request is planned to be updated in Red Hat enterprise
Linux 4.5.

This enhancement request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux maintenance release.

Product Management has requested further review of this request by Red Hat
Engineering, for potential inclusion in a Red Hat Enterprise Linux Update
release for currently deployed products.

This request is not yet committed for inclusion in an Update release. 
Comment 9 Red Hat Bugzilla 2007-05-01 13:41:03 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0189.html

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