LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 12-08-2003, 02:55 PM   #1
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Ubuntu
Posts: 457

Rep: Reputation: 30
Automatic Reboot


Hi,

I am trying to schedule my Linux server to automatically reboot at a specific time of day. I'm trying to find where the command resides that tells the machine to reboot. I'm just going to shove this command into CRON and let it run at specific times. However, as I just said, I don't know where to find the command. Does someone know where it is? Thank you.
 
Old 12-08-2003, 03:01 PM   #2
Tino27
Member
 
Registered: Aug 2003
Location: Akron, OH
Distribution: SuSE 8.2, Slackware current, OpenBSD 3.5-3.8, Fedora Core 2
Posts: 400

Rep: Reputation: 30
Issuing "init 6" as the root user forces a reboot of the machine.
 
Old 12-08-2003, 03:07 PM   #3
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Ubuntu
Posts: 457

Original Poster
Rep: Reputation: 30
Thanks Tino,

That worked. So, now if I want to schedule this, I can just feed that command into CRON, would you concur?
 
Old 12-08-2003, 03:08 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,623
Blog Entries: 10

Rep: Reputation: 773Reputation: 773Reputation: 773Reputation: 773Reputation: 773Reputation: 773Reputation: 773
Alternatives:

reboot

shutdown -r -t 1 now



Cheers,
Tink
 
Old 12-08-2003, 03:25 PM   #5
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Ubuntu
Posts: 457

Original Poster
Rep: Reputation: 30
Hi guys,

Well, something very interesting just happened. I use GAIM instant messenger and once I issued the init 6 command, gaim won't run anymore. Weird, huh?
 
Old 12-08-2003, 03:25 PM   #6
Tino27
Member
 
Registered: Aug 2003
Location: Akron, OH
Distribution: SuSE 8.2, Slackware current, OpenBSD 3.5-3.8, Fedora Core 2
Posts: 400

Rep: Reputation: 30
Not tried it, but I would assume so. You can also try the alternatives that Tinkster suggested if the "init" command doesn't work.
 
Old 12-08-2003, 03:26 PM   #7
Tino27
Member
 
Registered: Aug 2003
Location: Akron, OH
Distribution: SuSE 8.2, Slackware current, OpenBSD 3.5-3.8, Fedora Core 2
Posts: 400

Rep: Reputation: 30
Meaning Gaim won't load or Gaim will load but not connect?

Last edited by Tino27; 12-08-2003 at 03:29 PM.
 
Old 12-08-2003, 03:30 PM   #8
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Ubuntu
Posts: 457

Original Poster
Rep: Reputation: 30
neither.

I even uninstalled Gaim and reinstalled it and the same problem persists.
 
Old 12-08-2003, 03:44 PM   #9
Tino27
Member
 
Registered: Aug 2003
Location: Akron, OH
Distribution: SuSE 8.2, Slackware current, OpenBSD 3.5-3.8, Fedora Core 2
Posts: 400

Rep: Reputation: 30
My guess would be that Gaim didn't shut down properly when you forced a reboot. It could be a latent setting inside your .gaim or .gaimrc directory (which should be inside your home directory).

Try starting gaim from the CLI. It may give you some additional error information when it fails to load properly.

Last edited by Tino27; 12-08-2003 at 03:46 PM.
 
Old 12-08-2003, 04:38 PM   #10
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Ubuntu
Posts: 457

Original Poster
Rep: Reputation: 30
Well, I got it now, but my brain has stopped functioning. I'm using KDE, where the heck do I look to see running processes? I think I'll write a short bash script to kill gaim before rebooting and I can't seem to remember where to look to see all of the running processes.
 
Old 12-08-2003, 08:01 PM   #11
Tino27
Member
 
Registered: Aug 2003
Location: Akron, OH
Distribution: SuSE 8.2, Slackware current, OpenBSD 3.5-3.8, Fedora Core 2
Posts: 400

Rep: Reputation: 30
In KDE you would use KDE System Guard. You could also run "top" from the CLI.
 
Old 12-10-2003, 04:18 PM   #12
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Ubuntu
Posts: 457

Original Poster
Rep: Reputation: 30
Hey Tink,

The reboot command is by far the easiest way to do it. Now, to shove this into cron to run, I am stuck again. (You're going to be mad now, I'm sure ) If I want this to run everyday at say 5 PM, can I just dump the command into crontab as it is? ie, where the command line has to be entered, just putting "reboot" there will not do it. So, how would the command have to be formatted there? Would I need to full path to the command listed there?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
No keyboard/mouse after reboot. Requires second reboot to work. rottie Linux - Hardware 6 01-16-2006 05:04 AM
Automatic reboot on kernel panic atlesn Linux - General 2 11-30-2004 10:04 AM
Automatic reboot with new kernel erik_wout_ew2 Linux - General 1 04-18-2004 02:12 PM
2.4.21 kernel causes automatic reboot pilot1 Linux - General 5 07-19-2003 02:44 PM
Automatic Nightly reboot locke Linux - General 1 02-10-2002 02:06 PM


All times are GMT -5. The time now is 03:11 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration