Mailing List Archive

Changing System Time
Since my system's time seems to drift a bit (it's a new Asus MB :( ), I
have had to update it manually lately since I haven't got around to
setting up NTP.

When I change my system time using the date command (my machine runs
fast so it's back in time), while viewing anything (live TV or a
recording), mythfrontend locks up. The display just stops. Telnet into
the box and kill and restart mythfrontend no problem. As far as I am
aware any current recording in the backend process continues along
happily.

Any ideas why this might occur? Something peculiar to my system or is
mythfrontend going to get to stroppy at me for changing the time? I'm
changing it about no more than 2 minutes.

Thanks

CH
Re: Changing System Time [ In reply to ]
On Tuesday 05 August 2003 10:55 pm, Christian Hack wrote:
> Since my system's time seems to drift a bit (it's a new Asus MB :( ), I
> have had to update it manually lately since I haven't got around to
> setting up NTP.
>
> When I change my system time using the date command (my machine runs
> fast so it's back in time), while viewing anything (live TV or a
> recording), mythfrontend locks up. The display just stops. Telnet into
> the box and kill and restart mythfrontend no problem. As far as I am
> aware any current recording in the backend process continues along
> happily.
>
> Any ideas why this might occur? Something peculiar to my system or is
> mythfrontend going to get to stroppy at me for changing the time? I'm
> changing it about no more than 2 minutes.

Many things depend on timing during playback. You can't change it by that
much and keep things going properly.

Isaac
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
RE: Changing System Time [ In reply to ]
> [mailto:mythtv-users-bounces@mythtv.org] On Behalf Of Isaac Richards
> Sent: Wednesday, 6 August 2003 1:03 PM
> To: Discussion about mythtv
> Subject: Re: [mythtv-users] Changing System Time
>
>
> On Tuesday 05 August 2003 10:55 pm, Christian Hack wrote:
> > Since my system's time seems to drift a bit (it's a new
> Asus MB :( ), I
> > have had to update it manually lately since I haven't got around to
> > setting up NTP.
> >
> > When I change my system time using the date command (my machine runs
> > fast so it's back in time), while viewing anything (live TV or a
> > recording), mythfrontend locks up. The display just stops.
> Telnet into
> > the box and kill and restart mythfrontend no problem. As far as I am
> > aware any current recording in the backend process continues along
> > happily.
> >
> > Any ideas why this might occur? Something peculiar to my
> system or is
> > mythfrontend going to get to stroppy at me for changing the
> time? I'm
> > changing it about no more than 2 minutes.
>
> Many things depend on timing during playback. You can't
> change it by that
> much and keep things going properly.
>

OK fair enough, so what sort of time would be the maximum I can change?
I can easily set something up to slide the time slowly OR make sure the
time is constantly updated so it doesn't have to be changed by so much.
If I can work out roughly how fast it runs, I can then adjust for that
to keep it a lot closer.

Currently I only have dialup, so setting up ntp in a cron job isn't all
that feasible.

CH
Re: Changing System Time [ In reply to ]
Christian Hack wrote on Wed August 06, at 13:09 +1000:
> OK fair enough, so what sort of time would be the maximum I can change?
> I can easily set something up to slide the time slowly OR make sure the
> time is constantly updated so it doesn't have to be changed by so much.
> If I can work out roughly how fast it runs, I can then adjust for that
> to keep it a lot closer.
>
> Currently I only have dialup, so setting up ntp in a cron job isn't all
> that feasible.

ntpd runs as a daemon and will sync with your upstream time servers
whenever it can, i.e. whenever you are dialled up.

,dunc
Re: Changing System Time [ In reply to ]
> OK fair enough, so what sort of time would be the maximum I can change?
> I can easily set something up to slide the time slowly OR make sure the
> time is constantly updated so it doesn't have to be changed by so much.
> If I can work out roughly how fast it runs, I can then adjust for that
> to keep it a lot closer.

If you want to get fancy, adjtimex(8) will do the job.

-jim
Re: Re: Changing System Time [ In reply to ]
Unless you are set to automatically dialup, then it will keep dialing
every minute until it gets what
it wants. I had to set my daemon to not check every minute so I wasn't
online all the time.

Duncan Sargeant wrote:

>Christian Hack wrote on Wed August 06, at 13:09 +1000:
>
>
>>OK fair enough, so what sort of time would be the maximum I can change?
>>I can easily set something up to slide the time slowly OR make sure the
>>time is constantly updated so it doesn't have to be changed by so much.
>>If I can work out roughly how fast it runs, I can then adjust for that
>>to keep it a lot closer.
>>
>>Currently I only have dialup, so setting up ntp in a cron job isn't all
>>that feasible.
>>
>>
>
>ntpd runs as a daemon and will sync with your upstream time servers
>whenever it can, i.e. whenever you are dialled up.
>
>,dunc
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>mythtv-users mailing list
>mythtv-users@mythtv.org
>http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
RE: Changing System Time [ In reply to ]
> -----Original Message-----
> From: mythtv-users-bounces@mythtv.org
> [mailto:mythtv-users-bounces@mythtv.org]On Behalf Of Christian Hack
> Sent: Tuesday, August 05, 2003 11:10 PM
> To: 'Discussion about mythtv'
> Subject: RE: [mythtv-users] Changing System Time
>
>
> > [mailto:mythtv-users-bounces@mythtv.org] On Behalf Of Isaac Richards
> > Sent: Wednesday, 6 August 2003 1:03 PM
> > To: Discussion about mythtv
> > Subject: Re: [mythtv-users] Changing System Time
> >
> >
> > On Tuesday 05 August 2003 10:55 pm, Christian Hack wrote:
> > > Since my system's time seems to drift a bit (it's a new
> > Asus MB :( ), I
> > > have had to update it manually lately since I haven't got around to
> > > setting up NTP.
> > >
> > > When I change my system time using the date command (my machine runs
> > > fast so it's back in time), while viewing anything (live TV or a
> > > recording), mythfrontend locks up. The display just stops.
> > Telnet into
> > > the box and kill and restart mythfrontend no problem. As far as I am
> > > aware any current recording in the backend process continues along
> > > happily.
> > >
> > > Any ideas why this might occur? Something peculiar to my
> > system or is
> > > mythfrontend going to get to stroppy at me for changing the
> > time? I'm
> > > changing it about no more than 2 minutes.
> >
> > Many things depend on timing during playback. You can't
> > change it by that
> > much and keep things going properly.
> >
>
> OK fair enough, so what sort of time would be the maximum I can change?
> I can easily set something up to slide the time slowly OR make sure the
> time is constantly updated so it doesn't have to be changed by so much.
> If I can work out roughly how fast it runs, I can then adjust for that
> to keep it a lot closer.
>
> Currently I only have dialup, so setting up ntp in a cron job isn't all
> that feasible.


There are two issues here... one is the underlying protocol, the other is
the Myth software. Sometimes, if you adjust the system time, a
connection-based protocol like TCP/IP could think the connection has timed
out. The other issue is Myth itself, if it keeps track of network
communications with any kind of heartbeat or timer, it can get confused.
And, as Isaac said, playback (and probably recording, too) is highly
time-sensitive.

-JAC
RE: Changing System Time [ In reply to ]
At 10:45 AM 8/6/2003 -0400, Joseph A. Caputo wrote:
[...]
>There are two issues here... one is the underlying protocol, the other is
>the Myth software. Sometimes, if you adjust the system time, a
>connection-based protocol like TCP/IP could think the connection has timed
>out. The other issue is Myth itself, if it keeps track of network
>communications with any kind of heartbeat or timer, it can get confused.
>And, as Isaac said, playback (and probably recording, too) is highly
>time-sensitive.

This *seems* to imply that an automated ntp-based time adjustment could
cause Myth to hang. Am I reading this right? How big a time correction
*can* Myth survive?
Re: Changing System Time [ In reply to ]
I can't help with your problem, but how do you restart the frontend from a
telnet session? When I do this, it just says "Cannot connect to X server"

Thanks,
sjf
At 23:28 8/5/2003, you wrote:
>From: "Christian Hack" <christianh@pdd.edmi.com.au>
>Precedence: list
>Subject: [mythtv-users] Changing System Time
>Date: Wed, 6 Aug 2003 12:55:37 +1000
>To: <mythtv-users@mythtv.org>
>Reply-To: christianh@pdd.edmi.com.au,
> Discussion about mythtv <mythtv-users@mythtv.org>
>Message-ID: <005101c35bc6$368df0f0$1c01010a@christianh>
>Content-Type: text/plain;
> charset="us-ascii"
>MIME-Version: 1.0
>Message: 14
>
>Since my system's time seems to drift a bit (it's a new Asus MB :( ), I
>have had to update it manually lately since I haven't got around to
>setting up NTP.
>
>When I change my system time using the date command (my machine runs
>fast so it's back in time), while viewing anything (live TV or a
>recording), mythfrontend locks up. The display just stops. Telnet into
>the box and kill and restart mythfrontend no problem. As far as I am
>aware any current recording in the backend process continues along
>happily.
>
>Any ideas why this might occur? Something peculiar to my system or is
>mythfrontend going to get to stroppy at me for changing the time? I'm
>changing it about no more than 2 minutes.
>
>Thanks
>
>CH



***************************************************************
Steven J. Finnegan, President
Controlsoft Corporation
Phone: (760) 747-5632
WebSite: www.controlsoftcorp.com
E-mail: sjf@controlsoftcorp.com

***************************************************************
Re: Changing System Time [ In reply to ]
On Wednesday 06 August 2003 12:20 pm, Ray Olszewski wrote:
> At 10:45 AM 8/6/2003 -0400, Joseph A. Caputo wrote:
> [...]
>
> >There are two issues here... one is the underlying protocol, the other is
> >the Myth software. Sometimes, if you adjust the system time, a
> >connection-based protocol like TCP/IP could think the connection has timed
> >out. The other issue is Myth itself, if it keeps track of network
> >communications with any kind of heartbeat or timer, it can get confused.
> >And, as Isaac said, playback (and probably recording, too) is highly
> >time-sensitive.
>
> This *seems* to imply that an automated ntp-based time adjustment could
> cause Myth to hang. Am I reading this right? How big a time correction
> *can* Myth survive?

15 seconds or so while it's playing back a remote file/live tv. It's really a
complete non-issue if your hardware a) works, or b) you're semi-intelligent
about when you schedule your ntp updates. Could be pretty easily fixed, but
I'm not interested in spending my time on it.

Isaac
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
RE: Changing System Time [ In reply to ]
> -----Original Message-----
> From: mythtv-users-bounces@mythtv.org
> [mailto:mythtv-users-bounces@mythtv.org]On Behalf Of Ray Olszewski
> Sent: Wednesday, August 06, 2003 12:20 PM
> To: mythtv-users@mythtv.org
> Subject: RE: [mythtv-users] Changing System Time
>
>
> At 10:45 AM 8/6/2003 -0400, Joseph A. Caputo wrote:
> [...]
> >There are two issues here... one is the underlying protocol, the other is
> >the Myth software. Sometimes, if you adjust the system time, a
> >connection-based protocol like TCP/IP could think the connection
> has timed
> >out. The other issue is Myth itself, if it keeps track of network
> >communications with any kind of heartbeat or timer, it can get confused.
> >And, as Isaac said, playback (and probably recording, too) is highly
> >time-sensitive.
>
> This *seems* to imply that an automated ntp-based time adjustment could
> cause Myth to hang. Am I reading this right? How big a time correction
> *can* Myth survive?

If NTP runs frequently enough, the adjustment should be small enough not to
perturb anything. If you run it infrequently *and* your system clock has
alot of drift, then I imagine the effect would be the same as a manual
adjustment -- if a manual adjustment of a certain amount of time causes
problems, so will NTP.

-JAC
Re: Changing System Time [ In reply to ]
On Wed, Aug 06, 2003 at 12:27:30PM -0400, Joseph A. Caputo wrote:
> If NTP runs frequently enough, the adjustment should be small enough not to
> perturb anything. If you run it infrequently *and* your system clock has
> alot of drift, then I imagine the effect would be the same as a manual
> adjustment -- if a manual adjustment of a certain amount of time causes
> problems, so will NTP.

Remember, a major (in my opinion, the most significant) point of NTP is its
ability to condition your system clock to keep it accurate on its own.
Theoretically, if you were to let ntp keep you online "all the time" for a
few days, it will have zeroed in on the right correction by then. The ntp
daemon would then no longer have to connect more than once per day or so.

For example, on my system, except for reboots, ntp only "runs" about every
other day.

My general advice to ntp users: let ntp do what it wants, even if it looks
like you stay online "all the time." It will quickly get your clock
accurate enough to stop doing that.

Russ
Re: Re: Changing System Time [ In reply to ]
You need to set the display variable to localhost (try "export DISPLAY=localhost:0") but I would start it from with in a "screen" session from the telnet session, that way you wouldn't have to log out and shut down the frontend. (Unless you put it to background.)

-Francis
On Wednesday, August 06, 2003, at 12:22PM, Steven J. Finnegan <sjf@controlsoftcorp.com> wrote:

>I can't help with your problem, but how do you restart the frontend from a
>telnet session? When I do this, it just says "Cannot connect to X server"
>
>Thanks,
>sjf
>At 23:28 8/5/2003, you wrote:
>>From: "Christian Hack" <christianh@pdd.edmi.com.au>
>>Precedence: list
>>Subject: [mythtv-users] Changing System Time
>>Date: Wed, 6 Aug 2003 12:55:37 +1000
>>To: <mythtv-users@mythtv.org>
>>Reply-To: christianh@pdd.edmi.com.au,
>> Discussion about mythtv <mythtv-users@mythtv.org>
>>Message-ID: <005101c35bc6$368df0f0$1c01010a@christianh>
>>Content-Type: text/plain;
>> charset="us-ascii"
>>MIME-Version: 1.0
>>Message: 14
>>
>>Since my system's time seems to drift a bit (it's a new Asus MB :( ), I
>>have had to update it manually lately since I haven't got around to
>>setting up NTP.
>>
>>When I change my system time using the date command (my machine runs
>>fast so it's back in time), while viewing anything (live TV or a
>>recording), mythfrontend locks up. The display just stops. Telnet into
>>the box and kill and restart mythfrontend no problem. As far as I am
>>aware any current recording in the backend process continues along
>>happily.
>>
>>Any ideas why this might occur? Something peculiar to my system or is
>>mythfrontend going to get to stroppy at me for changing the time? I'm
>>changing it about no more than 2 minutes.
>>
>>Thanks
>>
>>CH
>
>
>
>***************************************************************
>Steven J. Finnegan, President
>Controlsoft Corporation
>Phone: (760) 747-5632
>WebSite: www.controlsoftcorp.com
>E-mail: sjf@controlsoftcorp.com
>
>***************************************************************
>
>
>
>
>_______________________________________________
>mythtv-users mailing list
>mythtv-users@mythtv.org
>http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>



-Francis Gulotta
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: Changing System Time [ In reply to ]
ntpd knows what it is doing. You should just bite the bullet and
starting reading the copious documentation. Even on a dial-up.

It's boring but worth knowing anyway... good luck!


On Tue, 2003-08-05 at 21:55, Christian Hack wrote:
> Since my system's time seems to drift a bit (it's a new Asus MB :( ), I
> have had to update it manually lately since I haven't got around to
> setting up NTP.
>
> When I change my system time using the date command (my machine runs
> fast so it's back in time), while viewing anything (live TV or a
> recording), mythfrontend locks up. The display just stops. Telnet into
> the box and kill and restart mythfrontend no problem. As far as I am
> aware any current recording in the backend process continues along
> happily.
>
> Any ideas why this might occur? Something peculiar to my system or is
> mythfrontend going to get to stroppy at me for changing the time? I'm
> changing it about no more than 2 minutes.
>
> Thanks
>
> CH
>
>
> ______________________________________________________________________
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
RE: Re: Changing System Time [ In reply to ]
Well I don't actually do exactly like you think. I have my wmaker
autologin (so Myth runs automatically on a powerup) and it autoruns the
frontend, so a quick fix for restarting mythfrontend is to go "init
3;sleep 10;init 5". I don't know whether the sleep 10 is necessary. It
doesn't happen often, so I haven't gotten around to doing much about it.
I do plan on running a daemon of some sort monitoring a small push
button or two on the parallel port, so I can do a system or X restart in
the case of a crash without having to fire up another PC and telnet in.

The "export DISPLAY=..." method is probably the best way to do it - but
my way works and if it ain't broke....

Christian

> -----Original Message-----
> From: mythtv-users-bounces@mythtv.org
> [mailto:mythtv-users-bounces@mythtv.org] On Behalf Of Francis Gulotta
> Sent: Thursday, 7 August 2003 3:36 AM
> To: Discussion about mythtv
> Subject: Re: [mythtv-users] Re: Changing System Time
>
>
> You need to set the display variable to localhost (try
> "export DISPLAY=localhost:0") but I would start it from with
> in a "screen" session from the telnet session, that way you
> wouldn't have to log out and shut down the frontend. (Unless
> you put it to background.)
>
> -Francis
> On Wednesday, August 06, 2003, at 12:22PM, Steven J. Finnegan
> <sjf@controlsoftcorp.com> wrote:
>
> >I can't help with your problem, but how do you restart the
> frontend from a
> >telnet session? When I do this, it just says "Cannot connect
> to X server"
> >
> >Thanks,
> >sjf
> >At 23:28 8/5/2003, you wrote:
> >>From: "Christian Hack" <christianh@pdd.edmi.com.au>
> >>Precedence: list
> >>Subject: [mythtv-users] Changing System Time
> >>Date: Wed, 6 Aug 2003 12:55:37 +1000
> >>To: <mythtv-users@mythtv.org>
> >>Reply-To: christianh@pdd.edmi.com.au,
> >> Discussion about mythtv <mythtv-users@mythtv.org>
> >>Message-ID: <005101c35bc6$368df0f0$1c01010a@christianh>
> >>Content-Type: text/plain;
> >> charset="us-ascii"
> >>MIME-Version: 1.0
> >>Message: 14
> >>
> >>Since my system's time seems to drift a bit (it's a new
> Asus MB :( ), I
> >>have had to update it manually lately since I haven't got around to
> >>setting up NTP.
> >>
> >>When I change my system time using the date command (my machine runs
> >>fast so it's back in time), while viewing anything (live TV or a
> >>recording), mythfrontend locks up. The display just stops.
> Telnet into
> >>the box and kill and restart mythfrontend no problem. As far as I am
> >>aware any current recording in the backend process continues along
> >>happily.
> >>
> >>Any ideas why this might occur? Something peculiar to my
> system or is
> >>mythfrontend going to get to stroppy at me for changing the
> time? I'm
> >>changing it about no more than 2 minutes.
> >>
> >>Thanks
> >>
> >>CH
> >
> >
> >
> >***************************************************************
> >Steven J. Finnegan, President
> >Controlsoft Corporation
> >Phone: (760) 747-5632
> >WebSite: www.controlsoftcorp.com
> >E-mail: sjf@controlsoftcorp.com
> >
> >***************************************************************
> >
> >
> >
> >
> >_______________________________________________
> >mythtv-users mailing list
> >mythtv-users@mythtv.org
> >http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> >
> >
>
>
>
> -Francis Gulotta
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>