Re: 答复: 答复: 答复: [chrony-users] how to get the status of chronyd in namespace

2022-11-24 Thread Miroslav Lichvar
On Thu, Nov 24, 2022 at 08:56:36AM +, chengyechun wrote:
> Another question is whether the first response packet is processed after the 
> message is sent to all servers?

It's processed as soon as it is received. But the next request is
queued after requests to other servers, which can be significantly
longer than the configured polling interval if there are too many
servers.

-- 
Miroslav Lichvar


-- 
To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org 
with "unsubscribe" in the subject.
For help email chrony-users-requ...@chrony.tuxfamily.org 
with "help" in the subject.
Trouble?  Email listmas...@chrony.tuxfamily.org.



答复: 答复: 答复: [chrony-users] how to get the status of chronyd in namespace

2022-11-24 Thread chengyechun


-邮件原件-
发件人: Miroslav Lichvar [mailto:mlich...@redhat.com] 
发送时间: 2022年11月24日 16:41
收件人: chrony-users@chrony.tuxfamily.org
主题: Re: 答复: 答复: [chrony-users] how to get the status of chronyd in namespace

On Thu, Nov 24, 2022 at 08:13:45AM +, chengyechun wrote:
> It takes more than 10 minutes to synchronize data from the client to the 
> server. The client log is as follows:

It takes 10 minutes after starting a chronyd instance configured as a client to 
report synchronized status when queried as a server?

And that client is configured to poll 1000 servers?
Thank you very much for your reply, yes, but this is only a test scenario, and 
there is a high probability that this scenario will not be used.
In that case, yes, that would be expected. There is a minimum interval between 
client requests of 0.2 seconds (for polls >= 2s), so with 1000 servers it would 
be about 0.2*1000 seconds between two requests to the same server, and up to 
about 600 seconds to get 3 samples and make the first update of the clock.
Another question is whether the first response packet is processed after the 
message is sent to all servers?
If you need to specify so many servers for monitoring purposes, it might be 
better to have a separate instance for that, using the noselect option for all 
its sources, or the -x option to not touch the system clock.
Thank you for your advice. I'll pay attention to the actual use.
--
Miroslav Lichvar


-- 
To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org 
with "unsubscribe" in the subject.
For help email chrony-users-requ...@chrony.tuxfamily.org 
with "help" in the subject.
Trouble?  Email listmas...@chrony.tuxfamily.org.




Re: 答复: 答复: [chrony-users] how to get the status of chronyd in namespace

2022-11-24 Thread Miroslav Lichvar
On Thu, Nov 24, 2022 at 08:13:45AM +, chengyechun wrote:
> It takes more than 10 minutes to synchronize data from the client to the 
> server. The client log is as follows:

It takes 10 minutes after starting a chronyd instance configured as a
client to report synchronized status when queried as a server?

And that client is configured to poll 1000 servers?

In that case, yes, that would be expected. There is a minimum interval
between client requests of 0.2 seconds (for polls >= 2s), so with 1000
servers it would be about 0.2*1000 seconds between two requests to the
same server, and up to about 600 seconds to get 3 samples and make the
first update of the clock.

If you need to specify so many servers for monitoring purposes, it
might be better to have a separate instance for that, using the
noselect option for all its sources, or the -x option to not touch the
system clock.

-- 
Miroslav Lichvar


-- 
To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org 
with "unsubscribe" in the subject.
For help email chrony-users-requ...@chrony.tuxfamily.org 
with "help" in the subject.
Trouble?  Email listmas...@chrony.tuxfamily.org.



答复: 答复: [chrony-users] how to get the status of chronyd in namespace

2022-11-24 Thread chengyechun
It takes more than 10 minutes to synchronize data from the client to the 
server. The client log is as follows:

[cid:image001.png@01D9001F.B8BA65F0]

You can see that the client starts at 11:04 and displays Select source 
10.10.46.79 at 11:18.

-邮件原件-
发件人: Miroslav Lichvar [mailto:mlich...@redhat.com]
发送时间: 2022年11月24日 16:09
收件人: chrony-users@chrony.tuxfamily.org
主题: Re: 答复: [chrony-users] how to get the status of chronyd in namespace



On Thu, Nov 24, 2022 at 07:45:47AM +, chengyechun wrote:

> I'm sorry to bother you again. I'm testing this scenario: One client 
> corresponds to 1000 servers, and the servers are isolated using namespaces. I 
> found that it took more than ten minutes for the display to start syncing, is 
> that normal?



I don't understand the question. Is chronyc reporting that the server is not 
synchronized for 10 minutes? Or chronyc takes 10 minutes to print a report?



--

Miroslav Lichvar





--

To unsubscribe email 
chrony-users-requ...@chrony.tuxfamily.org

with "unsubscribe" in the subject.

For help email 
chrony-users-requ...@chrony.tuxfamily.org

with "help" in the subject.

Trouble?  Email 
listmas...@chrony.tuxfamily.org.






Re: 答复: [chrony-users] how to get the status of chronyd in namespace

2022-11-24 Thread Miroslav Lichvar
On Thu, Nov 24, 2022 at 07:45:47AM +, chengyechun wrote:
> I'm sorry to bother you again. I'm testing this scenario: One client 
> corresponds to 1000 servers, and the servers are isolated using namespaces. I 
> found that it took more than ten minutes for the display to start syncing, is 
> that normal?

I don't understand the question. Is chronyc reporting that the server
is not synchronized for 10 minutes? Or chronyc takes 10 minutes to
print a report?

-- 
Miroslav Lichvar


-- 
To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org 
with "unsubscribe" in the subject.
For help email chrony-users-requ...@chrony.tuxfamily.org 
with "help" in the subject.
Trouble?  Email listmas...@chrony.tuxfamily.org.



答复: [chrony-users] how to get the status of chronyd in namespace

2022-11-23 Thread chengyechun
I'm sorry to bother you again. I'm testing this scenario: One client 
corresponds to 1000 servers, and the servers are isolated using namespaces. I 
found that it took more than ten minutes for the display to start syncing, is 
that normal?

-邮件原件-
发件人: chengyechun 
发送时间: 2022年11月23日 16:50
收件人: 'chrony-users@chrony.tuxfamily.org' 
主题: 答复: [chrony-users] how to get the status of chronyd in namespace



-邮件原件-
发件人: Miroslav Lichvar [mailto:mlich...@redhat.com] 
发送时间: 2022年11月23日 16:22
收件人: chrony-users@chrony.tuxfamily.org
主题: Re: [chrony-users] how to get the status of chronyd in namespace

On Wed, Nov 23, 2022 at 03:16:35AM +, chengyechun wrote:
> Hi all
> I am using the chronyd service, but I put the service in the namespace for 
> isolation, and then synchronize other servers. I find that the 
> synchronization status of the chronyd in the namespace cannot be queried 
> through chronyc. What can I do?

Is it a networking namespace? To access the UDP sockets you would need to use 
"ip netns exec $NAMESPACE chronyc".
Yes, I tried this command, but it didn't seem to work; If there are multiple 
namespaces, the client and server are deployed on the same host, as shown in 
the following figure.

[root@localhost ETS]# ps -ef | grep chrony
chrony947343   1  0 16:34 ?00:00:00 /usr/sbin/chronyd -f 
/etc/chrony.conf.tmp1
chrony947370   1  0 16:34 ?00:00:00 /usr/sbin/chronyd -f 
/etc/chrony.conf.tmp2
chrony947397   1  0 16:34 ?00:00:00 /usr/sbin/chronyd -f 
/etc/chrony.conf.tmp3
chrony947428   1  0 16:34 ?00:00:00 /usr/sbin/chronyd -f 
/etc/chrony.conf.tmp4
chrony947429  947428  0 16:34 ?00:00:00 /usr/sbin/chronyd -f 
/etc/chrony.conf.tmp4
root  951981   53788  0 16:41 pts/100:00:00 grep --color=auto chrony
[root@localhost ETS]# ip netns exec net1 chronyc sources -a -v

  .-- Source mode  '^' = server, '=' = peer, '#' = local clock.
 / .- Source state '*' = current best, '+' = combined, '-' = not combined,
| / 'x' = may be in error, '~' = too variable, '?' = unusable.
|| .-  [  ] +/- 
||  Reachability register (octal) -.   |   = adjusted offset,
||  Log2(Polling interval) --.  |  |   = measured offset,
||\ |  |   = estimated error.
|| ||   \
MS Name/IP address Stratum Poll Reach LastRx Last sample   
===

If you can access the Unix socket, that shouldn't be necessary.
How do you use this?
--
Miroslav Lichvar


-- 
To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org 
with "unsubscribe" in the subject.
For help email chrony-users-requ...@chrony.tuxfamily.org 
with "help" in the subject.
Trouble?  Email listmas...@chrony.tuxfamily.org.




RE: [chrony-users] how to get the status of chronyd in namespace

2022-11-23 Thread chengyechun

thank you,it work




程业春 chengyechun
Mobile: +86-13736096892
Email: chengyech...@huawei.com

发件人:Miroslav Lichvar 
收件人:chrony-users 
时 间:2022-11-23 17:47:39
主 题:Re: 答复: [chrony-users] how to get the status of chronyd in namespace

On Wed, Nov 23, 2022 at 08:50:00AM +, chengyechun wrote:
> Yes, I tried this command, but it didn't seem to work; If there are multiple 
> namespaces, the client and server are deployed on the same host, as shown in 
> the following figure.

Does the namespace have the loopback interface configured with
127.0.0.1? Are there any error messages from the chronyd process?

> If you can access the Unix socket, that shouldn't be necessary.
> How do you use this?

You specify a socket in chrony.conf with bindcmdaddress and then
specify it for chronyc with the -h option. One socket per chronyd
instance.

--
Miroslav Lichvar


--
To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-requ...@chrony.tuxfamily.org
with "help" in the subject.
Trouble?  Email listmas...@chrony.tuxfamily.org.




Re: 答复: [chrony-users] how to get the status of chronyd in namespace

2022-11-23 Thread Miroslav Lichvar
On Wed, Nov 23, 2022 at 08:50:00AM +, chengyechun wrote:
> Yes, I tried this command, but it didn't seem to work; If there are multiple 
> namespaces, the client and server are deployed on the same host, as shown in 
> the following figure.

Does the namespace have the loopback interface configured with
127.0.0.1? Are there any error messages from the chronyd process? 

> If you can access the Unix socket, that shouldn't be necessary.
> How do you use this?

You specify a socket in chrony.conf with bindcmdaddress and then
specify it for chronyc with the -h option. One socket per chronyd
instance.

-- 
Miroslav Lichvar


-- 
To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org 
with "unsubscribe" in the subject.
For help email chrony-users-requ...@chrony.tuxfamily.org 
with "help" in the subject.
Trouble?  Email listmas...@chrony.tuxfamily.org.



答复: [chrony-users] how to get the status of chronyd in namespace

2022-11-23 Thread chengyechun


-邮件原件-
发件人: Miroslav Lichvar [mailto:mlich...@redhat.com] 
发送时间: 2022年11月23日 16:22
收件人: chrony-users@chrony.tuxfamily.org
主题: Re: [chrony-users] how to get the status of chronyd in namespace

On Wed, Nov 23, 2022 at 03:16:35AM +, chengyechun wrote:
> Hi all
> I am using the chronyd service, but I put the service in the namespace for 
> isolation, and then synchronize other servers. I find that the 
> synchronization status of the chronyd in the namespace cannot be queried 
> through chronyc. What can I do?

Is it a networking namespace? To access the UDP sockets you would need to use 
"ip netns exec $NAMESPACE chronyc".
Yes, I tried this command, but it didn't seem to work; If there are multiple 
namespaces, the client and server are deployed on the same host, as shown in 
the following figure.

[root@localhost ETS]# ps -ef | grep chrony
chrony947343   1  0 16:34 ?00:00:00 /usr/sbin/chronyd -f 
/etc/chrony.conf.tmp1
chrony947370   1  0 16:34 ?00:00:00 /usr/sbin/chronyd -f 
/etc/chrony.conf.tmp2
chrony947397   1  0 16:34 ?00:00:00 /usr/sbin/chronyd -f 
/etc/chrony.conf.tmp3
chrony947428   1  0 16:34 ?00:00:00 /usr/sbin/chronyd -f 
/etc/chrony.conf.tmp4
chrony947429  947428  0 16:34 ?00:00:00 /usr/sbin/chronyd -f 
/etc/chrony.conf.tmp4
root  951981   53788  0 16:41 pts/100:00:00 grep --color=auto chrony
[root@localhost ETS]# ip netns exec net1 chronyc sources -a -v

  .-- Source mode  '^' = server, '=' = peer, '#' = local clock.
 / .- Source state '*' = current best, '+' = combined, '-' = not combined,
| / 'x' = may be in error, '~' = too variable, '?' = unusable.
|| .-  [  ] +/- 
||  Reachability register (octal) -.   |   = adjusted offset,
||  Log2(Polling interval) --.  |  |   = measured offset,
||\ |  |   = estimated error.
|| ||   \
MS Name/IP address Stratum Poll Reach LastRx Last sample   
===

If you can access the Unix socket, that shouldn't be necessary.
How do you use this?
--
Miroslav Lichvar


-- 
To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org 
with "unsubscribe" in the subject.
For help email chrony-users-requ...@chrony.tuxfamily.org 
with "help" in the subject.
Trouble?  Email listmas...@chrony.tuxfamily.org.




Re: [chrony-users] how to get the status of chronyd in namespace

2022-11-23 Thread Miroslav Lichvar
On Wed, Nov 23, 2022 at 03:16:35AM +, chengyechun wrote:
> Hi all
> I am using the chronyd service, but I put the service in the namespace for 
> isolation, and then synchronize other servers. I find that the 
> synchronization status of the chronyd in the namespace cannot be queried 
> through chronyc. What can I do?

Is it a networking namespace? To access the UDP sockets you would need
to use "ip netns exec $NAMESPACE chronyc".

If you can access the Unix socket, that shouldn't be necessary.

-- 
Miroslav Lichvar


-- 
To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org 
with "unsubscribe" in the subject.
For help email chrony-users-requ...@chrony.tuxfamily.org 
with "help" in the subject.
Trouble?  Email listmas...@chrony.tuxfamily.org.



[chrony-users] how to get the status of chronyd in namespace

2022-11-22 Thread chengyechun
Hi all
I am using the chronyd service, but I put the service in the namespace for 
isolation, and then synchronize other servers. I find that the synchronization 
status of the chronyd in the namespace cannot be queried through chronyc. What 
can I do?