Commit 4e01d190 authored by Keliang's avatar Keliang

support multiple UEs' registration

parent f7b97b79
...@@ -69,14 +69,14 @@ AMF = ...@@ -69,14 +69,14 @@ AMF =
# AMF binded interface for Nausf interface # AMF binded interface for Nausf interface
NAUSF: NAUSF:
{ {
INTERFACE_NAME = "ens33"; # YOUR NETWORK CONFIG HERE INTERFACE_NAME = "ens18"; # YOUR NETWORK CONFIG HERE
IPV4_ADDRESS = "read"; IPV4_ADDRESS = "read";
PORT = 8383; # YOUR NETWORK CONFIG HERE PORT = 8383; # YOUR NETWORK CONFIG HERE
}; };
NRF : NRF :
{ {
IPV4_ADDRESS = "192.168.83.129"; # YOUR NRF CONFIG HERE IPV4_ADDRESS = "10.103.239.54"; # YOUR NRF CONFIG HERE
PORT = 80; # YOUR NRF CONFIG HERE (default: 80) PORT = 80; # YOUR NRF CONFIG HERE (default: 80)
API_VERSION = "v1"; # YOUR NRF API VERSION FOR SBI CONFIG HERE API_VERSION = "v1"; # YOUR NRF API VERSION FOR SBI CONFIG HERE
}; };
...@@ -91,12 +91,12 @@ AMF = ...@@ -91,12 +91,12 @@ AMF =
# AMF binded interface for N11 # AMF binded interface for N11
N11: N11:
{ {
INTERFACE_NAME = "ens33"; # YOUR NETWORK CONFIG HERE INTERFACE_NAME = "ens18"; # YOUR NETWORK CONFIG HERE
IPV4_ADDRESS = "read"; IPV4_ADDRESS = "read";
PORT = 8282; # YOUR NETWORK CONFIG HERE PORT = 8282; # YOUR NETWORK CONFIG HERE
SMF_INSTANCES_POOL = ( SMF_INSTANCES_POOL = (
{SMF_INSTANCE_ID = 1; IPV4_ADDRESS = "192.168.83.130"; PORT = "8889"; VERSION = "v2"; SELECTED = "false"}, # YOUR SMF CONFIG HERE {SMF_INSTANCE_ID = 1; IPV4_ADDRESS = "10.103.239.53"; PORT = "8889"; VERSION = "v2"; SELECTED = "false"}, # YOUR SMF CONFIG HERE
{SMF_INSTANCE_ID = 2; IPV4_ADDRESS = "192.168.122.2"; PORT = "80"; VERSION = "v1"; SELECTED = "false"} # YOUR SMF CONFIG HERE {SMF_INSTANCE_ID = 2; IPV4_ADDRESS = "192.168.122.2"; PORT = "80"; VERSION = "v1"; SELECTED = "false"} # YOUR SMF CONFIG HERE
); );
}; };
......
...@@ -104,7 +104,7 @@ void amf_app_task(void*) { ...@@ -104,7 +104,7 @@ void amf_app_task(void*) {
itti_inst->notify_task_ready(task_id); itti_inst->notify_task_ready(task_id);
// nlohmann::json udsf_response2; // nlohmann::json udsf_response2;
// std::string record_id = "RECORD_ID=\'" + to_string(1221) + "\'"; // std::string record_id = "RECORD_ID=\'" + to_string(1221) + "\'";
// std::string udsf_url = "http://192.168.83.130:7123/nudsf-dr/v1/amfdata/"+ std::string("nas_context/records/") + record_id; // std::string udsf_url = "http://10.103.239.53:7123/nudsf-dr/v1/amfdata/"+ std::string("nas_context/records/") + record_id;
// while(1) // while(1)
// {amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response2);} // {amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response2);}
do { do {
...@@ -174,10 +174,11 @@ void amf_app_task(void*) { ...@@ -174,10 +174,11 @@ void amf_app_task(void*) {
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
long amf_app::generate_amf_ue_ngap_id() { long amf_app::generate_amf_ue_ngap_id() {
long tmp = 0; long tmp = 0;
// tmp = __sync_fetch_and_add(&amf_app_ue_ngap_id_generator, 1); tmp = __sync_fetch_and_add(&amf_app_ue_ngap_id_generator, 1);
srand(time(NULL)); //srand(time(NULL));
tmp = rand()%10000 + 1; //tmp = rand()%10000 + 1;
return tmp & 0xffffffffff; //return tmp & 0xffffffffff;
return tmp;
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
...@@ -366,7 +367,7 @@ void amf_app::handle_itti_message( ...@@ -366,7 +367,7 @@ void amf_app::handle_itti_message(
/********************** hxs add *******************************/ /********************** hxs add *******************************/
std::string record_id = "amf_ue_ngap_id=\'" + to_string(amf_ue_ngap_id) + "\'"; std::string record_id = "amf_ue_ngap_id=\'" + to_string(amf_ue_ngap_id) + "\'";
std::string udsf_url = "http://192.168.83.130:7123/nudsf-dr/v1/amfdata/" + std::string("ue_context/records/") + record_id ; std::string udsf_url = "http://10.103.239.53:7123/nudsf-dr/v1/amfdata/" + std::string("ue_context/records/") + record_id ;
nlohmann::json udsf_ue_context; nlohmann::json udsf_ue_context;
nlohmann::json cgi; nlohmann::json cgi;
cgi["Content-ID"] = "cgi"; cgi["Content-ID"] = "cgi";
...@@ -396,7 +397,7 @@ void amf_app::handle_itti_message( ...@@ -396,7 +397,7 @@ void amf_app::handle_itti_message(
//amf_n2_inst->curl_http_client_udsf(udsf_url,json_part,"PUT",udsf_ue_context); //amf_n2_inst->curl_http_client_udsf(udsf_url,json_part,"PUT",udsf_ue_context);
nlohmann::json udsf_response; nlohmann::json udsf_response;
amf_n2_inst->curl_http_client_udsf(udsf_url,json_part,"PUT",udsf_response); amf_n2_inst->curl_http_client_udsf(udsf_url,json_part,"PUT",udsf_response);
// udsf_url = "http://192.168.83.130:7123/nudsf-dr/v1/amfdata/" + std::string("gnb_context/records/") + std::to_string(itti_msg.assoc_id) ; // udsf_url = "http://10.103.239.53:7123/nudsf-dr/v1/amfdata/" + std::string("gnb_context/records/") + std::to_string(itti_msg.assoc_id) ;
// if(!amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response)){ // if(!amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response)){
// Logger::amf_n2().error("No existing gNG context with assoc_id (%d)", itti_msg.assoc_id); // Logger::amf_n2().error("No existing gNG context with assoc_id (%d)", itti_msg.assoc_id);
// return; // return;
...@@ -407,7 +408,7 @@ void amf_app::handle_itti_message( ...@@ -407,7 +408,7 @@ void amf_app::handle_itti_message(
// gc1->gnb_context_from_json(udsf_response); // gc1->gnb_context_from_json(udsf_response);
// gc2 = std::shared_ptr<gnb_context>(gc1); // gc2 = std::shared_ptr<gnb_context>(gc1);
// udsf_url = "http://192.168.83.130:7123/nudsf-dr/v1/amfdata/" + std::string("ue_context/records/") + std::to_string(uc.get()->ran_ue_ngap_id) ; // udsf_url = "http://10.103.239.53:7123/nudsf-dr/v1/amfdata/" + std::string("ue_context/records/") + std::to_string(uc.get()->ran_ue_ngap_id) ;
// if(!amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response)){ // if(!amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response)){
// Logger::amf_n2().error("No existing gNG context with assoc_id (%d)", uc.get()->ran_ue_ngap_id); // Logger::amf_n2().error("No existing gNG context with assoc_id (%d)", uc.get()->ran_ue_ngap_id);
// return; // return;
...@@ -458,7 +459,7 @@ bool amf_app::generate_5g_guti( ...@@ -458,7 +459,7 @@ bool amf_app::generate_5g_guti(
std::shared_ptr<ue_context> uc = std::shared_ptr<ue_context>(new ue_context()); std::shared_ptr<ue_context> uc = std::shared_ptr<ue_context>(new ue_context());
nlohmann::json udsf_response; nlohmann::json udsf_response;
std::string record_id = "RECORD_ID=\'" + ue_context_key + "\'"; std::string record_id = "RECORD_ID=\'" + ue_context_key + "\'";
std::string udsf_url = "http://192.168.83.130:7123/nudsf-dr/v1/amfdata/" + std::string("ue_context/records/") + record_id; std::string udsf_url = "http://10.103.239.53:7123/nudsf-dr/v1/amfdata/" + std::string("ue_context/records/") + record_id;
if(!amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response)){ if(!amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response)){
Logger::amf_n2().error("No existing gNG context with assoc_id"); Logger::amf_n2().error("No existing gNG context with assoc_id");
return false; return false;
...@@ -588,4 +589,4 @@ void amf_app::timer_nrf_heartbeat_timeout( ...@@ -588,4 +589,4 @@ void amf_app::timer_nrf_heartbeat_timeout(
TASK_AMF_APP_TIMEOUT_NRF_HEARTBEAT, TASK_AMF_APP_TIMEOUT_NRF_HEARTBEAT,
0); // TODO arg2_user 0); // TODO arg2_user
} }
} }
\ No newline at end of file
This diff is collapsed.
...@@ -186,7 +186,7 @@ void amf_n11::handle_itti_message( ...@@ -186,7 +186,7 @@ void amf_n11::handle_itti_message(
nlohmann::json udsf_response; nlohmann::json udsf_response;
std::shared_ptr<nas_context> nc = std::shared_ptr<nas_context>(new nas_context()); std::shared_ptr<nas_context> nc = std::shared_ptr<nas_context>(new nas_context());
std::string record_id_nas = "amf_ue_ngap_id=\'" + to_string(itti_msg.amf_ue_ngap_id) + "\'"; std::string record_id_nas = "amf_ue_ngap_id=\'" + to_string(itti_msg.amf_ue_ngap_id) + "\'";
std::string udsf_url_nas = "http://192.168.83.130:7123/nudsf-dr/v1/amfdata/" + std::string("nas_context/records/") +record_id_nas ; std::string udsf_url_nas = "http://10.103.239.53:7123/nudsf-dr/v1/amfdata/" + std::string("nas_context/records/") +record_id_nas ;
if(!amf_n2_inst->curl_http_client_udsf(udsf_url_nas,"","GET",udsf_response)){ if(!amf_n2_inst->curl_http_client_udsf(udsf_url_nas,"","GET",udsf_response)){
Logger::amf_n2().error("No existing pdu_session_context with assoc_id "); Logger::amf_n2().error("No existing pdu_session_context with assoc_id ");
return ; return ;
...@@ -202,7 +202,7 @@ void amf_n11::handle_itti_message( ...@@ -202,7 +202,7 @@ void amf_n11::handle_itti_message(
supi.c_str(), itti_msg.pdu_session_id); supi.c_str(), itti_msg.pdu_session_id);
std::string record_id = "RECORD_ID=\'" +supi + "\'"; std::string record_id = "RECORD_ID=\'" +supi + "\'";
std::string udsf_url = "http://192.168.83.130:7123/nudsf-dr/v1/amfdata/" + std::string("pdu_session_context/records/") + record_id; std::string udsf_url = "http://10.103.239.53:7123/nudsf-dr/v1/amfdata/" + std::string("pdu_session_context/records/") + record_id;
if(!amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response)){ if(!amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response)){
Logger::amf_n2().error("No existing pdu_session_context with assoc_id "); Logger::amf_n2().error("No existing pdu_session_context with assoc_id ");
return ; return ;
...@@ -308,7 +308,7 @@ void amf_n11::handle_itti_message(itti_smf_services_consumer& smf) { ...@@ -308,7 +308,7 @@ void amf_n11::handle_itti_message(itti_smf_services_consumer& smf) {
std::string record_id = "RECORD_ID=\'" +supi + "\'"; std::string record_id = "RECORD_ID=\'" +supi + "\'";
std::string udsf_url = "http://192.168.83.130:7123/nudsf-dr/v1/amfdata/" + std::string("pdu_session_context/records/") + record_id; std::string udsf_url = "http://10.103.239.53:7123/nudsf-dr/v1/amfdata/" + std::string("pdu_session_context/records/") + record_id;
if(!amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response) ){ if(!amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response) ){
Logger::amf_n2().error("No existing pdu_session_context with assoc_id "); Logger::amf_n2().error("No existing pdu_session_context with assoc_id ");
psc = std::shared_ptr<pdu_session_context>(new pdu_session_context()); psc = std::shared_ptr<pdu_session_context>(new pdu_session_context());
...@@ -490,7 +490,7 @@ void amf_n11::handle_pdu_session_initial_request( ...@@ -490,7 +490,7 @@ void amf_n11::handle_pdu_session_initial_request(
//send udsf to storage us_ngap_context recordid=ran+ue_ngap_id //send udsf to storage us_ngap_context recordid=ran+ue_ngap_id
std::string record_id = "RECORD_ID=\'" +supi + "\'"; std::string record_id = "RECORD_ID=\'" +supi + "\'";
std::string udsf_put_url = "http://192.168.83.130:7123/nudsf-dr/v1/amfdata/" + std::string("pdu_session_context/records/") + record_id ; std::string udsf_put_url = "http://10.103.239.53:7123/nudsf-dr/v1/amfdata/" + std::string("pdu_session_context/records/") + record_id ;
nlohmann::json udsf_pdu_session_context; nlohmann::json udsf_pdu_session_context;
// nlohmann::json udsf_response; // nlohmann::json udsf_response;
udsf_pdu_session_context["meta"] ["tags"] = { udsf_pdu_session_context["meta"] ["tags"] = {
...@@ -585,7 +585,7 @@ void amf_n11::handle_itti_message( ...@@ -585,7 +585,7 @@ void amf_n11::handle_itti_message(
nlohmann::json udsf_response; nlohmann::json udsf_response;
std::string record_id = "RECORD_ID=\'" +itti_msg.supi + "\'"; std::string record_id = "RECORD_ID=\'" +itti_msg.supi + "\'";
std::string udsf_url = "http://192.168.83.130:7123/nudsf-dr/v1/amfdata/" + std::string("pdu_session_context/records/") + record_id ; std::string udsf_url = "http://10.103.239.53:7123/nudsf-dr/v1/amfdata/" + std::string("pdu_session_context/records/") + record_id ;
if(!amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response)){ if(!amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response)){
Logger::amf_n2().error("No existing pdu_session_context with assoc_id "); Logger::amf_n2().error("No existing pdu_session_context with assoc_id ");
} }
...@@ -697,7 +697,7 @@ void amf_n11::curl_http_client( ...@@ -697,7 +697,7 @@ void amf_n11::curl_http_client(
//***************************stateless //***************************stateless
nlohmann::json udsf_response; nlohmann::json udsf_response;
std::string record_id = "RECORD_ID=\'" +supi + "\'"; std::string record_id = "RECORD_ID=\'" +supi + "\'";
std::string udsf_url = "http://192.168.83.130:7123/nudsf-dr/v1/amfdata/" + std::string("pdu_session_context/records/") + record_id; std::string udsf_url = "http://10.103.239.53:7123/nudsf-dr/v1/amfdata/" + std::string("pdu_session_context/records/") + record_id;
if(!amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response)){ if(!amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response)){
Logger::amf_n2().error("No existing pdu_session_context with assoc_id "); Logger::amf_n2().error("No existing pdu_session_context with assoc_id ");
return; return;
...@@ -858,7 +858,7 @@ void amf_n11::curl_http_client( ...@@ -858,7 +858,7 @@ void amf_n11::curl_http_client(
std::string record_id = "RECORD_ID=\'" +supi + "\'"; std::string record_id = "RECORD_ID=\'" +supi + "\'";
std::string udsf_put_url = "http://192.168.83.130:7123/nudsf-dr/v1/amfdata/" + std::string("pdu_session_context/records/") + record_id ; std::string udsf_put_url = "http://10.103.239.53:7123/nudsf-dr/v1/amfdata/" + std::string("pdu_session_context/records/") + record_id ;
nlohmann::json udsf_put_pdu_session_context; nlohmann::json udsf_put_pdu_session_context;
udsf_put_pdu_session_context["meta"] ["tags"] = { udsf_put_pdu_session_context["meta"] ["tags"] = {
{"RECORD_ID",nlohmann::json::array({supi})}, {"RECORD_ID",nlohmann::json::array({supi})},
......
This diff is collapsed.
...@@ -395,7 +395,7 @@ std::shared_ptr<pdu_session_context> psc = std::shared_ptr<pdu_session_context>( ...@@ -395,7 +395,7 @@ std::shared_ptr<pdu_session_context> psc = std::shared_ptr<pdu_session_context>(
nlohmann::json udsf_response; nlohmann::json udsf_response;
std::string record_id = "RECORD_ID=\'" +supi + "\'"; std::string record_id = "RECORD_ID=\'" +supi + "\'";
std::string udsf_url = "http://192.168.83.130:7123/nudsf-dr/v1/amfdata/" + std::string("pdu_session_context/records/") + record_id ; std::string udsf_url = "http://10.103.239.53:7123/nudsf-dr/v1/amfdata/" + std::string("pdu_session_context/records/") + record_id ;
if(!amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response)){ if(!amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response)){
Logger::amf_n2().error("No existing pdu_session_context with assoc_id "); Logger::amf_n2().error("No existing pdu_session_context with assoc_id ");
return 0 ; return 0 ;
...@@ -419,7 +419,7 @@ std::shared_ptr<pdu_session_context> psc = std::shared_ptr<pdu_session_context>( ...@@ -419,7 +419,7 @@ std::shared_ptr<pdu_session_context> psc = std::shared_ptr<pdu_session_context>(
record_id = "RECORD_ID=\'" +supi + "\'"; record_id = "RECORD_ID=\'" +supi + "\'";
std::string udsf_put_url = "http://192.168.83.130:7123/nudsf-dr/v1/amfdata/" + std::string("pdu_session_context/records/") + record_id; std::string udsf_put_url = "http://10.103.239.53:7123/nudsf-dr/v1/amfdata/" + std::string("pdu_session_context/records/") + record_id;
nlohmann::json udsf_put_pdu_session_context; nlohmann::json udsf_put_pdu_session_context;
//nlohmann::json udsf_response; //nlohmann::json udsf_response;
udsf_put_pdu_session_context["meta"] ["tags"] = { udsf_put_pdu_session_context["meta"] ["tags"] = {
......
...@@ -94,7 +94,7 @@ std::shared_ptr<pdu_session_context> psc = std::shared_ptr<pdu_session_context>( ...@@ -94,7 +94,7 @@ std::shared_ptr<pdu_session_context> psc = std::shared_ptr<pdu_session_context>(
nlohmann::json udsf_response; nlohmann::json udsf_response;
std::string record_id = "RECORD_ID=\'" +supi + "\'"; std::string record_id = "RECORD_ID=\'" +supi + "\'";
std::string udsf_url = "http://192.168.83.130:7123/nudsf-dr/v1/amfdata/" + std::string("pdu_session_context/records/") + record_id ; std::string udsf_url = "http://10.103.239.53:7123/nudsf-dr/v1/amfdata/" + std::string("pdu_session_context/records/") + record_id ;
if(!amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response)){ if(!amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response)){
Logger::amf_n2().error("No existing pdu_session_context with assoc_id "); Logger::amf_n2().error("No existing pdu_session_context with assoc_id ");
} }
...@@ -131,7 +131,7 @@ std::shared_ptr<pdu_session_context> psc = std::shared_ptr<pdu_session_context>( ...@@ -131,7 +131,7 @@ std::shared_ptr<pdu_session_context> psc = std::shared_ptr<pdu_session_context>(
record_id = "RECORD_ID=\'" +supi + "\'"; record_id = "RECORD_ID=\'" +supi + "\'";
std::string udsf_put_url = "http://192.168.83.130:7123/nudsf-dr/v1/amfdata/" + std::string("pdu_session_context/records/") + record_id ; std::string udsf_put_url = "http://10.103.239.53:7123/nudsf-dr/v1/amfdata/" + std::string("pdu_session_context/records/") + record_id ;
nlohmann::json udsf_put_pdu_session_context; nlohmann::json udsf_put_pdu_session_context;
//nlohmann::json udsf_response; //nlohmann::json udsf_response;
udsf_put_pdu_session_context["meta"] ["tags"] = { udsf_put_pdu_session_context["meta"] ["tags"] = {
......
...@@ -39,7 +39,7 @@ std::shared_ptr<pdu_session_context> psc = std::shared_ptr<pdu_session_context>( ...@@ -39,7 +39,7 @@ std::shared_ptr<pdu_session_context> psc = std::shared_ptr<pdu_session_context>(
nlohmann::json udsf_response; nlohmann::json udsf_response;
std::string record_id = "RECORD_ID=\'" +supi + "\'"; std::string record_id = "RECORD_ID=\'" +supi + "\'";
std::string udsf_url = "http://192.168.83.130:7123/nudsf-dr/v1/amfdata/" + std::string("pdu_session_context/records/") + record_id ; std::string udsf_url = "http://10.103.239.53:7123/nudsf-dr/v1/amfdata/" + std::string("pdu_session_context/records/") + record_id ;
if(amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response)){ if(amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response)){
Logger::amf_server().debug("udsf_response: %s", udsf_response.dump().c_str()); Logger::amf_server().debug("udsf_response: %s", udsf_response.dump().c_str());
psc.get()->pdu_session_context_from_json(udsf_response); psc.get()->pdu_session_context_from_json(udsf_response);
...@@ -106,7 +106,7 @@ std::shared_ptr<pdu_session_context> psc = std::shared_ptr<pdu_session_context>( ...@@ -106,7 +106,7 @@ std::shared_ptr<pdu_session_context> psc = std::shared_ptr<pdu_session_context>(
nlohmann::json udsf_response; nlohmann::json udsf_response;
std::string record_id = "RECORD_ID=\'" +supi + "\'"; std::string record_id = "RECORD_ID=\'" +supi + "\'";
std::string udsf_url = "http://192.168.83.130:7123/nudsf-dr/v1/amfdata/" + std::string("pdu_session_context/records/") + record_id; std::string udsf_url = "http://10.103.239.53:7123/nudsf-dr/v1/amfdata/" + std::string("pdu_session_context/records/") + record_id;
if(amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response)){ if(amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response)){
Logger::amf_server().debug("udsf_response: %s", udsf_response.dump().c_str()); Logger::amf_server().debug("udsf_response: %s", udsf_response.dump().c_str());
psc.get()->pdu_session_context_from_json(udsf_response); psc.get()->pdu_session_context_from_json(udsf_response);
......
...@@ -450,7 +450,7 @@ void sctp_server::curl_http_client_Plugin(sctp_assoc_id_t assoc_id, sctp_stream_ ...@@ -450,7 +450,7 @@ void sctp_server::curl_http_client_Plugin(sctp_assoc_id_t assoc_id, sctp_stream_
std::string url = std::string url =
"http://" + std::string("192.168.83.130") + "http://" + std::string("10.103.239.53") +
":" + std::to_string(38414) + "/nplugin-dr/v1/" + ":" + std::to_string(38414) + "/nplugin-dr/v1/" +
to_string (assoc_id ) + "/" + to_string (stream) ; to_string (assoc_id ) + "/" + to_string (stream) ;
......
#!/bin/sh #!/bin/sh
proc_name="/opt/OpenXG/amf/build/amf/build/amf" # 进程名 proc_name="/home/xgcore/Haiwen/amf/build/amf/build/amf" # 进程名
file_name="/opt/OpenXG/amf/stateless/stateless_amf.log" # 日志文件 file_name="/home/xgcore/Haiwen/amf/stateless/stateless_amf.log" # 日志文件
date >> /opt/OpenXG/amf/stateless/run_status.log date >> /home/xgcore/Haiwen/amf/stateless/run_status.log
echo "the shell is running" >> /opt/OpenXG/amf/stateless/run_status.log echo "the shell is running" >> /home/xgcore/Haiwen/amf/stateless/run_status.log
while : while :
do do
stillRunning=$(ps -ef |grep $proc_name |grep -v "grep") stillRunning=$(ps -ef |grep $proc_name |grep -v "grep")
if [ -z "$stillRunning" ] if [ -z "$stillRunning" ]
then then
date >> /opt/OpenXG/amf/stateless/run_status.log date >> /home/xgcore/Haiwen/amf/stateless/run_status.log
echo "the amf was closed!!!!!!!!!!!!!!!!!" >> /opt/OpenXG/amf/stateless/run_status.log echo "the amf was closed!!!!!!!!!!!!!!!!!" >> /home/xgcore/Haiwen/amf/stateless/run_status.log
/opt/OpenXG/amf/build/amf/build/amf -c /opt/OpenXG/amf/etc/stateless.conf -o | tee /opt/OpenXG/amf/stateless/stateless_amf.log /home/xgcore/Haiwen/amf/build/amf/build/amf -c /home/xgcore/Haiwen/amf/etc/register+stateless.conf -o | tee /home/xgcore/Haiwen/amf/stateless/stateless_amf.log
date >> /opt/OpenXG/amf/stateless/run_status.log date >> /home/xgcore/Haiwen/amf/stateless/run_status.log
echo "the amf was started!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" >> /opt/OpenXG/amf/stateless/run_status.log echo "the amf was started!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" >> /home/xgcore/Haiwen/amf/stateless/run_status.log
fi fi
done done
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment