start-stop-daemon
2015-07-09 15:52
309 查看
start-stop-daemon 仅能启动一个daemon的单个实例,启动第二个实例(比如监听另外一个端口)时会提示已经启动了该daemon
1.功能作用
启动和停止系统守护程序
2.位置
/sbin/start-stop-daemon
3.主要参数
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
/article/8144661.html
1.功能作用
启动和停止系统守护程序
2.位置
/sbin/start-stop-daemon
3.主要参数
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
/article/8144661.html
相关文章推荐
- linux 邮件服务器
- linux vim 去掉 bomb
- 16-linux中停止tomcat服务器Connection Refused
- 运维自动化之使用Cobbler自动化部署Linux操作系统
- OpenGL辅助库基本使用
- centos yum源配置
- centos yum源配置
- _doPostBack 未定义错误(转)
- Docker -- 命令总结
- java exec shell cmd 用法
- nginx 源码安装openssl修复Heartbleed漏洞
- Linux下复制粘贴快捷键
- clips apache配置虚拟主机
- Scala多重继承、多重继承构造器执行顺序及AOP实现
- Ubuntu 14.04 下重新安装CUDA 6.5 记录
- php判断linux下程序问题实例
- linux+caffe+cuda6.5+GPU
- Linux下源码编译安装配置SVN服务器的步骤分享
- (一)androidpn-server tomcat版源码解析之--项目启动
- Linux 内核编译选项详解