p4dctl命令工具

原文链接

https://www.perforce.com/manuals/p4sag/Content/P4SAG/appendix.p4dctl.html

Helix Core Server Control(p4dctl)实用程序可以管理 在本地主机上运行的Perforce服务。

root 用户:

● 是/etc/perforce/目录的 Linux 所有者,可以启动和停止所有服务

● 可以配置/etc/perforce/p4dctl.conf文件以允许一个或多个非 root 用户(例如perforce用户)启动和停止某些服务

bash 复制代码
root@heyu-VMware-Virtual-Platform:~# p4dctl list
Type     Owner        Name         Config
p4d      perforce     ncayu        port=ssl:1666 root=/opt/perforce/servers/ncayu/root
root@heyu-VMware-Virtual-Platform:~# 
root@heyu-VMware-Virtual-Platform:~# 
root@heyu-VMware-Virtual-Platform:~# 
root@heyu-VMware-Virtual-Platform:~# p4dctl status ncayu
'ncayu' p4d service is running.
root@heyu-VMware-Virtual-Platform:~# 

帮助文档

bash 复制代码
root@heyu-VMware-Virtual-Platform:~# p4dctl

Usage: p4dctl [global flags] <cmd> [flags] [service name]

Global Flags
------------

-c <cfg_file>    - Path to config file. Default: /etc/perforce/p4dctl.conf
-p <pid_dir>     - Path to pid file directory. Default: /var/run
-q               - Send output to syslog instead of stdout/stderr
-v <level>       - Set debug level to <level> (1-9)
-V               - Print version and exit

Commands
--------

list             - List configured service(s)
start            - Start the specified service(s)
stop             - Stop the specified service(s)
restart          - Restart the specified service(s)
status           - Check the status of the specified service(s)
checkpoint       - Checkpoint the specified p4d service(s)
journal          - Rotate p4d service(s) journal file
env              - Query the environment of services


root@heyu-VMware-Virtual-Platform:~#

配置文件

bash 复制代码
/etc/perforce/p4dctl.conf

安装路径

bash 复制代码
/opt/perforce/sbin/

文件内容helix-p4dctl.service

bash 复制代码
Unit]
Description=Helix Core Server
After=network.target
After=remote-fs.target

[Service]
ExecStart=/opt/perforce/sbin/p4dctl-init.sh start
ExecStop=/opt/perforce/sbin/p4dctl-init.sh stop
ExecReload=/opt/perforce/sbin/p4dctl-init.sh reload
GuessMainPID=no
IgnoreSIGPIPE=no
KillMode=process
PrivateTmp=true
RemainAfterExit=yes
Restart=always
SuccessExitStatus=5 6
TimeoutSec=5min
Type=simple

[Install]
WantedBy=multi-user.target

https://www.perforce.com/manuals/p4sag/Content/P4SAG/appendix.p4dctl.html


相关推荐
HIT_Weston2 分钟前
78、【Ubuntu】【Hugo】搭建私人博客:文章分类
linux·运维·ubuntu
卓豪终端管理6 分钟前
从安全配置开始,构建主动防御体系
运维·网络·安全
Allen_LVyingbo9 分钟前
NVIDIA AI Enterprise (NVAIE) 运维实战:面向医疗行业的深度培训路径分析
运维·人工智能·知识图谱·健康医疗
刃神太酷啦9 分钟前
Linux 底层核心精讲:环境变量、命令行参数与程序地址空间全解析----《Hello Linux!》(7)
linux·运维·服务器·c语言·c++·chrome·算法
杜子不疼.14 分钟前
Linux + 容器技术:Docker 基础到实战,快速搭建轻量隔离环境
linux·运维·docker
踏雪Vernon14 分钟前
[服务器][教程]EC2开启自定义端口
运维
深圳市恒讯科技16 分钟前
独立站使用美国服务器,对SEO究竟有何影响?
运维·服务器
乾元18 分钟前
当网络变成博弈场:混合云时代,如何用 AI 重构跨域链路的成本与体验平衡
运维·网络·人工智能·网络协议·安全·华为·重构
易营宝22 分钟前
经销商如何通过Facebook营销和Google推广提升B2B网站询盘转化率
运维·服务器·facebook
zly350022 分钟前
Linux Centos7 网络设置UUID号的修改方法
linux·运维·服务器