CN110399753A - Control method, system, storage medium and server for server chassis lock - Google Patents
Control method, system, storage medium and server for server chassis lock Download PDFInfo
- Publication number
- CN110399753A CN110399753A CN201910568211.8A CN201910568211A CN110399753A CN 110399753 A CN110399753 A CN 110399753A CN 201910568211 A CN201910568211 A CN 201910568211A CN 110399753 A CN110399753 A CN 110399753A
- Authority
- CN
- China
- Prior art keywords
- server
- state
- lock
- level state
- machine box
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 35
- 238000004590 computer program Methods 0.000 claims description 5
- 238000010276 construction Methods 0.000 claims 2
- 108010028984 3-isopropylmalate dehydratase Proteins 0.000 claims 1
- 230000002123 temporal effect Effects 0.000 claims 1
- 230000009286 beneficial effect Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 1
- 230000009545 invasion Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/16—Constructional details or arrangements
- G06F1/18—Packaging or power distribution
- G06F1/181—Enclosures
- G06F1/182—Enclosures with special features, e.g. for use in industrial environments; grounding or shielding against radio frequency interference [RFI] or electromagnetical interference [EMI]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/70—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
- G06F21/86—Secure or tamper-resistant housings
-
- H—ELECTRICITY
- H05—ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
- H05K—PRINTED CIRCUITS; CASINGS OR CONSTRUCTIONAL DETAILS OF ELECTRIC APPARATUS; MANUFACTURE OF ASSEMBLAGES OF ELECTRICAL COMPONENTS
- H05K5/00—Casings, cabinets or drawers for electric apparatus
- H05K5/02—Details
- H05K5/0208—Interlock mechanisms; Means for avoiding unauthorised use or function, e.g. tamperproof
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Microelectronics & Electronic Packaging (AREA)
- Electromagnetism (AREA)
- Power Engineering (AREA)
- Human Computer Interaction (AREA)
- Lock And Its Accessories (AREA)
Abstract
本申请公开了一种服务器机箱锁的控制方法,应用于BMC,所述控制方法包括接收机箱锁控制指令,并根据所述机箱锁控制指令确定服务器机箱锁的目标状态;根据所述目标状态设置服务器主板上的目标GPIO引脚的电平状态,以便控制所述服务器机箱锁解锁或上锁;其中,当所述目标GPIO引脚的电平状态为所述第一电平状态时所述服务器机箱锁为解锁状态,当所述目标GPIO引脚的电平状态为所述第二电平状态时所述服务器机箱锁为上锁状态。本申请能够避免机箱被非法入侵。本申请还公开了一种服务器机箱锁的控制系统、一种计算机可读存储介质及一种服务器,具有以上有益效果。
The present application discloses a control method for a server chassis lock, which is applied to BMC. The control method includes receiving a chassis lock control instruction, and determining a target state of the server chassis lock according to the chassis lock control instruction; setting according to the target state The level state of the target GPIO pin on the server motherboard, so as to control the unlocking or locking of the server chassis lock; wherein, when the level state of the target GPIO pin is the first level state, the server The chassis lock is in an unlocked state, and the server chassis lock is in a locked state when the level state of the target GPIO pin is the second level state. The present application can prevent the chassis from being illegally invaded. The present application also discloses a control system for a server chassis lock, a computer-readable storage medium and a server, which have the above beneficial effects.
Description
技术领域technical field
本发明涉及计算机技术领域,特别涉及一种服务器机箱锁的控制方法、系统、一种计算机可读存储介质及一种服务器。The present invention relates to the field of computer technology, and in particular, to a control method and system for a server chassis lock, a computer-readable storage medium, and a server.
背景技术Background technique
目前市面上的服务器,普遍使用名为Chassis Intrusion(机箱入侵)的GPIO针脚来监视机箱入侵事件。当服务器的机箱被打开时,服务器的BMC将会利用GPIO引脚侦测此事件并写入日志中。Servers currently on the market generally use a GPIO pin named Chassis Intrusion to monitor chassis intrusion events. When the server's chassis is opened, the server's BMC will use the GPIO pins to detect this event and write it to the log.
但是,上述利用Chassis Intrusion引脚检测机箱是否被入侵,在机箱被开启时记下日志属于被动消极的防护方式,管理者只能于事后得知此事件发生而无法避免机箱被入侵。However, using the Chassis Intrusion pin to detect whether the chassis is intruded, and recording the log when the chassis is opened is a passive and passive protection method. The administrator can only learn about the occurrence of the event after the fact and cannot prevent the chassis from being intruded.
因此,如何避免机箱被非法入侵是本领域技术人员目前需要解决的技术问题。Therefore, how to prevent the chassis from being illegally invaded is a technical problem that needs to be solved by those skilled in the art.
发明内容SUMMARY OF THE INVENTION
本申请的目的是提供一种服务器机箱锁的控制方法、系统、一种计算机可读存储介质及一种服务器,能够避免机箱被非法入侵。The purpose of this application is to provide a control method and system for a server chassis lock, a computer-readable storage medium and a server, which can prevent the chassis from being illegally invaded.
为解决上述技术问题,本申请提供一种服务器机箱锁的控制方法,应用于BMC,该控制方法包括:In order to solve the above-mentioned technical problems, the present application provides a control method for a server chassis lock, which is applied to BMC, and the control method includes:
接收机箱锁控制指令,并根据所述机箱锁控制指令确定服务器机箱锁的目标状态;receiving a chassis lock control instruction, and determining the target state of the server chassis lock according to the chassis lock control instruction;
根据所述目标状态设置服务器主板上的目标GPIO引脚的电平状态,以便控制所述服务器机箱锁解锁或上锁;Set the level state of the target GPIO pin on the server motherboard according to the target state, so as to control the server chassis lock to be unlocked or locked;
其中,当所述目标GPIO引脚的电平状态为所述第一电平状态时所述服务器机箱锁为解锁状态,当所述目标GPIO引脚的电平状态为所述第二电平状态时所述服务器机箱锁为上锁状态。Wherein, when the level state of the target GPIO pin is the first level state, the server chassis lock is in an unlocked state, and when the level state of the target GPIO pin is the second level state The server chassis lock is in the locked state.
可选的,还包括:Optionally, also include:
按照预设周期更新服务器机箱开关记录;其中,所述服务器机箱开关记录包括所述服务器机箱锁处于所述解锁状态和/或所述上锁状态对应的时间信息。The server chassis switch record is updated according to a preset period; wherein the server chassis switch record includes time information corresponding to the server chassis lock being in the unlocked state and/or the locked state.
可选的,还包括:Optionally, also include:
当服务器机箱处于上电状态时,将所述目标GPIO引脚的电平状态设置为所述第二电平状态。When the server chassis is in the power-on state, the level state of the target GPIO pin is set to the second level state.
可选的,所述服务器机箱锁为电磁门吸锁。Optionally, the server chassis lock is an electromagnetic door suction lock.
可选的,还包括:Optionally, also include:
当所述目标GPIO引脚的电平状态为第一电平状态时,播放相应的提示音。When the level state of the target GPIO pin is the first level state, a corresponding prompt sound is played.
可选的,所述机箱锁控制指令具体为IPMI指令。Optionally, the chassis lock control instruction is specifically an IPMI instruction.
本申请还提供了一种服务器机箱锁的控制系统,应用于BMC,该控制系统包括:The application also provides a control system for a server chassis lock, which is applied to BMC, and the control system includes:
状态确定模块,用于接收机箱锁控制指令,并根据所述机箱锁控制指令确定服务器机箱锁的目标状态;a state determination module, configured to receive the chassis lock control instruction, and determine the target state of the server chassis lock according to the chassis lock control instruction;
引脚电平调整模块,用于根据所述目标状态设置服务器主板上的目标GPIO引脚的电平状态,以便控制所述服务器机箱锁解锁或上锁;a pin level adjustment module for setting the level state of the target GPIO pins on the server motherboard according to the target state, so as to control the server chassis lock to be unlocked or locked;
其中,当所述目标GPIO引脚的电平状态为所述第一电平状态时所述服务器机箱锁为解锁状态,当所述目标GPIO引脚的电平状态为所述第二电平状态时所述服务器机箱锁为上锁状态。Wherein, when the level state of the target GPIO pin is the first level state, the server chassis lock is in an unlocked state, and when the level state of the target GPIO pin is the second level state The server chassis lock is in the locked state.
本申请还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序执行时实现上述服务器机箱锁的控制方法执行的步骤。The present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed, the steps of the above-mentioned control method for a server chassis lock are implemented.
本申请还提供了一种服务器,包括:设置于服务器主板的BMC和服务器机箱锁;其中,设置于服务器主板的BMC用于接收机箱锁控制指令,并根据所述机箱锁控制指令确定服务器机箱锁的目标状态;还用于根据所述目标状态设置所述服务器主板上的目标GPIO引脚的电平状态,以便控制所述服务器机箱锁解锁或上锁;所述服务器机箱锁用于当所述目标GPIO引脚的电平状态为所述第一电平状态时,开启锁结构以使所述服务器机箱锁为解锁状态;还用于当所述目标GPIO引脚的电平状态为所述第二电平状态时,闭合锁结构以使所述服务器机箱锁为上锁状态。The application also provides a server, comprising: a BMC arranged on the server mainboard and a server chassis lock; wherein the BMC arranged on the server mainboard is used to receive a chassis lock control instruction, and determine the server chassis lock according to the chassis lock control instruction the target state; also used to set the level state of the target GPIO pin on the server motherboard according to the target state, so as to control the server chassis lock to unlock or lock; the server chassis lock is used when the When the level state of the target GPIO pin is the first level state, the lock structure is opened to make the server chassis lock be the unlocked state; it is also used when the level state of the target GPIO pin is the first level state. In the two-level state, the locking structure is closed to make the server chassis lock in the locked state.
可选的,所述服务器机箱锁为电磁门吸锁。Optionally, the server chassis lock is an electromagnetic door suction lock.
本申请提供了一种服务器机箱锁的控制方法,应用于BMC,该控制方法包括接收机箱锁控制指令,并根据所述机箱锁控制指令确定服务器机箱锁的目标状态;根据所述目标状态设置服务器主板上的目标GPIO引脚的电平状态,以便控制所述服务器机箱锁解锁或上锁;其中,当所述目标GPIO引脚的电平状态为所述第一电平状态时所述服务器机箱锁为解锁状态,当所述目标GPIO引脚的电平状态为所述第二电平状态时所述服务器机箱锁为上锁状态。The present application provides a control method for a server chassis lock, which is applied to BMC. The control method includes receiving a chassis lock control instruction, and determining a target state of a server chassis lock according to the chassis lock control instruction; setting a server according to the target state The level state of the target GPIO pin on the motherboard, so as to control the server chassis lock to unlock or lock; wherein, when the level state of the target GPIO pin is the first level state, the server chassis The lock is in an unlocked state, and the server chassis lock is in a locked state when the level state of the target GPIO pin is the second level state.
本申请将GPIO引脚的输入属性改为输出属性,根据接收到的机箱锁控制指令确定需要服务器机箱锁需要达到的目标状态,并根据目标状态设置GPIO引脚的电平状态。本申请中服务器机箱锁的上锁/解锁状态根据GPIO引脚的电平状态改变,因此可以实现通过根据机箱锁控制命令设置GPIO引脚电平实现服务器机箱的开锁和解锁,能够避免机箱被非法入侵。本申请同时还提供了一种服务器机箱锁的控制系统、一种计算机可读存储介质和一种服务器,具有上述有益效果,在此不再赘述。The present application changes the input attribute of the GPIO pin to the output attribute, determines the target state that needs to be achieved by the server chassis lock according to the received chassis lock control instruction, and sets the level state of the GPIO pin according to the target state. In the present application, the lock/unlock state of the server chassis lock is changed according to the level state of the GPIO pin, so the server chassis can be unlocked and unlocked by setting the GPIO pin level according to the chassis lock control command, which can prevent the chassis from being illegally invasion. The present application also provides a control system for a server chassis lock, a computer-readable storage medium, and a server, which have the above beneficial effects, and are not repeated here.
附图说明Description of drawings
为了更清楚地说明本申请实施例,下面将对实施例中所需要使用的附图做简单的介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to describe the embodiments of the present application more clearly, the following will briefly introduce the drawings that are used in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application, which are not relevant to ordinary skills in the art. As far as personnel are concerned, other drawings can also be obtained from these drawings on the premise of no creative work.
图1为本申请实施例所提供的一种服务器机箱锁的控制方法的流程图;1 is a flowchart of a method for controlling a server chassis lock provided by an embodiment of the present application;
图2为本申请实施例所提供的另一种服务器机箱锁的控制方法的流程图;2 is a flowchart of another method for controlling a server chassis lock provided by an embodiment of the present application;
图3为本申请实施例所提供的一种机箱上锁和解锁的控制流程图;3 is a control flow chart of locking and unlocking a chassis according to an embodiment of the present application;
图4为本申请实施例所提供的一种有限状态机工作原理图;FIG. 4 is a working principle diagram of a finite state machine provided by an embodiment of the present application;
图5为本申请实施例所提供的一种服务器机箱锁的控制系统的结构示意图。FIG. 5 is a schematic structural diagram of a control system for a server chassis lock provided by an embodiment of the present application.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
下面请参见图1,图1为本申请实施例所提供的一种服务器机箱锁的控制方法的流程图。Please refer to FIG. 1 below. FIG. 1 is a flowchart of a method for controlling a server chassis lock provided by an embodiment of the present application.
具体步骤可以包括:Specific steps can include:
S101:接收机箱锁控制指令,并根据所述机箱锁控制指令确定服务器机箱锁的目标状态;S101: Receive a chassis lock control instruction, and determine a target state of a server chassis lock according to the chassis lock control instruction;
其中,本实施例的执行主体可以为服务器的管理芯片BMC(Baseboard ManagementController),BMC可以在机器未开机的状态下对机器进行固件升级、查看机器设备等操作。BMC可以为设置于服务器主板上的管理芯片。机箱锁控制指令可以为上层应用下发的IPMI(Intelligent Platform Management Interface,智能平台管理接口)指令,用于实现对于服务器机箱锁的控制。The execution subject of this embodiment may be a management chip BMC (Baseboard Management Controller) of the server, and the BMC may perform operations such as upgrading the firmware of the machine, viewing machine equipment, and the like when the machine is not powered on. The BMC may be a management chip disposed on the server motherboard. The chassis lock control instruction may be an IPMI (Intelligent Platform Management Interface, intelligent platform management interface) instruction issued by an upper-layer application, and is used to control the server chassis lock.
本步骤中提到的机箱锁控制指令可以为解锁指令,也可以为上锁指令,当所述机箱锁控制指令为解锁指令时服务器机箱锁的目标状态为解锁状态,当所述机箱锁控制指令为上锁指令时服务器机箱锁的目标状态为上锁状态。目标状态指需要服务器机箱锁达到的状态。The chassis lock control command mentioned in this step may be an unlock command or a lock command. When the chassis lock control command is an unlock command, the target state of the server chassis lock is an unlock state, and when the chassis lock control command is an unlock command When it is the lock command, the target state of the server chassis lock is the lock state. The target state refers to the state that requires the server chassis lock to reach.
S102:根据所述目标状态设置服务器主板上的目标GPIO引脚的电平状态,以便控制所述服务器机箱锁解锁或上锁;S102: Set the level state of the target GPIO pin on the server motherboard according to the target state, so as to control the server chassis lock to be unlocked or locked;
其中,本实施例中选定服务器主板上的一个或多个GPIO引脚作为目标GPIO引脚,此处不对GPIO引脚的数量进行限定。本实施例中可以预先存储有目标状态与目标GPIO引脚的电平状态的对应关系,在确定了目标状态之后,可以根据该对应关系设置目标GPIO引脚的电平状态。Wherein, in this embodiment, one or more GPIO pins on the server motherboard are selected as target GPIO pins, and the number of GPIO pins is not limited here. In this embodiment, the corresponding relationship between the target state and the level state of the target GPIO pin may be pre-stored, and after the target state is determined, the level state of the target GPIO pin may be set according to the corresponding relationship.
作为一种可行的实施方式,若目标GPIO引脚的数量为1,当所述目标状态为解锁状态时,可以将目标GPIO引脚设置为低电平;当目标状态为上锁状态时,可以将目标GPIO引脚设置为高电平。若目标GPIO引脚的数量大于1时,当所述目标状态为解锁状态时,可以将所有目标GPIO引脚设置为低电平;当所述目标状态为解锁状态时,可以将任意数量个目标GPIO引脚设置为高电平。通过上述目标GPIO引脚数量大于1的处理方式,能够使服务器机箱锁只在所有GPIO引脚设置为高电平时处于解锁状态,提升了服务器机箱的安全防护性能。As a feasible implementation manner, if the number of target GPIO pins is 1, when the target state is the unlocked state, the target GPIO pin can be set to a low level; when the target state is the locked state, the target GPIO pin can be set to a low level; Set the target GPIO pin high. If the number of target GPIO pins is greater than 1, when the target state is an unlocked state, all target GPIO pins can be set to a low level; when the target state is an unlocked state, any number of target GPIO pins can be set to GPIO pins are set high. Through the processing method that the number of target GPIO pins is greater than 1, the server chassis lock can be in an unlocked state only when all GPIO pins are set to a high level, which improves the security protection performance of the server chassis.
其中,本实施例中所提到的服务器机箱锁为服务器机箱上设置的锁结构,当服务器机箱锁处于解锁状态时服务器机箱可以被打开,当服务器机箱锁处于上锁状态时服务器机箱无法被打开。本实施例中服务器机箱锁可以与目标GPIO引脚连接,当所述目标GPIO引脚的电平状态为所述第一电平状态时所述服务器机箱锁为解锁状态,当所述目标GPIO引脚的电平状态为所述第二电平状态时所述服务器机箱锁为上锁状态。The server chassis lock mentioned in this embodiment is a lock structure set on the server chassis. When the server chassis lock is in an unlocked state, the server chassis can be opened, and when the server chassis lock is in a locked state, the server chassis cannot be opened. . In this embodiment, the server chassis lock can be connected to the target GPIO pin. When the level state of the target GPIO pin is the first level state, the server chassis lock is in the unlocked state, and when the target GPIO pin is in the unlocked state When the level state of the pin is the second level state, the server chassis lock is in a locked state.
作为一种可行的实施方式,本实施例可以在所述目标GPIO引脚的电平状态为第一电平状态时,播放相应的提示音,告知用户服务器机箱可以被打开,以便工作人员打开服务器机箱更换内部组件。相应的,在所述目标GPIO引脚的电平状态为第二电平状态时,播放相应的提示音,以便告知用户服务器机箱可以已上锁。As a feasible implementation manner, in this embodiment, when the level state of the target GPIO pin is the first level state, a corresponding prompt sound can be played to inform the user that the server chassis can be opened, so that the staff can open the server Chassis replaces internal components. Correspondingly, when the level state of the target GPIO pin is the second level state, a corresponding prompt sound is played to inform the user that the server chassis may be locked.
本实施例将GPIO引脚的输入属性改为输出属性,根据接收到的机箱锁控制指令确定需要服务器机箱锁需要达到的目标状态,并根据目标状态设置GPIO引脚的电平状态。本实施例中服务器机箱锁的上锁/解锁状态根据GPIO引脚的电平状态改变,因此可以实现通过根据机箱锁控制命令设置GPIO引脚电平实现服务器机箱的开锁和解锁,能够避免机箱被非法入侵。In this embodiment, the input attribute of the GPIO pin is changed to the output attribute, the target state that needs to be achieved by the server chassis lock is determined according to the received chassis lock control instruction, and the level state of the GPIO pin is set according to the target state. In this embodiment, the lock/unlock state of the server chassis lock is changed according to the level state of the GPIO pin. Therefore, the server chassis can be unlocked and unlocked by setting the GPIO pin level according to the chassis lock control command, which can prevent the chassis from being locked and unlocked. trespass.
下面请参见图2,图2为本申请实施例所提供的另一种服务器机箱锁的控制方法的流程图,具体步骤可以包括:Please refer to FIG. 2 below. FIG. 2 is a flowchart of another method for controlling a server chassis lock provided by an embodiment of the present application. The specific steps may include:
S201:接收机箱锁控制指令,并根据所述机箱锁控制指令确定服务器机箱锁的目标状态;S201: Receive a chassis lock control instruction, and determine a target state of a server chassis lock according to the chassis lock control instruction;
S202:根据所述目标状态设置服务器主板上的目标GPIO引脚的电平状态,以便控制所述服务器机箱锁解锁或上锁;S202: Set the level state of the target GPIO pin on the server motherboard according to the target state, so as to control the server chassis lock to be unlocked or locked;
其中,当所述目标GPIO引脚的电平状态为所述第一电平状态时所述服务器机箱锁为解锁状态,当所述目标GPIO引脚的电平状态为所述第二电平状态时所述服务器机箱锁为上锁状态。Wherein, when the level state of the target GPIO pin is the first level state, the server chassis lock is in an unlocked state, and when the level state of the target GPIO pin is the second level state The server chassis lock is in the locked state.
S203:当服务器机箱处于上电状态时,将所述目标GPIO引脚的电平状态设置为所述第二电平状态。S203: When the server chassis is in a powered-on state, set the level state of the target GPIO pin to the second level state.
其中,当服务器机箱处于上电状态时,说明服务器处于工作状态,此时打开服务器机箱将会影响服务器正常工作,因此可以在服务器机箱上电时将目标GPIO引脚的电平状态设置为所述第二电平状态,以便将服务器机箱锁设置为上锁状态。Among them, when the server chassis is powered on, it means the server is in working state. Opening the server chassis at this time will affect the normal operation of the server. Therefore, when the server chassis is powered on, the level state of the target GPIO pin can be set to the above A second level state to set the server chassis lock to the locked state.
S204:按照预设周期更新服务器机箱开关记录;S204: Update the server chassis switch record according to a preset cycle;
其中,所述服务器机箱开关记录包括所述服务器机箱锁处于所述解锁状态和/或所述上锁状态对应的时间信息。服务器机箱开关记录可以便于工作人员查询服务器机箱开关记录。The server chassis switch record includes time information corresponding to when the server chassis lock is in the unlocked state and/or the locked state. The server chassis switch record can facilitate the staff to query the server chassis switch record.
下面通过在实际应用中的实施例说明上述实施例描述的流程。The processes described in the above embodiments are described below through embodiments in practical applications.
请参见图3,图3为本申请实施例所提供的一种机箱上锁和解锁的控制流程图。在服务器主板上设置一根GPIO引脚通过电平高低来控制机箱的解锁开锁。主板上的BMC负责接受IPMI命令,BMC依据IPMI命令的内容来控制此根GPIO针脚的电平高低。此GPIO引脚默认为高电平,在高电平时为上锁状态。当服务器上电时,该GPIO引脚默认为高电平,因此机箱将会自动上锁,需透过IPMI命令让BMC将此GPIO引脚改为低电平方可解锁,解锁后才能开启机箱。Please refer to FIG. 3 . FIG. 3 is a control flowchart for locking and unlocking a chassis according to an embodiment of the present application. Set a GPIO pin on the server motherboard to control the unlocking and unlocking of the chassis through the level of high and low. The BMC on the motherboard is responsible for accepting the IPMI command, and the BMC controls the level of the root GPIO pin according to the content of the IPMI command. This GPIO pin is high by default, and is locked when high. When the server is powered on, the GPIO pin is at a high level by default, so the chassis will be locked automatically. You need to make the BMC change this GPIO pin to a low level through the IPMI command to unlock, and the chassis can be opened after unlocking.
请参见图4,图4为本申请实施例所提供的一种有限状态机工作原理图。机箱在没有上电的时候是处于解锁状态,方便作业人员更换内部组件,当机箱上电后,主板硬件设计将使机箱锁立即上锁。Referring to FIG. 4 , FIG. 4 is a working principle diagram of a finite state machine provided by an embodiment of the present application. The chassis is unlocked when it is not powered on, which is convenient for operators to replace internal components. When the chassis is powered on, the hardware design of the motherboard will lock the chassis lock immediately.
本实施例将可以取代原本使用Chassis Intrusion的监视机制,而且不需要多浪费GPIO引脚,仅需将原先的引脚的输入属性改成输出属性,并且搭配上锁组件即可达成。通过本实施例可以化被动为主动,避免服务器的机箱被打开,而不是在事后去追查是谁开启了机箱。This embodiment can replace the original monitoring mechanism using Chassis Intrusion, and does not need to waste more GPIO pins. It only needs to change the input attribute of the original pin to the output attribute, and it can be achieved by matching the lock component. This embodiment can turn passive into active, avoid opening the chassis of the server, instead of tracking down who opened the chassis after the event.
本实施例可以确保服务器在待机状态时,机箱无法任意被打开,可以减少服务器内部所安装的元器件被拔除的风险。对于服务器的物理安全,由被动监视改成主动防护。This embodiment can ensure that when the server is in a standby state, the chassis cannot be opened arbitrarily, thereby reducing the risk of removing components installed in the server. For the physical security of servers, passive monitoring has been changed to active protection.
请参见图5,图5为本申请实施例所提供的一种服务器机箱锁的控制系统的结构示意图;Please refer to FIG. 5, which is a schematic structural diagram of a control system for a server chassis lock provided by an embodiment of the present application;
该系统可以包括:The system can include:
状态确定模块100,用于接收机箱锁控制指令,并根据所述机箱锁控制指令确定服务器机箱锁的目标状态;a state determination module 100, configured to receive a chassis lock control instruction, and determine a target state of the server chassis lock according to the chassis lock control instruction;
引脚电平调整模块200,用于根据所述目标状态设置服务器主板上的目标GPIO引脚的电平状态,以便控制所述服务器机箱锁解锁或上锁;The pin level adjustment module 200 is used to set the level state of the target GPIO pin on the server motherboard according to the target state, so as to control the server chassis lock to be unlocked or locked;
其中,当所述目标GPIO引脚的电平状态为所述第一电平状态时所述服务器机箱锁为解锁状态,当所述目标GPIO引脚的电平状态为所述第二电平状态时所述服务器机箱锁为上锁状态。Wherein, when the level state of the target GPIO pin is the first level state, the server chassis lock is in an unlocked state, and when the level state of the target GPIO pin is the second level state The server chassis lock is in the locked state.
本实施例将GPIO引脚的输入属性改为输出属性,根据接收到的机箱锁控制指令确定需要服务器机箱锁需要达到的目标状态,并根据目标状态设置GPIO引脚的电平状态。本实施例中服务器机箱锁的上锁/解锁状态根据GPIO引脚的电平状态改变,因此可以实现通过根据机箱锁控制命令设置GPIO引脚电平实现服务器机箱的开锁和解锁,能够避免机箱被非法入侵。In this embodiment, the input attribute of the GPIO pin is changed to the output attribute, the target state that needs to be achieved by the server chassis lock is determined according to the received chassis lock control instruction, and the level state of the GPIO pin is set according to the target state. In this embodiment, the lock/unlock state of the server chassis lock is changed according to the level state of the GPIO pin. Therefore, the server chassis can be unlocked and unlocked by setting the GPIO pin level according to the chassis lock control command, which can prevent the chassis from being locked and unlocked. trespass.
进一步的,还包括:Further, it also includes:
记录模块,用于按照预设周期更新服务器机箱开关记录;其中,所述服务器机箱开关记录包括所述服务器机箱锁处于所述解锁状态和/或所述上锁状态对应的时间信息。A recording module, configured to update a server chassis switch record according to a preset period; wherein the server chassis switch record includes time information corresponding to the server chassis lock being in the unlocked state and/or the locked state.
进一步的,还包括:Further, it also includes:
上电保护模块,用于当服务器机箱处于上电状态时,将所述目标GPIO引脚的电平状态设置为所述第二电平状态。The power-on protection module is configured to set the level state of the target GPIO pin to the second level state when the server chassis is in the power-on state.
进一步的,所述服务器机箱锁为电磁门吸锁。Further, the server chassis lock is an electromagnetic door suction lock.
进一步的,还包括:Further, it also includes:
提示模块,用于当所述目标GPIO引脚的电平状态为第一电平状态时,播放相应的提示音。The prompt module is used to play a corresponding prompt sound when the level state of the target GPIO pin is the first level state.
进一步的,所述机箱锁控制指令具体为IPMI指令。Further, the chassis lock control instruction is specifically an IPMI instruction.
由于系统部分的实施例与方法部分的实施例相互对应,因此系统部分的实施例请参见方法部分的实施例的描述,这里暂不赘述。Since the embodiments of the system part correspond to the embodiments of the method part, for the embodiments of the system part, please refer to the description of the embodiments of the method part, which will not be repeated here.
本申请还提供了一种计算机可读存储介质,其上存有计算机程序,该计算机程序被执行时可以实现上述实施例所提供的步骤。该存储介质可以包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed, the steps provided by the above embodiments can be implemented. The storage medium may include: U disk, removable hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes.
本申请还提供了一种服务器,可以包括设置于服务器主板的BMC和服务器机箱锁;其中,设置于服务器主板的BMC用于接收机箱锁控制指令,并根据所述机箱锁控制指令确定服务器机箱锁的目标状态;还用于根据所述目标状态设置所述服务器主板上的目标GPIO引脚的电平状态,以便控制所述服务器机箱锁解锁或上锁;所述服务器机箱锁用于当所述目标GPIO引脚的电平状态为所述第一电平状态时,开启锁结构以使所述服务器机箱锁为解锁状态;还用于当所述目标GPIO引脚的电平状态为所述第二电平状态时,闭合锁结构以使所述服务器机箱锁为上锁状态。当然所述服务器还可以包括各种网络接口,电源等组件。The present application also provides a server, which may include a BMC disposed on the server mainboard and a server chassis lock; wherein the BMC disposed on the server mainboard is used to receive a chassis lock control instruction, and determine the server chassis lock according to the chassis lock control instruction The target state; also used to set the level state of the target GPIO pin on the server motherboard according to the target state, so as to control the server chassis lock to unlock or lock; the server chassis lock is used when the When the level state of the target GPIO pin is the first level state, the lock structure is opened to make the server chassis lock be the unlocked state; it is also used for when the level state of the target GPIO pin is the first level state. In the two-level state, the locking structure is closed to make the server chassis lock in the locked state. Of course, the server may also include various network interfaces, power supplies and other components.
说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的系统而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以对本申请进行若干改进和修饰,这些改进和修饰也落入本申请权利要求的保护范围内。The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the various embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant part can be referred to the description of the method. It should be pointed out that for those of ordinary skill in the art, without departing from the principles of the present application, several improvements and modifications can also be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.
还需要说明的是,在本说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的状况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these entities or operations. There is no such actual relationship or sequence between operations. Moreover, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device that includes a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article, or device that includes the element.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910568211.8A CN110399753A (en) | 2019-06-27 | 2019-06-27 | Control method, system, storage medium and server for server chassis lock |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910568211.8A CN110399753A (en) | 2019-06-27 | 2019-06-27 | Control method, system, storage medium and server for server chassis lock |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110399753A true CN110399753A (en) | 2019-11-01 |
Family
ID=68324228
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910568211.8A Pending CN110399753A (en) | 2019-06-27 | 2019-06-27 | Control method, system, storage medium and server for server chassis lock |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110399753A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111737761A (en) * | 2020-06-24 | 2020-10-02 | 中国联合网络通信集团有限公司 | Remote signing device, method and readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101241396A (en) * | 2007-02-06 | 2008-08-13 | 鸿富锦精密工业(深圳)有限公司 | key lockable keyboard |
CN101276385A (en) * | 2007-03-27 | 2008-10-01 | 鸿富锦精密工业(深圳)有限公司 | Computer case and its matching keyboard |
CN101351007A (en) * | 2008-09-09 | 2009-01-21 | 深圳华为通信技术有限公司 | Method and apparatus for implementing one-key type computer opening/closing |
US20160239415A1 (en) * | 2009-10-30 | 2016-08-18 | Iii Holdings 2, Llc | Remote memory access functionality in a cluster of data processing nodes |
CN108170245A (en) * | 2018-01-25 | 2018-06-15 | 郑州云海信息技术有限公司 | Control system, method and the server management system of server physical button operation |
-
2019
- 2019-06-27 CN CN201910568211.8A patent/CN110399753A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101241396A (en) * | 2007-02-06 | 2008-08-13 | 鸿富锦精密工业(深圳)有限公司 | key lockable keyboard |
CN101276385A (en) * | 2007-03-27 | 2008-10-01 | 鸿富锦精密工业(深圳)有限公司 | Computer case and its matching keyboard |
CN101351007A (en) * | 2008-09-09 | 2009-01-21 | 深圳华为通信技术有限公司 | Method and apparatus for implementing one-key type computer opening/closing |
US20160239415A1 (en) * | 2009-10-30 | 2016-08-18 | Iii Holdings 2, Llc | Remote memory access functionality in a cluster of data processing nodes |
CN108170245A (en) * | 2018-01-25 | 2018-06-15 | 郑州云海信息技术有限公司 | Control system, method and the server management system of server physical button operation |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111737761A (en) * | 2020-06-24 | 2020-10-02 | 中国联合网络通信集团有限公司 | Remote signing device, method and readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110943860B (en) | BMC (baseboard management controller) firmware updating method and system, electronic equipment and storage medium | |
US20080126439A1 (en) | Change verification in a configuration management database | |
US20100024001A1 (en) | Securing Blade Servers In A Data Center | |
KR20150023950A (en) | Contextual history of computing objects | |
CN103827878B (en) | Automate Password Management | |
CN111371752A (en) | Remote monitoring method, device, equipment and medium for server | |
US7979867B2 (en) | Managing a device in a distributed file system, using plug and play | |
JP5064912B2 (en) | Management apparatus, network system, program, and management method | |
CN110399170A (en) | A SATA hard disk port management method, system and related components | |
US10977379B1 (en) | Utilizing canary data to identify improper data access | |
CN118041687A (en) | Perception safety protection system and method based on network port plugging equipment | |
US12067121B2 (en) | Trusted boot method and apparatus, electronic device, and readable storage medium | |
US10146952B2 (en) | Systems and methods for dynamic root of trust measurement in management controller domain | |
CN110399753A (en) | Control method, system, storage medium and server for server chassis lock | |
US11100238B2 (en) | Systems and methods for generating policy coverage information for security-enhanced information handling systems | |
US20180039797A1 (en) | Systems and methods for dynamic external input/output port screening | |
US9043932B2 (en) | Managing physical presence across multiple blades | |
US11226862B1 (en) | System and method for baseboard management controller boot first resiliency | |
US11340796B2 (en) | Method for managing sleep mode at a data storage device and system therefor | |
US10101872B2 (en) | Operating system events of a kiosk device | |
US12101320B2 (en) | Managing on-premises and off-premises access control | |
US11347321B1 (en) | Security hardened function keys and indicators | |
CN113127823B (en) | A management method, system and medium for local serial port login and authority | |
CN109543420B (en) | Permission configuration method and device based on sud, electronic equipment and storage medium | |
US12141287B2 (en) | Enabling flexible policies for BIOS settings access with role-based authentication |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20191101 |