printer_test

来自「MICO2.3.13 corba 环境平台」· 代码 · 共 59 行

TXT
59
字号
#!/bin/sh# This file is part of the load-balancing exampleNS_ADDR=inet:`uname -n`:12556RC="-ORBNamingAddr $NS_ADDR"for i in 1 2 3 ;doif [ $i = "1" ] ;then  echo "Launching naming service without load-balancing option ..."  nsd -ORBIIOPAddr $NS_ADDR &  ns_pid=$!elif [ $i = "2" ] ;then  echo "Launching naming service with round-robin load-balancing option ..."  nsd --lb round_robin -ORBIIOPAddr $NS_ADDR &  ns_pid=$!elif [ $i = "3" ] ;then  echo "Launching naming service with random load-balancing option ..."  nsd --lb random -ORBIIOPAddr $NS_ADDR &  ns_pid=$!fi;echo "Wait 2 seconds for the naming service to be ready ..."sleep 2echo "Launching servers ..."# This server is named Laser_Admin.Printer using the name format id.kind./Server Laser_Admin.Printer $RC &server1_pid=$!# This server is named Injet_Marketing.Printer using the name format id.kind./Server InkJet_Marketing.Printer $RC &server2_pid=$!echo "Wait 2 seconds for the servers to be ready ..."sleep 2echo "Launching client ..."# The client looks for the server named Laser_Admin.Printer.# If the naming service does not do load-balancing, the reference to the# server named Laser_Admin.Printer will be given to the client.  However,# if the naming service is launched using the load-balancing option of either# "--lb round_robin" or "--lb random", the reference to one of the servers# with the kind value of Printer will be given to the client../Client Laser_Admin.Printer 10 $RCkill $ns_pid $server1_pid $server2_pidecho "======== Execution ends ========"done

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?