zcpHappy 2020-05-11
查看rpm包是否安装 rpm -qa | grep global 安装rpm包 yum install global
cd /root/ceph : 进入ceph源码目录 gtags -v : 生成tag文件 htags -sanohITvt ‘Welcome to ceph source tour!‘ :tag 文件生成后, 执行 htags 命令生成 HTML 文件 htags --suggest2 #htags-server >& log nohup htags-server -b 0.0.0.0 9091 &
执行脚本
cat gtags.sh #!/bin/bash #L 9092 #J 9093 DIR=$(dirname $(readlink -f "$0")) echo $DIR if [ $# -ne 2 ]; then echo "args num is 2" echo "arg1 is ceph dir" echo "arg2 is http port" echo "Example:http://192.168.0.103:9092/" exit 1 fi cd $DIR/$1 gtags -v htags -sanohITvt ‘Welcome to ceph source tour!‘ htags --suggest2 nohup htags-server -b 0.0.0.0 $2 & sleep 3 echo "===================" ps -ef | grep tags sleep 3 echo "===================" netstat -tunlp | grep $2
外部调用脚本
[ ~]# cat ceph_L.sh #!/bin/bash #http://192.168.0.110:9092/ #http://192.168.0.110:9093/ cd /root/mycode/community_code/ if [ ${1}x == "Lx" ];then sh gtags.sh ceph_luminous 9092 elif [ ${1}x == "Jx" ];then sh gtags.sh ceph_10.2.5 9093 else echo "Not support version! exit!" exit 1 fi