start.sh

Java代码 
  1. #!/usr/bin/bash
  2. #
  3. # start.sh
  4. # @auth: zhoulin@lianchuang.com
  5. #
  6. SERVER_STATUS () {
  7. serv_status=`ps -ef | grep weblogic | grep webapp | grep -v grep | grep $1 | wc -l`
  8. if [ "$serv_status" -eq "1" ]; then
  9. echo "[status: Running]"
  10. else
  11. echo "[status: Stopped]"
  12. fi
  13. }
  14. adminserver="http://10.168.31.108:7001"
  15. echo "================= NGBOSS WebLogic Server start console =================="
  16. echo " a: start admin                 "     `SERVER_STATUS AdminServer`
  17. echo " p: start proxy                 "     `SERVER_STATUS proxy`
  18. echo " 1: start ngboss                "     `SERVER_STATUS ngboss`
  19. echo " 2: start chnlmanm              "     `SERVER_STATUS copmanm`
  20. echo " 3: start copmanm               "     `SERVER_STATUS copmanm`
  21. echo " 4: start custmanm              "     `SERVER_STATUS custmanm`
  22. echo " 5: start resmanm               "     `SERVER_STATUS resmanm`
  23. echo " 6: start salemanm              "     `SERVER_STATUS salemanm`
  24. echo " 7: start statmanm              "     `SERVER_STATUS statmanm`
  25. echo " 8: start sysmanm               "     `SERVER_STATUS sysmanm`
  26. echo " 9: start saleserv              "     `SERVER_STATUS saleserv`
  27. echo " q: to quit"
  28. echo "========================================================================="
  29. echo -n "Please select which server you want to start: "
  30. read v_server
  31. cd
  32. cd ngadmindomain
  33. case $v_server in
  34. "a")
  35. echo "starting admin server..."
  36. nohup bin/startWebLogic.sh &
  37. ;;
  38. "p")
  39. echo "starting proxy server..."
  40. nohup bin/startManagedWebLogic.sh proxy $adminserver &
  41. ;;
  42. "1")
  43. echo "starting ngboss server..."
  44. nohup bin/startManagedWebLogic.sh ngboss $adminserver &
  45. ;;
  46. "2")
  47. echo "starting chnlmanm server..."
  48. nohup bin/startManagedWebLogic.sh chnlmanm $adminserver &
  49. ;;
  50. "3")
  51. echo "starting copmanm server..."
  52. nohup bin/startManagedWebLogic.sh copmanm $adminserver &
  53. ;;
  54. "4")
  55. echo "starting custmanm server..."
  56. nohup bin/startManagedWebLogic.sh custmanm $adminserver &
  57. ;;
  58. "5")
  59. echo "starting resmanm server..."
  60. nohup bin/startManagedWebLogic.sh resmanm $adminserver &
  61. ;;
  62. "6")
  63. echo "starting salemanm server..."
  64. nohup bin/startManagedWebLogic.sh salemanm $adminserver &
  65. ;;
  66. "7")
  67. echo "starting statmanm server..."
  68. nohup bin/startManagedWebLogic.sh statmanm $adminserver &
  69. ;;
  70. "8")
  71. echo "starting sysmanm server..."
  72. nohup bin/startManagedWebLogic.sh sysmanm $adminserver &
  73. ;;
  74. "9")
  75. echo "starting saleserv server..."
  76. nohup bin/startManagedWebLogic.sh saleserv $adminserver &
  77. ;;
  78. *)
  79. echo "you have not select any server to start yet!"
  80. ;;
  81. esac
  82. exit 0

stop.sh

Java代码 
  1. #!/usr/bin/bash
  2. #
  3. # stop.sh
  4. # @auth: zhoulin@lianchuang.com
  5. #
  6. SERVER_STATUS () {
  7. serv_status=`ps -ef | grep weblogic | grep webapp | grep -v grep | grep $1 | wc -l`
  8. if [ "$serv_status" -eq "1" ]; then
  9. echo "[status: Running]"
  10. else
  11. echo "[status: Stopped]"
  12. fi
  13. }
  14. echo "=============== NGBOSS WebLogic Server stop console =============="
  15. echo " a:    stop admin                               " `SERVER_STATUS AdminServer`
  16. echo " p:    stop proxy                               " `SERVER_STATUS proxy`
  17. echo " 1:    stop ngboss                              " `SERVER_STATUS ngboss`
  18. echo " 2:    stop chnlmanm                            " `SERVER_STATUS chnlmanm`
  19. echo " 3:    stop copmanm                             " `SERVER_STATUS copmanm`
  20. echo " 4:    stop custmanm                            " `SERVER_STATUS custmanm`
  21. echo " 5:    stop resmanm                             " `SERVER_STATUS resmanm`
  22. echo " 6:    stop salemanm                            " `SERVER_STATUS salemanm`
  23. echo " 7:    stop statmanm                            " `SERVER_STATUS statmanm`
  24. echo " 8:    stop sysmanm                             " `SERVER_STATUS sysmanm`
  25. echo " 9:    stop saleserv                            " `SERVER_STATUS saleserv`
  26. echo " 99:   stop all server except admin and proxy   "
  27. echo " 100:  stop all"
  28. echo " q:   to quit"
  29. echo "================================================================="
  30. echo -n "Please select which server you want to stop: "
  31. read v_server
  32. case $v_server in
  33. "a")
  34. echo "stopping admin server..."
  35. kill -9 `ps -ef | grep weblogic | grep -v grep | grep "AdminServer" | awk '{print $2}'`
  36. ;;
  37. "p")
  38. echo "stopping proxy server..."
  39. kill -9 `ps -ef | grep weblogic | grep -v grep | grep "proxy" | awk '{print $2}'`
  40. ;;
  41. "1")
  42. echo "stopping ngboss server..."
  43. kill -9 `ps -ef | grep weblogic | grep -v grep | grep "ngboss" | awk '{print $2}'`
  44. ;;
  45. "2")
  46. echo "stopping chnlmanm server..."
  47. kill -9 `ps -ef | grep weblogic | grep -v grep | grep "chnlmanm" | awk '{print $2}'`
  48. ;;
  49. "3")
  50. echo "stopping copmanm server..."
  51. kill -9 `ps -ef | grep weblogic | grep -v grep | grep "copmanm" | awk '{print $2}'`
  52. ;;
  53. "4")
  54. echo "stopping custmanm server..."
  55. kill -9 `ps -ef | grep weblogic | grep -v grep | grep "custmanm" | awk '{print $2}'`
  56. ;;
  57. "5")
  58. echo "stopping resmanm server..."
  59. kill -9 `ps -ef | grep weblogic | grep -v grep | grep "resmanm" | awk '{print $2}'`
  60. ;;
  61. "6")
  62. echo "stopping salemanm server..."
  63. kill -9 `ps -ef | grep weblogic | grep -v grep | grep "salemanm" | awk '{print $2}'`
  64. ;;
  65. "7")
  66. echo "stopping statmanm server..."
  67. kill -9 `ps -ef | grep weblogic | grep -v grep | grep "statmanm" | awk '{print $2}'`
  68. ;;
  69. "8")
  70. echo "stopping sysmanm server..."
  71. kill -9 `ps -ef | grep weblogic | grep -v grep | grep "sysmanm" | awk '{print $2}'`
  72. ;;
  73. "9")
  74. echo "stopping saleserv server..."
  75. kill -9 `ps -ef | grep weblogic | grep -v grep | grep "saleserv" | awk '{print $2}'`
  76. ;;
  77. "99")
  78. echo "stopping all server except AdminServer..."
  79. kill -9 `ps -ef | grep weblogic | grep -v grep | grep -v "AdminServer" | grep -v "proxy" | awk '{print $2}'`
  80. ;;
  81. "100")
  82. echo "stopping all servers..."
  83. kill -9 `ps -ef | grep weblogic | grep -v grep | awk '{print $2}'`
  84. ;;
  85. *)
  86. echo "you have not select any server to stop yet!"
  87. ;;
  88. esac
  89. exit 0

最新文章

  1. poj 3661 Running
  2. javascript arguments与javascript函数重载
  3. C++ set使用
  4. gitlab & gerrit & git & repo & jenkins
  5. SLAM reference
  6. 关于web.config中customErrors
  7. iOS - 网络语线程(OC)
  8. 20个Linux系统监视工具
  9. careercup-栈与队列 3.2
  10. 解决IE6不支持position:fixed;的问题
  11. Java同步工具类总结
  12. linux下实现自己的shell解释器
  13. Oracle 启动参数
  14. 服务器配置tomcat部署项目
  15. mRNA文库构建
  16. EOS生产区块:解析插件producer_plugin
  17. nginx设置反向代理后端jenklins,页面上的js css文件无法加载
  18. doubleclick video notes
  19. swift - 自定义tabbar按钮的操作
  20. C/C++函数调用方式

热门文章

  1. Spark Streaming概念学习系列之SparkStreaming性能调优
  2. Hadoop MapReduce编程 API入门系列之统计学生成绩版本2(十八)
  3. Splay树
  4. poj1149 PIGS 最大流(神奇的建图)
  5. Android开发笔记(7)——Intent启用应用软件
  6. 搭建eclipse的安卓开发环境(eclipse+jdk+adt+sdk)
  7. Module, Package in Python
  8. shell学习第一弹-初识
  9. JS操作DOM的一些常用方法
  10. 如何构建和设计以确保 API 的安全性