首页 技术 正文
技术 2022年11月16日
0 收藏 586 点赞 4,835 浏览 2129 个字

google看看:

先搜英文的资料

http://askubuntu.com/questions/441969/what-is-the-difference-between-reboot-and-shutdown-r

(ubuntu论坛)

结论是:reboot uses shutdown -r

http://unix.stackexchange.com/questions/64280/what-is-the-difference-between-reboot-init-6-and-shutdown-r-now

(好像讨论的是linux问题)

结论是:reboot uses the shutdown command (with the -r switch).

再搜索中文的资料

http://bbs.chinaunix.net/forum.php?mod=viewthread&tid=1383005&highlight=reboot%2Bshutdown%2B-r

(freebsd论坛)

结论是:reboot命令重启动系统时是删除所有的进程,而不是平稳地终止它们

先看下freebsd 9.3

root@93a:~ # man reboot
REBOOT() FreeBSD System Manager's Manual REBOOT(8)
DESCRIPTION
The halt and reboot utilities flush the file system cache to disk, send
all running processes a SIGTERM (and subsequently a SIGKILL) and, respec-
tively, halt or restart the system. The action is logged, including
entering a shutdown record into the user accounting database.root@93b:~ # man shutdown
SHUTDOWN() FreeBSD System Manager's Manual SHUTDOWN(8)
DESCRIPTION
The shutdown utility provides an automated shutdown procedure for super-
users to nicely notify users when the system is shutting down, saving
them from system administrators, hackers, and gurus, who would otherwise
not bother with such niceties. -r The system is rebooted at the specified time.

本人英文较烂,按自己的翻译能力得知:

reboot过程会把系统的缓存写到硬盘,先发送SIGTERM再发送SIGKILL;

shutdown过程友好地通知线上用户,然后完好地保存。

结论即是:reboot与shutdown -r过程一致

下面是自己实际操作的结果

[linux] reboot和shutdown-r的区别

[linux] reboot和shutdown-r的区别

很明显reboot没有出现deamon平稳地终止过程,这是闹哪样啊。

顺便看下centos 6.7

[root@vhost102 ~]# man reboot
DESCRIPTION
These programs allow a system administrator to reboot, halt or poweroff the system. When called with --force or when in runlevel or , this tool invokes the reboot() system call itself and directly reboots the system. Otherwise this simply invokes the shutdown()
tool with the appropriate arguments. Before invoking reboot(), a shutdown time record is first written to /var/log/wtmp[root@vhost102 ~]# man shutdown
DESCRIPTION
shutdown arranges for the system to be brought down in a safe way. All logged-in users are notified that the system is going down and, within the last five minutes of TIME, new logins
are prevented.
OPTIONS
-r Requests that the system be rebooted after it has been brought down.

reboot –force 调用reboot重启系统,否则调用适当的shutdown参数

shutdown会安全地关机

结论即是:reboot与shutdown -r过程一致

reboot的过程

[linux] reboot和shutdown-r的区别

shutdown -r now的过程

[linux] reboot和shutdown-r的区别

总结一个吧

freebsd 9.3 reoot与shutdwon -r now不一致,reoot没有平稳地终止服务强制重启。

centos 6.7 reoot与shutdwon -r now一致,两者都是平稳地终止服务后重启。

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,028
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,518
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,365
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,146
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,780
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,857