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


相关推荐
落叶_Jim25 分钟前
2026年Nginx配置HTTPS全流程-从零到自动续期实战指南
运维·nginx·https
銳昊城1 小时前
项目八: 配置与管理FTP服务器(1) C1
运维·服务器
音符犹如代码1 小时前
Docker 一键部署带有 TimescaleDB 插件的 PostgreSQL
java·运维·数据库·后端·docker·postgresql·容器
ofoxcoding1 小时前
2026 轻量模型 API 实测:GPT-5.5 Nano、Gemini 3.1 Flash、Haiku 4.5 延迟与成本横评
运维·gpt·ai
蔡不菜和他的uU们1 小时前
使用acme.sh进行阿里云域名SSL证书申请与部署自动化
运维·阿里云
太行山有西瓜汁1 小时前
ESXi克隆虚拟机踩坑实录
运维
黎阳之光2 小时前
智慧环卫一体化管理:视频融合技术助力环卫作业与设施运维管控
运维
念恒123062 小时前
库制作与原理---库的理解和加载(中)
linux·运维·服务器
宁静@星空2 小时前
009-Linux环境安装宝塔
linux·运维·服务器
蜡笔婧萱2 小时前
LInux---Web网站建立的实战演练(2)
linux·运维·服务器