Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Correct server call?

  1. #11
    Join Date
    Feb 2014
    Beans
    6

    Re: Correct server call?

    Quote Originally Posted by tgalati4 View Post
    This sounds like a homework assignment where the issue is not the time but rather write a script to check that a correct parameter was passed. With rdate, I presume that a time correction is logged somewhere (/var/log/rdate or syslog). So after the command is run, have the script grep the log file and pull out the time server IP address. Then compare that IP address to a grep of the user's history file to compare IP addresses to see if they are the same.

    Again, I'm not sure what the lesson here is, but I would be filling out my drop card.

    Code:
    grep time /var/log/syslog
    This gives me:

    Feb 14 15:42:27 Mint14-Extensa ntpdate[9186]: adjust time server 67.212.118.201 offset -0.050166 sec

    This is what I'm trying to achive, yes. But I already tried to grep /var/log/syslog but there is no log of this command in syslog. Maybe in any other log file?

  2. #12
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    10,044
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Correct server call?

    I gave the incorrect manual page for rdate. This should be correct: http://manpages.ubuntu.com/manpages/...8/rdate.8.html

    According to the manual page:

    FILES
    /var/log/wtmp record of date resets and time changes
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  3. #13
    Join Date
    Feb 2014
    Beans
    6

    Re: Correct server call?

    Quote Originally Posted by tgalati4 View Post
    I gave the incorrect manual page for rdate. This should be correct: http://manpages.ubuntu.com/manpages/...8/rdate.8.html

    According to the manual page:

    I'm almost certain that you can't see which server was used in /var/log/wtmp. You have the change log but no server IP.

  4. #14
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    10,044
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Correct server call?

    You are right. The correct answer for your homework is not to use rdate but use ntp.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •