[转贴] start-stop-daemon命令
2014-03-30 20:39
232 查看
转贴自 http://www.lampblog.net/ubuntu/start-stop-daemon%E5%91%BD%E4%BB%A4/
-S|--start -- <argument>
... 开启一个系统守护程序,并传递参数给它
-K|--stop 停止一个程序
-T|--status 得到程序的状态
-H|--help 显示帮助信息
-V|--version 打印版本信息
Matching options (at least one is
required):
-p|--pidfile <pid-file> pid file to
check
-x|--exec <executable> program to
start/check if it is running
-n|--name <process-name> process
name to check
-u|--user <username|uid> process
owner to check
Options:
-g|--group
<group|gid> 按指定用户组权限运行程序
-c|--chuid <name|uid[:group|gid]>
按指定用户、用户组权限运行程序
-s|--signal <signal> signal to
send (default TERM)
-a|--startas <pathname> program to
start (default is <executable>)
-r|--chroot <directory> chroot to
<directory> before starting
-d|--chdir <directory> change to
<directory> (default is /)
-N|--nicelevel <incr> add incr
to the process' nice level
-P|--procsched <policy[:prio]>
use
<policy> with <prio> for the kernel
process
scheduler (default prio is 0)
-I|--iosched <class[:prio]> use
<class> with <prio> to set the IO
scheduler
(default prio is 4)
-k|--umask <mask>
在开始运行前设置<mask>
-b|--background 后台运行
-m|--make-pidfile
当命令本身不创建pidfile时,由start-stop-daemon创建
-R|--retry <schedule>
等待timeout的时间,检查进程是否停止,如果没有发送KILL信号;
-t|--test 测试模式
-o|--oknodo exit status 0
(not 1) if nothing done
-q|--quiet 不要输出警告
-v|--verbose 显示运行过程信息
2、关闭一个daemon进程
1.功能作用
启动和停止系统守护程序2.位置
/sbin/start-stop-daemon
3.格式用法
start-stop-daemon [
4.主要参数
Commands:-S|--start -- <argument>
... 开启一个系统守护程序,并传递参数给它
-K|--stop 停止一个程序
-T|--status 得到程序的状态
-H|--help 显示帮助信息
-V|--version 打印版本信息
Matching options (at least one is
required):
-p|--pidfile <pid-file> pid file to
check
-x|--exec <executable> program to
start/check if it is running
-n|--name <process-name> process
name to check
-u|--user <username|uid> process
owner to check
Options:
-g|--group
<group|gid> 按指定用户组权限运行程序
-c|--chuid <name|uid[:group|gid]>
按指定用户、用户组权限运行程序
-s|--signal <signal> signal to
send (default TERM)
-a|--startas <pathname> program to
start (default is <executable>)
-r|--chroot <directory> chroot to
<directory> before starting
-d|--chdir <directory> change to
<directory> (default is /)
-N|--nicelevel <incr> add incr
to the process' nice level
-P|--procsched <policy[:prio]>
use
<policy> with <prio> for the kernel
process
scheduler (default prio is 0)
-I|--iosched <class[:prio]> use
<class> with <prio> to set the IO
scheduler
(default prio is 4)
-k|--umask <mask>
在开始运行前设置<mask>
-b|--background 后台运行
-m|--make-pidfile
当命令本身不创建pidfile时,由start-stop-daemon创建
-R|--retry <schedule>
等待timeout的时间,检查进程是否停止,如果没有发送KILL信号;
-t|--test 测试模式
-o|--oknodo exit status 0
(not 1) if nothing done
-q|--quiet 不要输出警告
-v|--verbose 显示运行过程信息
5.应用实例
1、开启一个daemon进程start-stop-daemon --start --background --exec /root/proxy.py
2、关闭一个daemon进程
start-stop-daemon --stop --name proxy.py
相关文章推荐
- start-stop-daemon命令
- CentOS 6.8 使用start-stop-daemon命令
- centos 编译 start-stop-daemon,支持最新的option(--chdir)
- start-stop-daemon
- 关于nginx的启动(start) 停止(stop)命令
- Nginx的启动(start),停止(stop)命令
- start-stop-daemon example
- redhat/centOS start-stop-daemon not found报错
- start-stop-daemon 安装及使用
- CentOS下安装使用start-stop-daemon
- 用start-stop-daemon启动Nginx
- START-STOP-DAEMON
- Manpage: start-stop-daemon
- service iptables status/start/stop 命令失效
- start-stop-daemon自动启动、关闭后台程序参数传递
- 11-hbase-daemon.sh start regionserver启动命令分析
- 监听总结之3.监听命令:lsnrctl工具的三个命令start、stop和status都是分步执行的
- linux中守护进程启停工具start-stop-daemon
- linux搭建redis服务设置开机自启动 service命令stop、start启动停止服务
- 管理lnmp常用命令,lnmp重启,start|stop|reload|restart等命令