zoukankan      html  css  js  c++  java
  • linux查看程序运行相关命令

    1、程序服务运行/停止/状态查看

    service 程序服务名 start/stop/status          开启/关闭/查看程序服务

    service --status-all                         查看所有启动的服务

    2、查看程序进程ps

    ps –ef|grep 程序名

    ps aux |grep 程序名

    3、查看端口占用

    1、lsof -i:端口号

    2、netstat -tunlp|grep 端口号

    3 netstat -lanp | grep 27017

      netstat -ano | grep 8500

      netstat -ntpl | grep vsftpd 查看服务监听端口

    4、设置程序开机启动

    ll /etc/rc.d/

    cd /etc/init.d/

    chkconfig --add xxx (程序服务名:例如httpd)

    systemctl enable xxx(例如firewalld)

    5、docker使用

    service docker start/stop/status/  查看docker服务

    docker ps 查看启动容器运行情况

    docker ps -a 查看所有容器运行情况

    docker images 查看docker镜像

    docker start/stop/rm test 启动/停止/删除镜像

    docker rmi 镜像名 REPOSITORY:TAG (tag为latest可省略)

    docker stats 容器名 查看容器的运行状态

    docker logs 容器名  查看容器的日志

  • 相关阅读:
    python自省函数getattr的用法
    python-mysqldb安装
    weblogic部署脚本
    netcat使用
    ssh批量互信脚本
    yum安装出错
    centos文件误删除恢复
    lamp php的ssl,ssh支持
    ssh免密码登陆
    python 学习笔记 四 条件, 循环以及其他
  • 原文地址:https://www.cnblogs.com/yjiajia/p/13378300.html
Copyright © 2011-2022 走看看