BMC PSL function(64)-remote_check()

remote_check()

Check the validity of a remote session

Format

remote_check(sessionID)

Parameter

|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Parameter | Definition |
| sessionID | identifier of the remote PatrolAgent session that is to be verified. The sessionID is returned by the remote_open() function when you open a remote PatrolAgent session. |

Description

The remote_check() function verifies whether a remote session to another PATROLAgent is still valid. The function returns 1 if the session is still valid. If the session is no longer valid, the function returns 0 and errno is set to E_PSL_REMOTE_SESSION_INVALID (145).

Example

Code:

复制代码
targetHost="192.168.10.100";
targetPort="3181";
user="patrol";
password="Pat123rol";
encrypted_passwd=encrypt(password,"PEM");
mysession=remote_open(targetHost,targetPort,"PEM",user,encrypted_passwd);

r_check=remote_check(mysession);
print("r_check: ",r_check,"\n");
if(r_check==1){
  remote_event_trigger(mysession,"myorigin","STD","41","ALARM","5","myarg");
}
else
{
  print("Lost connection to remote Agent.Go to plan B.\n",errno,"\n");
}

Output:

相关推荐
一如既往の7 个月前
【 IPMI 内核模块】重新加载
bmc
CodingCos1 年前
【服务器学习专栏 1.2 -- 带外管理】
服务器·ipmi·bmc·带外管理
ZZDICT1 年前
ThinkServer SR658H V2服务器BMC做raid与装系统
运维·服务器·bmc·装系统·做raid
OurBMC社区2 年前
OurBMC大咖说丨第6期:中国长城基于飞腾腾珑E2000的国产化BMC固件产品开发实践
服务器·开源·bmc·ourbmc·长城
OurBMC社区2 年前
OurBMC大咖说丨第5期:BMC开发中的非标准化问题探讨
开源软件·标准·bmc·ourbmc
OurBMC社区2 年前
玩转OurBMC第八期:OpenBMC webui之通信交互
服务器·fpga开发·开源·bmc·ourbmc
洛克希德马丁2 年前
服务器通过impitool设置BMC共享lan实现远程管理
运维·服务器·网络·ipmi·bmc·ipmitool