emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#12023: closed (bug of hostid cmd ?)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#12023: closed (bug of hostid cmd ?)
Date: Sun, 22 Jul 2012 12:12:02 +0000

Your message dated Sun, 22 Jul 2012 13:04:47 +0100
with message-id <address@hidden>
and subject line Re: bug#12023: bug of hostid cmd ?
has caused the debbugs.gnu.org bug report #12023,
regarding bug of hostid cmd ?
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
12023: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12023
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: bug of hostid cmd ? Date: Sun, 22 Jul 2012 11:44:48 +0800
HI, guy,

Can you tell me how the "hostid" command work? or how can I control my "hostid"?

Why my output from "hostid " switch around "0a799228", "0a799a28", "0a799328" randomly?

Here are lists of my "hostid" information, if any other information needed, please just mail me directly.

Hope to get you reply soon, thanks.

address@hidden ~]$ hostid
0a799228
address@hidden ~]$ hostid
0a799a28
address@hidden ~]$ hostid
0a799328
address@hidden ~]$ rpm -q coreutils
coreutils-8.4-19.el6.i686
address@hidden ~]$ rpm -q centos-release
centos-release-6-3.el6.centos.9.i686
address@hidden ~]$ which hostid
/usr/bin/hostid
address@hidden ~]$ ldd /usr/bin/hostid
    linux-gate.so.1 =>  (0x00dc0000)
    libc.so.6 => /lib/libc.so.6 (0x00902000)
    /lib/ld-linux.so.2 (0x008dc000)
address@hidden ~]$



--- End Message ---
--- Begin Message --- Subject: Re: bug#12023: bug of hostid cmd ? Date: Sun, 22 Jul 2012 13:04:47 +0100 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0
On 07/22/2012 04:44 AM, ? wrote:
> HI, guy,
> 
> Can you tell me how the "hostid" command work? or how can I control my 
> "hostid"?
> 
> Why my output from "hostid " switch around "0a799228", "0a799a28", "0a799328" 
> randomly?
> 
> Here are lists of my "hostid" information, if any other information needed, 
> please just mail me directly.
> 
> Hope to get you reply soon, thanks.
> 
> address@hidden ~]$ hostid
> 0a799228
> address@hidden ~]$ hostid
> 0a799a28
> address@hidden ~]$ hostid
> 0a799328
> address@hidden ~]$ rpm -q coreutils
> coreutils-8.4-19.el6.i686
> address@hidden ~]$ rpm -q centos-release
> centos-release-6-3.el6.centos.9.i686
> address@hidden ~]$ which hostid
> /usr/bin/hostid
> address@hidden ~]$ ldd /usr/bin/hostid 
>     linux-gate.so.1 =>  (0x00dc0000)
>     libc.so.6 => /lib/libc.so.6 (0x00902000)
>     /lib/ld-linux.so.2 (0x008dc000)
> address@hidden ~]$

hostid(1) is a thin wrapper around gethostid(3).
>From that man page we have:

In  the  glibc implementation, if gethostid() cannot open the file con?\
taining the host ID [/etc/hostid], then it obtains the hostname using 
gethostname(2),
passes  that  hostname  to  gethostbyname_r(3)  in  order to obtain the
host's IPv4 address, and returns a value obtained by bit-twiddling  the
IPv4 address.  (This value may not be unique.)

So I installed the following to reference that man page.

thanks,
P??draig.

commit f93d5985a2bc468f9f92f3bb8dedb0d3bf0807d8
Author: P??draig Brady <address@hidden>
Date:   Sun Jul 22 12:59:49 2012 +0100

    doc: mention gethostid(3) in hostid(1)

    * man/hostid.x: Add gethostid(3) to SEE ALSO section.
    Addresses http://bugs.gnu.org/12023

diff --git a/man/hostid.x b/man/hostid.x
index 1bba0a6..767a3e2 100644
--- a/man/hostid.x
+++ b/man/hostid.x
@@ -2,3 +2,5 @@
 hostid \- print the numeric identifier for the current host
 [DESCRIPTION]
 .\" Add any additional description here
+[SEE ALSO]
+gethostid(3)



--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]