The invention discloses a method for preventing abnormal shutdown of software under OS, including detecting whether the software currently running on the host end is shut down normally after receiving the shutdown instruction; if so, controlling the GPIO shutdown pin to perform shutdown operation so that the operating system can shut down after detecting the shutdown instruction of the GPIO shutdown pin. In this application, after receiving the shutdown instruction, the status of the software currently running on the host side will be checked, and after the normal shutdown of the software currently running on the host side is completed, the GPIO shutdown pin will be controlled to perform shutdown operation, so as to ensure that the software currently running on the host side can store the data in time, so as to avoid the data loss caused by the abnormal shutdown of the software and improve the performance of the software. Data security. In addition, the embodiment of the present invention also provides a BMC, a host terminal and a system for preventing abnormal shutdown of software under OS, which has the same beneficial effect as described above.
【技术实现步骤摘要】
一种BMC、主机端及防止OS下软件非正常关闭的方法
本专利技术实施例涉及服务器管理
,特别是涉及一种防止OS下软件非正常关闭的方法。本专利技术实施例还涉及一种BMC、主机端及防止OS下软件非正常关闭的系统。
技术介绍
执行伺服器远端管理控制器(BaseboardManagementController,BMC)为基板管理控制器,其具有强大的带外管理功能,例如远程KVM、远程服务器电源操作、实现一些固件升级等。目前,对大批量服务器的管理都是通过BMC实现的,通过BMC实现对大批量服务器的管理可以不需要管理员进入嘈杂的机房环境就可以完成。通常主机端运行的软件在系统关闭时需要执行数据保存和关闭自身等操作,当管理员通过BMC执行对服务器的关机操作时,BMC通过设置关机控制GPIO引脚进行关机操作(BMC中关机操作分为软关机、强制关机和重启,通过操作不同的gpio来进行),并且当主机端的OS监测到关机GPIO引脚的关机指示后会立刻结束程序运行并关机。由于运行中的软件不能够及时获取到即将关机的信号,且软件因不能在较短的关机时间内及时保存数据,导致数据未来及保存即被关闭, ...
【技术保护点】
1.一种防止OS下软件非正常关闭的方法,其特征在于,包括:接收到关机指令后,检测主机端当前运行的软件是否正常关闭完成;若是,则控制GPIO关机引脚执行关机操作,以便操作系统在检测到所述GPIO关机引脚的关机指示后进行关机。
【技术特征摘要】
1.一种防止OS下软件非正常关闭的方法,其特征在于,包括:接收到关机指令后,检测主机端当前运行的软件是否正常关闭完成;若是,则控制GPIO关机引脚执行关机操作,以便操作系统在检测到所述GPIO关机引脚的关机指示后进行关机。2.根据权利要求1所述的防止OS下软件非正常关闭的方法,其特征在于,所述检测主机端当前运行的软件是否正常关闭完成的过程为:接收主机端返回的软件状态信息;依据主机端返回的软件状态信息判断所述主机端当前运行的软件是否正常关闭完成。3.根据权利要求2所述的防止OS下软件非正常关闭的方法,其特征在于,在所述接收到关机指令后之后,在所述接收主机端返回的软件状态信息之前,还包括:对查询接口的状态进行设置,以便所述主机端对所述查询接口的状态进行查询并获取所述查询接口的状态信息,当所述状态信息为存在关机触发时,控制当前运行的软件进行关闭。4.一种防止OS下软件非正常关闭的方法,其特征在于,包括:对BMC端的状态进行查询,判断是否存在关机指令;若是,则控制当前运行的软件进行关闭,以便所述BMC端在检测到所述当前运行的软件正常关闭完成后,控制GPIO关机引脚执行关机操作。5.根据权利要求4所述的防止OS下软件非正常关闭的方法,其特征在于,在所述控制当前运行的软件进行关闭之后,还包括:当所述当前运行的软件关闭完成后,向所述BMC端返回软件正常关闭完...
【专利技术属性】
技术研发人员:王相宇,
申请(专利权)人:郑州云海信息技术有限公司,
类型:发明
国别省市:河南,41
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。