/openbmc/pldm/softoff/services/ |
H A D | pldmSoftPowerOff.service | 184f60263a0e4c3dda934d94ecb2a904ef835299 Thu Apr 16 22:30:49 CDT 2020 Chicago Duan <duanzhijia01@inspur.com> soft-off: Send soft off request to the host and wait the host soft off responds
The pldm-softpoweroff application will send a set state effecter states request to host, then the host will soft off.
The pldm-softpoweroff need two timers. One of the timer is used to wait the response of the pldm soft off request message(default 30s). Another timer is used to wait the host graceful shutdown complete(default 7200s).If the host response is not received within the timeout then log an error and exit the application.
The pldm-softpowerroff application need Subscribe to the xyz.openbmc_project.PLDM.Event StateSensorEvent signal,When the host soft off is complete, it sends a pldm event Msg to BMC.After pldmd receive this event Msg ,it will emit the StateSensorEvent signal.When the pldm-softpowerroff receive the signal,it will stop the timer and exit.
Tested in fp5280g2 system: 1、If the host state is not "Running", this application will exit with success(0). 2、If no ACK of the soft off request is received within 30 seconds, this application will exit with error(-1). 3、If no pldm event Msg(host gracefully shutdown complete) is received within 7200 seconds, this application will record an error log and exit with error(-1). 4、If the pldm event Msg(host gracefully shutdown complete) is received within 7200 seconds, this application will exit with success(0).
Signed-off-by: Chicago Duan <duanzhijia01@inspur.com> Change-Id: I486d8068d013766329f78685acc0508fc3cb6c95
|
/openbmc/pldm/softoff/ |
H A D | softoff.hpp | 184f60263a0e4c3dda934d94ecb2a904ef835299 Thu Apr 16 22:30:49 CDT 2020 Chicago Duan <duanzhijia01@inspur.com> soft-off: Send soft off request to the host and wait the host soft off responds
The pldm-softpoweroff application will send a set state effecter states request to host, then the host will soft off.
The pldm-softpoweroff need two timers. One of the timer is used to wait the response of the pldm soft off request message(default 30s). Another timer is used to wait the host graceful shutdown complete(default 7200s).If the host response is not received within the timeout then log an error and exit the application.
The pldm-softpowerroff application need Subscribe to the xyz.openbmc_project.PLDM.Event StateSensorEvent signal,When the host soft off is complete, it sends a pldm event Msg to BMC.After pldmd receive this event Msg ,it will emit the StateSensorEvent signal.When the pldm-softpowerroff receive the signal,it will stop the timer and exit.
Tested in fp5280g2 system: 1、If the host state is not "Running", this application will exit with success(0). 2、If no ACK of the soft off request is received within 30 seconds, this application will exit with error(-1). 3、If no pldm event Msg(host gracefully shutdown complete) is received within 7200 seconds, this application will record an error log and exit with error(-1). 4、If the pldm event Msg(host gracefully shutdown complete) is received within 7200 seconds, this application will exit with success(0).
Signed-off-by: Chicago Duan <duanzhijia01@inspur.com> Change-Id: I486d8068d013766329f78685acc0508fc3cb6c95
|
H A D | main.cpp | diff 184f60263a0e4c3dda934d94ecb2a904ef835299 Thu Apr 16 22:30:49 CDT 2020 Chicago Duan <duanzhijia01@inspur.com> soft-off: Send soft off request to the host and wait the host soft off responds
The pldm-softpoweroff application will send a set state effecter states request to host, then the host will soft off.
The pldm-softpoweroff need two timers. One of the timer is used to wait the response of the pldm soft off request message(default 30s). Another timer is used to wait the host graceful shutdown complete(default 7200s).If the host response is not received within the timeout then log an error and exit the application.
The pldm-softpowerroff application need Subscribe to the xyz.openbmc_project.PLDM.Event StateSensorEvent signal,When the host soft off is complete, it sends a pldm event Msg to BMC.After pldmd receive this event Msg ,it will emit the StateSensorEvent signal.When the pldm-softpowerroff receive the signal,it will stop the timer and exit.
Tested in fp5280g2 system: 1、If the host state is not "Running", this application will exit with success(0). 2、If no ACK of the soft off request is received within 30 seconds, this application will exit with error(-1). 3、If no pldm event Msg(host gracefully shutdown complete) is received within 7200 seconds, this application will record an error log and exit with error(-1). 4、If the pldm event Msg(host gracefully shutdown complete) is received within 7200 seconds, this application will exit with success(0).
Signed-off-by: Chicago Duan <duanzhijia01@inspur.com> Change-Id: I486d8068d013766329f78685acc0508fc3cb6c95
|
H A D | meson.build | diff 184f60263a0e4c3dda934d94ecb2a904ef835299 Thu Apr 16 22:30:49 CDT 2020 Chicago Duan <duanzhijia01@inspur.com> soft-off: Send soft off request to the host and wait the host soft off responds
The pldm-softpoweroff application will send a set state effecter states request to host, then the host will soft off.
The pldm-softpoweroff need two timers. One of the timer is used to wait the response of the pldm soft off request message(default 30s). Another timer is used to wait the host graceful shutdown complete(default 7200s).If the host response is not received within the timeout then log an error and exit the application.
The pldm-softpowerroff application need Subscribe to the xyz.openbmc_project.PLDM.Event StateSensorEvent signal,When the host soft off is complete, it sends a pldm event Msg to BMC.After pldmd receive this event Msg ,it will emit the StateSensorEvent signal.When the pldm-softpowerroff receive the signal,it will stop the timer and exit.
Tested in fp5280g2 system: 1、If the host state is not "Running", this application will exit with success(0). 2、If no ACK of the soft off request is received within 30 seconds, this application will exit with error(-1). 3、If no pldm event Msg(host gracefully shutdown complete) is received within 7200 seconds, this application will record an error log and exit with error(-1). 4、If the pldm event Msg(host gracefully shutdown complete) is received within 7200 seconds, this application will exit with success(0).
Signed-off-by: Chicago Duan <duanzhijia01@inspur.com> Change-Id: I486d8068d013766329f78685acc0508fc3cb6c95
|
H A D | softoff.cpp | 184f60263a0e4c3dda934d94ecb2a904ef835299 Thu Apr 16 22:30:49 CDT 2020 Chicago Duan <duanzhijia01@inspur.com> soft-off: Send soft off request to the host and wait the host soft off responds
The pldm-softpoweroff application will send a set state effecter states request to host, then the host will soft off.
The pldm-softpoweroff need two timers. One of the timer is used to wait the response of the pldm soft off request message(default 30s). Another timer is used to wait the host graceful shutdown complete(default 7200s).If the host response is not received within the timeout then log an error and exit the application.
The pldm-softpowerroff application need Subscribe to the xyz.openbmc_project.PLDM.Event StateSensorEvent signal,When the host soft off is complete, it sends a pldm event Msg to BMC.After pldmd receive this event Msg ,it will emit the StateSensorEvent signal.When the pldm-softpowerroff receive the signal,it will stop the timer and exit.
Tested in fp5280g2 system: 1、If the host state is not "Running", this application will exit with success(0). 2、If no ACK of the soft off request is received within 30 seconds, this application will exit with error(-1). 3、If no pldm event Msg(host gracefully shutdown complete) is received within 7200 seconds, this application will record an error log and exit with error(-1). 4、If the pldm event Msg(host gracefully shutdown complete) is received within 7200 seconds, this application will exit with success(0).
Signed-off-by: Chicago Duan <duanzhijia01@inspur.com> Change-Id: I486d8068d013766329f78685acc0508fc3cb6c95
|