首页 > 系统相关 >centos查看当前运行进程id,安装目录,配置文件

centos查看当前运行进程id,安装目录,配置文件

时间:2022-08-25 14:57:27浏览次数:52  
标签:00 配置文件 centos 0.0 nginx 查看 9226 id

以nginx为例

#查看进程

ps  -ef | grep nginx

root 9226 1 0 Aug15 ? 00:00:00 nginx: master process /usr/sbin/nginx
root 9227 9226 0 Aug15 ? 00:00:06 nginx: worker process
root 9228 9226 0 Aug15 ? 00:00:04 nginx: worker process
root 14452 10854 0 14:24 pts/0 00:00:00 grep --color=auto nginx

master process 后面的就是 nginx的目录

#端口查看进程id

netstat -anop | grep 0.0.0.0:80

tcp        0      0 0.0.0.0:8000            0.0.0.0:*               LISTEN      9226/nginx: master   off (0.00/0/0)

#查看版本

nginx -v

nginx version: nginx/1.16.1

#查看路径

ll  /proc/9226/exe

lrwxrwxrwx 1 root root 0 Aug 25 14:17 /proc/9226/exe -> /usr/sbin/nginx

#查看配置文件路径-t

 /usr/sbin/nginx -t

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

 

标签:00,配置文件,centos,0.0,nginx,查看,9226,id
From: https://www.cnblogs.com/sung1024/p/16624250.html

相关文章

  • 6、spring注解+springMVC注解+Mybatis注解+log4j+idea+maven
    1、项目结构如下 2、编辑pom.xml文件配置依赖1<?xmlversion="1.0"encoding="UTF-8"?>23<projectxmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi......
  • 【Android Studio】未找到SDK位置:SDK location not found. Define location with an A
    编译时遇到问题:SDKlocationnotfound.DefinelocationwithanANDROID_SDK_ROOTenvironmentvariableorbysettingthesdk.dirpathinyourproject'slocalpro......
  • sprintf': This function or variable may be unsafe. Consider using sprintf_s
    在vs里面写c会报各种奇怪的错误,那就用cpp吧,然后c里面的一些函数也会报错,包括最常用的sprintf:sprintf:Thisfunctionorvariablemaybeunsafe.Considerusingsprint......
  • net-snmp 自定义OID利用脚本获取值
    两种办法:1)pass方式/etc/snmp/snmpd.conf   写脚本   脚本需要注意:要连续输出三行:1、OID2、类型3、值如果不按照这个规定,直接输出值,将会报错。检......
  • centos重新分配磁盘
    将/home的磁盘分650G给root分配前:  分配后:  df-h查看磁盘空间首先你需要备份home文件夹里面的内容cp-r/home//homebak/卸载​homeumount/ho......
  • centos7安装node export
    centos7安装nodeexport1、下载地址:https://prometheus.io/download/#node_exporter选择一个,然后直接下载,例如1.3.1版本,下载后拷贝到centos7机器中,也可以直接在cento......
  • CentOS 如何更新cmake?
     卸载原来的cmakeyumremovecmake安装pipyum-yinstallepel-releaseyuminstallpython-pippipinstall--upgradepip用pip安装cmakepipinstallcmake-......
  • tidb 放置策略
    PlacementRulesinSQL特性用于通过SQL接口配置数据在TiKV集群中的放置位置。通过该功能,用户可以将表和分区指定部署至不同的地域、机房、机柜、主机。适用场景包括......
  • tidb 小表缓存
    TiDB在v6.0.0版本中引入了缓存表功能。该功能适用于频繁被访问且很少被修改的热点小表,即把整张表的数据加载到TiDB服务器的内存中,直接从内存中获取表数据,避免从TiKV......
  • IfcGridPlacementDirectionSelect
    IfcGridPlacementDirectionSelect类型定义IfcGridPlacementDirectionSelect允许选择将网格放置定义为显式方向,或通过引用第二个网格交点来提供方向。 IFC4中的新选择......