Skip to content
TheChatArchiveThe Chat Archive
Claudeclaude-sonnet-4-20250514-thinking-32k· AnthropicHugging Face LMArena Human Preference 140K

how to check on rhel server the working connection to an ntp server? ntp server ist…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Geminigemini-2.5-pro’s answer.
  1. User

    how to check on rhel server the working connection to an ntp server? ntp server ist running in port 123 but on udp not tcp right? how to check via nc the connection?

  2. Claude Assistant

    You're correct that NTP runs on UDP port 123, not TCP. Here are several ways to check NTP connectivity on RHEL:

    Using netcat (nc) for UDP connection test:

    # Basic UDP connectivity test
    nc -u -w 3 <ntp-server> 123
    
    # Example
    nc -u -w 3 pool.ntp.org 123
    

    However, this will just test if the port is reachable but won't validate actual NTP communication.

    Better NTP-specific testing methods:

    Using ntpdate (query mode):

    ntpdate -q <ntp-server>
    # Example
    ntpdate -q pool.ntp.org
    

    Using chrony (if chrony is your NTP service):

    # Check configured sources
    chronyc sources -v
    
    # Test specific server
    chronyc sources <ntp-server>
    

    Using ntpq (if ntpd is running):

    # Check peer status
    ntpq -p
    
    # Query specific server
    ntpq -c "rv" <ntp-server>
    

    Using sntp for simple testing:

    sntp -t 5 <ntp-server>
    

    Check which NTP service is running:

    systemctl status chronyd    # For chrony
    systemctl status ntpd       # For ntp daemon
    

    The NTP-specific tools like ntpdate -q or chronyc are more reliable than netcat since they actually perform NTP protocol communication rather than just testing port connectivity.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.