var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
shutdown -r now OR service httpd restart? Difference?
Hey guys what's the difference between this 3 command?
shutdown -r now
service httpd restart
Under which situation should I use any of these?
If I simple want to (1)clear apache processes and load which should I use and (2)clear caches, session, cookies etc which should I use?
I'm not 100% sure but my understanding is...
shutdown -r now = Forceful reboot (fastest)
/usr/bin/reboot = Graceful reboot (safest)
service httpd restart = Stops and starts the HTTPD service (ie. Apache) but no other services (this is not considered a server reboot and you can restart any service like this).
Rarely would you want to shutdown -r or reboot your server, service ... restart is the fastest and most effective way to clear up an issue with a specific service.
- Joe @ Secure Dragon LLC.
+ OpenVZ Powered by Wyvern | KVM | cPanel Hosting | Backup VPSs | LowEndBoxes | DDOS Protection
+ Florida | Colorado | Illinois | California | Oregon | Georgia | New Jersey | Arizona | Texas
shutdown is a more secure way of rebooting where it terminates all processes and informs all logged in users about the halt.
Unless the system is in runlevel 0 or 6 , the 'reboot' command invokes 'shutdown' itself.
Service httpd restart is not related to the other two as it just restarts apache. Other services can be restarted in the same way too.
As Jweb2 mentioned, service restart is the most effective way to clear up an issue with a particular service.
So, in order to "clear apache processes and load" , you can just restart httpd.
A reboot is only used as a last resort in any case.
You are welcome!
By aabowath in forum Computers and Peripherals
Last Post: 02-15-2007, 08:44 PM
By mouseattack in forum Hosting Security and Technology
Last Post: 07-21-2006, 07:02 PM
By Floid in forum Dedicated Server
Last Post: 03-09-2004, 08:50 PM
By JasonBD in forum Hosting Security and Technology
Last Post: 12-15-2002, 03:27 PM
By wormie in forum Hosting Security and Technology
Last Post: 11-05-2002, 02:36 AM