SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Linux
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Linux Discussion related to the SageTV Media Center for Linux. Questions, issues, problems, suggestions, etc. relating to the SageTV Linux should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-24-2006, 08:21 PM
laurenglenn's Avatar
laurenglenn laurenglenn is offline
Sage Expert
 
Join Date: Mar 2003
Location: Levittown, PA
Posts: 601
Send a message via AIM to laurenglenn Send a message via MSN to laurenglenn
Q: How to set the system to automatically reboot every 24 hrs?

I was just wondering if anyone knows a way to tell the system to reboot every 24 hours or at a specific time.

Basically, ReplayTV used to do this to keep everything running smooth and clean. And I'm guessing to free up any memory leak, no matter how small....

Lauren
Reply With Quote
  #2  
Old 02-24-2006, 08:30 PM
dbfresh23's Avatar
dbfresh23 dbfresh23 is offline
Sage Fanatic
 
Join Date: Oct 2004
Location: New York
Posts: 894
cron jobs are your friend

http://www.scrounge.org/linux/cron.html
Reply With Quote
  #3  
Old 02-24-2006, 08:46 PM
dbfresh23's Avatar
dbfresh23 dbfresh23 is offline
Sage Fanatic
 
Join Date: Oct 2004
Location: New York
Posts: 894
This is actually a pretty strange request. One of the huge selling points of linux is that unlike windows, it doesn't need constant reboots.

something like
"crontab 0 0 * * * shutdown -r now"

should do the trick, it'll tell the system to reboot at midnight - it's basically like a scheduled task in windows. Just type that in the command line.
Reply With Quote
  #4  
Old 02-25-2006, 04:40 PM
zoop's Avatar
zoop zoop is offline
Sage Advanced User
 
Join Date: Jan 2006
Location: Elkridge, MD
Posts: 184
there are issues with sage that only a reboot (currently) will fix... specifically check the post regarding "occasional choppieness." until this is fixed, i can certainly see the need for a scheduled reboot.

/jer
Reply With Quote
  #5  
Old 02-25-2006, 05:55 PM
domc domc is offline
Sage Advanced User
 
Join Date: Dec 2005
Posts: 192
How about windows auto reboot?
__________________
Thanks,
Dom
www.domanddonna.com
SageTV 4.1 / JVC Analog TV 27"/ 2.93G speed Computer/ 512mb Ram/ Pvr-150 / 45 Hauppage remote / Verto GeForce FX 5500 128mb svideo out/ Dishnetwork 501 box/VideoRedo Plus/ShowAnalyzer/DVDStyler Free Mpeg to Dvd recorder
Reply With Quote
  #6  
Old 02-25-2006, 06:18 PM
dbfresh23's Avatar
dbfresh23 dbfresh23 is offline
Sage Fanatic
 
Join Date: Oct 2004
Location: New York
Posts: 894
Quote:
Originally Posted by domc
How about windows auto reboot?
For WinXP - Go into scheduled tasks in the control panel and create a task to run the command "SHUTDOWN -r -t 01" (w/o the quotes) at the desired time.
Reply With Quote
  #7  
Old 02-25-2006, 06:59 PM
cbhatt cbhatt is offline
Sage User
 
Join Date: Jan 2006
Location: Mount Laurel, NJ
Posts: 20
time zone

Rebooting is a good idea, but what about setting the time zone? Every time I reboot the clock resets to UTC time, but I'm in Eastern standard time. The clock reads the correct time after about 1 or 2 hours. Anyway to force it to the correct time zone at start up?
__________________
-Chirag
Reply With Quote
  #8  
Old 02-25-2006, 07:26 PM
dbfresh23's Avatar
dbfresh23 dbfresh23 is offline
Sage Fanatic
 
Join Date: Oct 2004
Location: New York
Posts: 894
Quote:
Originally Posted by cbhatt
Rebooting is a good idea, but what about setting the time zone? Every time I reboot the clock resets to UTC time, but I'm in Eastern standard time. The clock reads the correct time after about 1 or 2 hours. Anyway to force it to the correct time zone at start up?
http://gentoo-wiki.com/TIP_Set_Sytem..._to_HC_at_boot
Reply With Quote
  #9  
Old 02-25-2006, 07:55 PM
AboveUnrefined's Avatar
AboveUnrefined AboveUnrefined is offline
Sage Advanced User
 
Join Date: Jan 2006
Location: Lords Valley, PA
Posts: 124
Send a message via AIM to AboveUnrefined Send a message via MSN to AboveUnrefined
I'm wondering if I need to emerge anything to have cron work and also how I'd apply this automatically upon every successful reboot (or does it just add to the cronjob list until I remove it, I guess I'll just try it out and find out -- Thanks for the tip!)...

[EDIT]

Here's what I did and I hope it works!
Code:
emerge crond
cd ~
nano autoreboot (type 0 0 * * * shutdown -r now as dbfresh23 recommended and save file)
crontab autoreboot
After that I added crond to the end of the samba startup script so the monitor is going at reboot.

Last edited by AboveUnrefined; 02-25-2006 at 08:27 PM.
Reply With Quote
  #10  
Old 04-03-2006, 10:04 PM
AboveUnrefined's Avatar
AboveUnrefined AboveUnrefined is offline
Sage Advanced User
 
Join Date: Jan 2006
Location: Lords Valley, PA
Posts: 124
Send a message via AIM to AboveUnrefined Send a message via MSN to AboveUnrefined
I wanted to bump this up and draw more attention to procautostart... I think it would be a lot better to have procautostart running and detecting when sage crashes so it can start right back up whenever it does crash and not wait for a certain amount of time for a reboot... the whole thing is I haven't any time to figure out how to compile it or anything so I'm really hoping somebody can hammer it out at least for themselves!
Reply With Quote
  #11  
Old 04-04-2006, 09:09 AM
Arawak's Avatar
Arawak Arawak is offline
Sage User
 
Join Date: Mar 2006
Location: London Ontario, Canada
Posts: 30
After you emerge cron, you'll want to start the service and have it run automatically on reboot.

emerge dcron

/etc/init.d/dcron start

rc-update add dcron default

Use crontab -e to set your cron jobs. You can get mor einfo on using cron here

Is there actually an issue with Sage crashing on Linux? Doesn't it respawn automatically from init?

Arawak
Reply With Quote
  #12  
Old 04-04-2006, 11:03 AM
AboveUnrefined's Avatar
AboveUnrefined AboveUnrefined is offline
Sage Advanced User
 
Join Date: Jan 2006
Location: Lords Valley, PA
Posts: 124
Send a message via AIM to AboveUnrefined Send a message via MSN to AboveUnrefined
Yeah it'll crash on my system and not respawn... problem with cron is that it doesn't detect when it crashes to rectify the problem immediately, but at least it will at whatever time you set your reboot. I want to get procautostart running and monitoring sage so when it does crash out it will restart in a matter of seconds.
Reply With Quote
  #13  
Old 04-04-2006, 12:52 PM
Arawak's Avatar
Arawak Arawak is offline
Sage User
 
Join Date: Mar 2006
Location: London Ontario, Canada
Posts: 30
Well, I'd be very concerned if it were crashing on my system. One of the big attractions of running something on Linux is long uptimes.

I looked at procautostart and I have to say I don't really get it. The sage process runs from init, and is set to respawn if it exits. This should accomplish the same thing you are trying to do.

There''s also Dan Bernstein's daemontools which are commonly used for keeping services running. This package has an ebuild already and is quite popular so support is pretty easy to come by.

Arawak
Reply With Quote
  #14  
Old 04-06-2006, 11:04 PM
AboveUnrefined's Avatar
AboveUnrefined AboveUnrefined is offline
Sage Advanced User
 
Join Date: Jan 2006
Location: Lords Valley, PA
Posts: 124
Send a message via AIM to AboveUnrefined Send a message via MSN to AboveUnrefined
Yeah, that big attraction kind of irked me when I discovered it was crashing out. It doesn't respawn on exit either, I come home from work and my TV will be a black screen occasionally with the console text being all skewed and streched. Simply typing startx and hitting enter will restart sage fine. I can also log in via ssh and do it... I've also twonkyserver cutting out on me too so I suspect it's a hardware issue on my end (probably memory or chipset related)

-- I'm tired of spending money already so I'll figure out how to get something up from what you recommended Arawak, thanks!
Reply With Quote
  #15  
Old 04-08-2006, 02:16 PM
riversma riversma is offline
Sage User
 
Join Date: Jan 2006
Posts: 13
what version are you running?
Reply With Quote
  #16  
Old 04-09-2006, 07:04 AM
AboveUnrefined's Avatar
AboveUnrefined AboveUnrefined is offline
Sage Advanced User
 
Join Date: Jan 2006
Location: Lords Valley, PA
Posts: 124
Send a message via AIM to AboveUnrefined Send a message via MSN to AboveUnrefined
4.1.6 -- I've updated xvgl.so with what was posted on a previous thread but I've been working 80+ hours a week for the past month so I haven't really had any time to really test anything out... All I know is that I'll come home, turn on the TV and it has super streched out text from a console, logging in VIA ssh produces some feedback that's posted here -- http://forums.sagetv.com/forums/showthread.php?t=17244

Last edited by AboveUnrefined; 04-09-2006 at 07:07 AM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 09:51 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.