CN110119345A - A kind of method of instant recording USB port operation log - Google Patents

A kind of method of instant recording USB port operation log Download PDF

Info

Publication number
CN110119345A
CN110119345A CN201910304471.4A CN201910304471A CN110119345A CN 110119345 A CN110119345 A CN 110119345A CN 201910304471 A CN201910304471 A CN 201910304471A CN 110119345 A CN110119345 A CN 110119345A
Authority
CN
China
Prior art keywords
usb
port
data
bmc
information
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.)
Withdrawn
Application number
CN201910304471.4A
Other languages
Chinese (zh)
Inventor
赵士亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Guo Xinheng Space Science And Technology Ltd
Original Assignee
Shenzhen Guo Xinheng Space Science And Technology Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Guo Xinheng Space Science And Technology Ltd filed Critical Shenzhen Guo Xinheng Space Science And Technology Ltd
Priority to CN201910304471.4A priority Critical patent/CN110119345A/en
Publication of CN110119345A publication Critical patent/CN110119345A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention provides a kind of methods of instant recording USB port operation log, comprising the following steps: S1, initial configuration create the port device under USB controller and catalogue;S2, USB device information collect, detecting USB device insertion perhaps extract state setting insertion mark perhaps extract mark and by the insertion of the USB device detected identify or extract mark be sent to BMC;S3, BMC record USB port operation log, and BMC receives the insertion mark of USB device or extracts and identifies and log system is recorded.The beneficial effects of the present invention are: under operating system, BIOS and BMC cooperation; allow equipment plugging condition on BMC immediately monitoring USB port; and the details of recording equipment; realize the instant recording of USB port operation log; energy effective monitoring illegal user is to the modification of system, the operation of data file; safeguards system safety, protects data safety.

Description

Method for instantly recording USB port operation log
Technical Field
The invention relates to a USB port operation log, in particular to a method for instantly recording the USB port operation log.
Background
On the server motherboard, the BMC (baseboard management controller) is responsible for the management of the entire motherboard. Through the network communication function, hardware device information can be displayed, for example, processor information including main frequency, model and the like, memory information including capacity, frequency, model and the like, log information is mainly transmitted to the BMC through a BIOS program in the starting process, or the BMC is directly communicated with the device through a communication bus directly connected with the hardware device to obtain the log information. Various operation logs of the system can be recorded, and the operation condition of the system, such as the logs of startup and shutdown, and the logs of abnormal faults, can be described by registering and recording through hardware, BIOS or other external software. Through the remote operation management function of the BMC, a user can comprehensively manage hardware equipment information and log information of the whole mainboard system without going to a machine station for local operation.
The BMC remote management function provides convenience for system management and monitoring for users, but cannot monitor USB devices.
No in-place signal exists in a main board USB port interface pin, an independent power supply, a power supply and a ground wire are only one pin of interface communication, and hardware design cannot know whether USB equipment is in place or not. The USB device also has no additional communication interface and BMC information, and the BMC cannot directly acquire the presence or absence of the USB device and the device information. The USB device belongs to a plug-and-play type, and when hot plugging is carried out under an operating system, no interface program of the operating system reads the USB device information and transmits the USB device information to the BMC. Therefore, on the current mainboard, the BMC does not monitor the USB port equipment. The USB keyboard and the mouse are inserted into the mainboard system for input operation, the USB storage device is inserted into the mainboard system for input and output operation of data files, and after the USB device is removed, no log information exists, so that potential huge risks are brought to system safety, data loss and the like.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a method for instantly recording the operation log of a USB port.
The invention provides a method for instantly recording USB port operation logs, which comprises the following steps:
s1, initializing configuration, and creating a USB controller and port equipment under a directory;
s2, collecting USB equipment information, detecting the USB equipment plugging or unplugging state, setting a plugging identifier or unplugging identifier, and sending the detected plugging identifier or unplugging identifier of the USB equipment to the BMC;
and S3, the BMC records the USB port operation log, and the BMC receives the plug-in identifier or the plug-out identifier of the USB device and records the plug-in identifier or the plug-out identifier to a log system.
As a further improvement of the present invention, step S1 includes the following sub-steps:
s11, starting;
s12, creating a USB controller;
s13, configuring USB controller resources;
s14, creating Root Hub equipment;
s15, configuring the Root Hub device address;
s16, creating a USB port;
s17, configuring a USB port;
s18, judging whether all the steps are finished, if not, returning to the step S16, and if so, entering the next step;
and S19, ending.
As a further improvement of the present invention, in step S1, a USB controller is created under the PCI bus of the system bus to ensure that the bus directory where the USB controller is located is correct; configuring the equipment address of the USB controller, configuring power resources and state information, and declaring that a PCI configuration space can be accessed; under a USB controller directory, creating a Root Hub device; configuring the address of the Root Hub device, and configuring power source resources and state information; establishing a USB port under a Root Hub device directory to represent an external USB device; program information configuring the address, connectivity, user visibility of the USB port.
As a further improvement of the present invention, in step S16, USB ports are created one by one according to the number of USB ports supported by the USB controller, and the USB ports are distinguished from each other according to port addresses.
As a further improvement of the present invention, step S2 includes the following sub-steps:
s21, starting;
s22, the operating system monitors whether the USB device is plugged in or pulled out from the USB port, if no USB device is plugged in or pulled out, the step returns to S22, and if the USB device is plugged in or pulled out, the next step is carried out;
s23, storing the port address into the global memory space;
s24, triggering soft SMI interruption;
s25, calling an interrupt executive program;
s26, reading a port address from the global memory space;
s27, reading the port state according to the port address;
s28, judging whether the USB port has USB equipment, if so, setting a plug-in identifier and entering the next step, and if not, setting a plug-out identifier and entering the next step;
s29, sending the plug-in identifier or the pull-out identifier to the BMC;
s210, exiting the SMI interrupt program;
and S211, ending.
As a further improvement of the present invention, the setting of the insertion flag in step S28 includes the following substeps:
s2811, setting USB equipment insertion mark data;
s2812, configuring USB command data;
s2813, sending a command to acquire a device descriptor;
s2814, extracting manufacturers, names and serial number addresses;
s2815, sending a command to acquire a character string descriptor;
s2816, arranging the data according to the format.
As a further improvement of the present invention, the setting of the pullout flag in step S28 includes the following substeps:
s2821, setting USB equipment pull-out mark data;
and S2822, arranging the data according to the format.
As a further improvement of the present invention, in step S2, after entering the operating system, the operating system starts to monitor whether the USB port has a USB device plugged in or unplugged; if a USB device is plugged into or pulled out of the USB port, the operating system enters a USB controller directory, and stores the detailed address of the USB port into a global memory space under the directory of the Root Hub device and the USB port of the USB device; in step S24, writing a soft interrupt value into the SMI interrupt port, triggering a soft SMI interrupt, and transferring control to the BIOS; calling and executing an interrupt execution program, wherein in the interrupt execution program, firstly calling a service program to read a global memory space address, acquiring a detailed address of a USB port, reading a connection state register of the port of a USB controller according to the port address, judging whether a device is connected to the port, if the device is connected, indicating an insertion operation, if the device is not connected, indicating a pulling operation, if the device is pulled, setting a device pulling mark in communication data, setting the detailed address information of the port in the communication data, previously defining the format of the communication data with BMC, if the device is inserted, setting a device insertion mark in the communication data, setting the detailed address information of the port in the communication data, and then configuring USB command data for acquiring descriptors, including USB controller address information, port address information and device transmission speed, allocating a memory data space, then sending a command for acquiring a device descriptor to the USB device, extracting USB device manufacturer, product name and product serial number data address information from data returned by the device, configuring USB command data for acquiring a character string, wherein the command data comprises the USB device manufacturer, the product name and the product serial number data address information, sending the command for acquiring the character string to the USB device, transmitting the character string data of the USB device manufacturer, the product name and the product serial number in the returned data into communication data, defining the communication data format with BMC in advance, sending the data to the BMC according to the command agreed with the BMC in advance after finishing the arrangement of the communication data of the inserted or pulled device, exiting the SMI interrupt program, and returning the control right to an operating system.
As a further improvement of the present invention, step S3 includes the following sub-steps:
s31, starting;
s32, the BMC judges whether a USB port command exists, if not, the step returns to S32, and if so, the next step is carried out;
s33, receiving USB equipment information data;
s34, analyzing the data, if the data is in place, displaying the USB equipment information on a BMC interface, registering a USB equipment insertion log, and if the data is not in place, removing the BMC interface from the USB equipment information, and registering a USB equipment pull-out log;
and S35, ending.
As a further improvement of the present invention, in step S3, after the BMC initialization is completed, the BMC starts monitoring whether a command of USB device information is received, if the command of USB device information is received, the incoming data is parsed according to a format predefined with the BIOS, first, whether the USB port is a plug-in or a plug-out operation is determined according to the plug-in and plug-out flag data, if the USB device is a plug-out operation, the USB device is not in place, the corresponding device information is removed from the BMC interface according to the detailed address information of the port, and the operation information of the USB device plug-out motherboard is recorded in the log system, and if the USB device is a plug-in operation, the manufacturer, the product name, and the serial number data information are parsed out, and the detailed address information of the port is displayed on the BMC interface, and the operation information of the USB device plug-in motherboard is recorded.
The invention has the beneficial effects that: through the scheme, under the cooperation of the operating system, the BIOS and the BMC, the BMC is enabled to monitor the plugging and unplugging condition of the equipment on the USB port in real time and record detailed information of the equipment, so that the real-time recording of the operation log of the USB port is realized, the modification of an illegal user to the system and the operation of a data file can be effectively monitored, the system safety is guaranteed, and the data safety is protected.
Drawings
FIG. 1 is a diagram illustrating a method for instantly recording an operation log of a USB port according to the present invention.
FIG. 2 is a flowchart of an initialization configuration of a method for logging USB port operation instantly according to the present invention.
FIG. 3 is a flow chart of USB device information collection for a method of logging USB port operations instantly according to the present invention.
FIG. 4 is a flowchart illustrating a method for recording an operation log of a USB port by a BMC according to the present invention.
Detailed Description
The invention is further described with reference to the following description and embodiments in conjunction with the accompanying drawings.
The nouns are explained as follows:
BIOS: the Basic Input Output System is mainly used for initializing and detecting various hardware devices in the computer starting process.
BMC: a board Management Controller (Baseboard Management Controller). The IPMI standard is built in a mainboard and supports the IPMI standard of the industry standard. The functions provided by the BMC include: local and remote diagnostics, console support, configuration management, hardware management, and troubleshooting.
USB: universal Serial Bus (usb) is an external Bus standard used to standardize the connection and communication between computers and external devices.
SMI (System Management Interrupt) System manages interrupts.
As shown in fig. 1, a method for instantly recording an operation log of a USB port includes the following steps:
s1, initializing configuration, and creating a USB controller and port equipment under a directory;
step S1 includes the following substeps:
s11, starting;
s12, creating a USB controller;
s13, configuring USB controller resources;
s14, creating Root Hub equipment;
s15, configuring the Root Hub device address;
s16, creating a USB port;
s17, configuring a USB port;
s18, judging whether all the steps are finished, if not, returning to the step S16, and if so, entering the next step;
s19, ending;
s2, collecting USB equipment information, detecting the USB equipment plugging or unplugging state, setting a plugging identifier or unplugging identifier, and sending the detected plugging identifier or unplugging identifier of the USB equipment to the BMC;
step S2 includes the following substeps:
s21, starting;
s22, the operating system monitors whether the USB device is plugged in or pulled out from the USB port, if no USB device is plugged in or pulled out, the step returns to S22, and if the USB device is plugged in or pulled out, the next step is carried out;
s23, storing the port address into the global memory space;
s24, triggering soft SMI interruption;
s25, calling an interrupt executive program;
s26, reading a port address from the global memory space;
s27, reading the port state according to the port address;
s28, judging whether the USB port has USB equipment, if so, setting a plug-in identifier and entering the next step, and if not, setting a plug-out identifier and entering the next step;
s29, sending the plug-in identifier or the pull-out identifier to the BMC;
s210, exiting the SMI interrupt program;
s211, ending;
wherein,
setting the insertion flag in step S28 includes the following sub-steps:
s2811, setting USB equipment insertion mark data;
s2812, configuring USB command data;
s2813, sending a command to acquire a device descriptor;
s2814, extracting manufacturers, names and serial number addresses;
s2815, sending a command to acquire a character string descriptor;
s2816, arranging data according to formats;
the setting of the pullout flag in step S28 includes the following substeps:
s2821, setting USB equipment pull-out mark data;
s2822, sorting data according to formats;
s3, the BMC records the USB port operation log, receives the plug-in identification or the plug-out identification of the USB device and records the plug-in identification or the plug-out identification to a log system;
s31, starting;
s32, the BMC judges whether a USB port command exists, if not, the step returns to S32, and if so, the next step is carried out;
s33, receiving USB equipment information data;
s34, analyzing the data, if the data is in place, displaying the USB equipment information on a BMC interface, registering a USB equipment insertion log, and if the data is not in place, removing the BMC interface from the USB equipment information, and registering a USB equipment pull-out log;
and S35, ending.
The method for recording the USB port operation logs in real time provided by the invention provides an effective solution for the defect that the BMC cannot monitor the function of the USB port equipment in real time. Under the cooperation of the operating system, the BIOS and the BMC, the BMC is enabled to monitor the plugging and unplugging condition of the equipment on the USB port in real time, record detailed information of the equipment, effectively monitor modification of an illegal user to the system and operation of a data file, guarantee system safety and protect data safety.
As shown in fig. 1, a device (i.e., a device where a USB port is located) creates a configuration module, creates a USB controller and a port device under a directory, configures a power supply, an address, a resource, and the like, a USB device information collection module is responsible for detecting a USB device insertion or extraction state, sets an insertion or extraction identifier, if the USB device is inserted, needs to collect detailed device information of the USB device, an information transmission module arranges information data according to a predetermined format and transmits the information data to a BMC, an information receiving and processing module displays the received detailed USB device information on a BMC management interface, and if the USB device is extracted from a hard disk, removes the detailed information of the corresponding USB device, and records log information of the USB device insertion or extraction.
As shown in fig. 2, the initialization configuration process specifically includes: the method comprises the steps of creating a USB controller device below a PCI bus of a system bus, ensuring that a bus directory where the device is located is correct, configuring a device address of the USB controller, configuring power resources and state information, and declaring that a PCI configuration space can be accessed. The method comprises the steps of creating a Root Hub device under a USB controller (USB controller device) directory, configuring an address of the Root Hub device, configuring power resources and state information, creating a USB port device under the Root Hub device directory, representing an externally connected USB device, configuring program information such as the address, the connection capacity and the user visibility of a port, creating port devices one by one according to the number of the port devices supported by the USB controller, and distinguishing different port devices according to port addresses.
As shown in fig. 3, the USB device information collecting process specifically includes: after entering the operating system, the operating system starts to monitor whether the USB port is plugged with the device or not, and does not perform any other operation action if the USB port is not plugged with the device or not. If a USB device is plugged into or unplugged from a USB port, an operating system enters a USB controller device directory, then a Root Hub device enters the USB port (USB port device) of the plugged-in or unplugged device under the directory, a program is executed, a detailed address of the port is stored in a global memory space, a soft interrupt value is written into an SMI interrupt port, soft SMI interrupt is triggered, the control right is transferred to a BIOS, and the execution of an interrupt execution program is called. In the interrupt program, firstly calling a service program to read a global memory space address, acquiring a port detailed address, reading a connection state register of a port of the USB controller according to the port address, judging whether equipment is connected to the port, if the equipment is connected to the port, indicating that the equipment is in an insertion operation, and if the equipment is not connected to the port, indicating that the equipment is in a pull-out operation. If the equipment is pulled out, the pulled-out mark of the equipment is set in the communication data, the detailed address information of the port is set in the communication data, and the communication data format is defined with the BMC in advance. Setting a device insertion flag in communication data and detailed address information of a port in the communication data if a device insertion operation is performed, and then configuring USB command data including USB controller address information, port address information, device transfer speed, etc. for acquiring descriptors, allocating memory data space, and then transmitting a command for acquiring device descriptors to the USB device, extracting USB equipment manufacturer, product name and product serial number data address information from data returned by the equipment, configuring USB command data for acquiring the character string, wherein the command data comprises the USB equipment manufacturer, the product name and the product serial number data address information, sending a command for acquiring the character string to the USB equipment, transmitting the USB equipment manufacturer, the product name and the product serial number character string data into communication data in the returned data, and defining the communication data format with BMC in advance. After finishing the arrangement of the communication data of the inserted or pulled device, sending the data to the BMC according to a command appointed with the BMC in advance, exiting the SMI interrupt program, and returning the control right to the operating system.
As shown in fig. 4, the recording, by the BMC, the operation log of the USB port specifically includes: after the initialization of the BMC is completed, monitoring whether a command of USB equipment information is received or not, and if the command is not received, not doing any operation. If receiving the USB device information command, analyzing the transmitted data according to a format which is defined by the BIOS in advance, and judging whether the USB port is inserted or pulled out according to the insertion and pulling mark data. If the USB device is unplugged, the USB device is not in place, corresponding device information is removed from the BMC interface according to the detailed address information of the port, and meanwhile, the operation information of the USB device unplugging the mainboard is recorded into a log system. If the USB device is in place during the insertion operation, the manufacturer, the product name and the serial number data information are analyzed, the detailed address information of the port is displayed on a BMC interface, and meanwhile, the operation information of the USB device inserted into the mainboard is recorded into a log system. Through the BMC management interface, the equipment information of the current system can be checked, and through the log system, a user can conveniently look up the plugging operation information of the equipment of the USB port according to the time axis.
The method for recording the USB port operation log in real time provided by the invention realizes the function of monitoring the USB port operation in real time through the cooperation of the operating system, the BIOS and the BMC. And monitoring the insertion and extraction operations of the USB device in real time, and displaying the detailed information of the USB device on a BMC interface in a real-time and thinner mode. The USB port device plug-in and plug-out operation is recorded in real time on the basis of a time axis, so that the USB port device is convenient for a user to look up, the system safety is guaranteed, and the data safety is guaranteed.
The foregoing is a more detailed description of the invention in connection with specific preferred embodiments and it is not intended that the invention be limited to these specific details. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (10)

1. A method for instantly recording USB port operation logs is characterized by comprising the following steps:
s1, initializing configuration, and creating a USB controller and port equipment under a directory;
s2, collecting USB equipment information, detecting the USB equipment plugging or unplugging state, setting a plugging identifier or unplugging identifier, and sending the detected plugging identifier or unplugging identifier of the USB equipment to the BMC;
and S3, the BMC records the USB port operation log, and the BMC receives the plug-in identifier or the plug-out identifier of the USB device and records the plug-in identifier or the plug-out identifier to a log system.
2. The method for instantly recording the USB port operation log as claimed in claim 1, wherein the step S1 comprises the following sub-steps:
s11, starting;
s12, creating a USB controller;
s13, configuring USB controller resources;
s14, creating Root Hub equipment;
s15, configuring the Root Hub device address;
s16, creating a USB port;
s17, configuring a USB port;
s18, judging whether all the steps are finished, if not, returning to the step S16, and if so, entering the next step;
and S19, ending.
3. The method for instantly logging the operation log of the USB port according to claim 2, wherein: in step S1, a USB controller is created under the PCI bus of the system bus to ensure that the bus directory where the USB controller is located is correct; configuring the equipment address of the USB controller, configuring power resources and state information, and declaring that a PCI configuration space can be accessed; under a USB controller directory, creating a Root Hub device; configuring the address of the Root Hub device, and configuring power source resources and state information; establishing a USB port under a Root Hub device directory to represent an external USB device; program information configuring the address, connectivity, user visibility of the USB port.
4. The method for instantly logging the operation log of the USB port according to claim 2, wherein: in step S16, USB ports are created one by one according to the number of USB ports supported by the USB controller, and the USB ports are distinguished from one another according to port addresses.
5. The method for instantly recording the USB port operation log as claimed in claim 1, wherein the step S2 comprises the following sub-steps:
s21, starting;
s22, the operating system monitors whether the USB device is plugged in or pulled out from the USB port, if no USB device is plugged in or pulled out, the step returns to S22, and if the USB device is plugged in or pulled out, the next step is carried out;
s23, storing the port address into the global memory space;
s24, triggering soft SMI interruption;
s25, calling an interrupt executive program;
s26, reading a port address from the global memory space;
s27, reading the port state according to the port address;
s28, judging whether the USB port has USB equipment, if so, setting a plug-in identifier and entering the next step, and if not, setting a plug-out identifier and entering the next step;
s29, sending the plug-in identifier or the pull-out identifier to the BMC;
s210, exiting the SMI interrupt program;
and S211, ending.
6. The method for instantly recording the USB port operation log as claimed in claim 5, wherein the setting of the insertion flag in the step S28 comprises the sub-steps of:
s2811, setting USB equipment insertion mark data;
s2812, configuring USB command data;
s2813, sending a command to acquire a device descriptor;
s2814, extracting manufacturers, names and serial number addresses;
s2815, sending a command to acquire a character string descriptor;
s2816, arranging the data according to the format.
7. The method for instantly recording the USB port operation log according to claim 6, wherein the setting of the unplugging flag in step S28 comprises the following sub-steps:
s2821, setting USB equipment pull-out mark data;
and S2822, arranging the data according to the format.
8. The method of claim 7, wherein the method further comprises: in step S2, after entering the operating system, the operating system starts monitoring whether the USB port has a USB device plugged in or unplugged; if a USB device is plugged into or pulled out of the USB port, the operating system enters a USB controller directory, and stores the detailed address of the USB port into a global memory space under the directory of the Root Hub device and the USB port of the USB device; in step S24, writing a soft interrupt value into the SMI interrupt port, triggering a soft SMI interrupt, and transferring control to the BIOS; calling and executing an interrupt execution program, wherein in the interrupt execution program, firstly calling a service program to read a global memory space address, acquiring a detailed address of a USB port, reading a connection state register of the port of a USB controller according to the port address, judging whether a device is connected to the port, if the device is connected, indicating an insertion operation, if the device is not connected, indicating a pulling operation, if the device is pulled, setting a device pulling mark in communication data, setting the detailed address information of the port in the communication data, previously defining the format of the communication data with BMC, if the device is inserted, setting a device insertion mark in the communication data, setting the detailed address information of the port in the communication data, and then configuring USB command data for acquiring descriptors, including USB controller address information, port address information and device transmission speed, allocating a memory data space, then sending a command for acquiring a device descriptor to the USB device, extracting USB device manufacturer, product name and product serial number data address information from data returned by the device, configuring USB command data for acquiring a character string, wherein the command data comprises the USB device manufacturer, the product name and the product serial number data address information, sending the command for acquiring the character string to the USB device, transmitting the character string data of the USB device manufacturer, the product name and the product serial number in the returned data into communication data, defining the communication data format with BMC in advance, sending the data to the BMC according to the command agreed with the BMC in advance after finishing the arrangement of the communication data of the inserted or pulled device, exiting the SMI interrupt program, and returning the control right to an operating system.
9. The method for instantly recording the USB port operation log as claimed in claim 1, wherein the step S3 comprises the following sub-steps:
s31, starting;
s32, the BMC judges whether a USB port command exists, if not, the step returns to S32, and if so, the next step is carried out;
s33, receiving USB equipment information data;
s34, analyzing the data, if the data is in place, displaying the USB equipment information on a BMC interface, registering a USB equipment insertion log, and if the data is not in place, removing the BMC interface from the USB equipment information, and registering a USB equipment pull-out log;
and S35, ending.
10. The method for instantly logging the operation log of the USB port according to claim 1, wherein: in step S3, after the BMC initialization is completed, the BMC starts monitoring whether a command of USB device information is received, if the command of USB device information is received, the received data is parsed in a format predefined with the BIOS, first, according to the insertion/extraction flag data, it is determined whether the USB port is an insertion operation or an extraction operation, if the USB port is an extraction operation, the USB device is not in place, according to the detailed address information of the port, the corresponding device information is removed from the BMC interface, and at the same time, the operation information of the USB device for extracting the motherboard is recorded in the log system, and if the operation is an insertion operation, the USB device is in place, and the manufacturer, product name, and serial number data information are parsed, and together with the detailed address information of the port, displayed on the BMC interface, and at the same time, the operation information of the USB device.
CN201910304471.4A 2019-04-16 2019-04-16 A kind of method of instant recording USB port operation log Withdrawn CN110119345A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910304471.4A CN110119345A (en) 2019-04-16 2019-04-16 A kind of method of instant recording USB port operation log

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910304471.4A CN110119345A (en) 2019-04-16 2019-04-16 A kind of method of instant recording USB port operation log

Publications (1)

Publication Number Publication Date
CN110119345A true CN110119345A (en) 2019-08-13

Family

ID=67521128

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910304471.4A Withdrawn CN110119345A (en) 2019-04-16 2019-04-16 A kind of method of instant recording USB port operation log

Country Status (1)

Country Link
CN (1) CN110119345A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782287A (en) * 2020-06-30 2020-10-16 联想(北京)有限公司 Information prompting method and device and electronic equipment
CN113608987A (en) * 2021-08-10 2021-11-05 瑞庭网络技术(上海)有限公司 Method, equipment and storage medium for collecting information and backtracking to construct user behavior
CN113687997A (en) * 2020-05-19 2021-11-23 西安诺瓦星云科技股份有限公司 Data collection method, device and system
CN114416498A (en) * 2021-12-17 2022-04-29 中科可控信息产业有限公司 Log obtaining method and device, computer equipment and storage medium
CN117077227A (en) * 2023-10-16 2023-11-17 北京冠程科技有限公司 Abnormality monitoring method and system based on USB level signal

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113687997A (en) * 2020-05-19 2021-11-23 西安诺瓦星云科技股份有限公司 Data collection method, device and system
CN111782287A (en) * 2020-06-30 2020-10-16 联想(北京)有限公司 Information prompting method and device and electronic equipment
CN111782287B (en) * 2020-06-30 2023-03-21 联想(北京)有限公司 Information prompting method and device and electronic equipment
CN113608987A (en) * 2021-08-10 2021-11-05 瑞庭网络技术(上海)有限公司 Method, equipment and storage medium for collecting information and backtracking to construct user behavior
CN114416498A (en) * 2021-12-17 2022-04-29 中科可控信息产业有限公司 Log obtaining method and device, computer equipment and storage medium
CN117077227A (en) * 2023-10-16 2023-11-17 北京冠程科技有限公司 Abnormality monitoring method and system based on USB level signal
CN117077227B (en) * 2023-10-16 2024-01-23 北京冠程科技有限公司 Abnormality monitoring method and system based on USB level signal

Similar Documents

Publication Publication Date Title
CN110119345A (en) A kind of method of instant recording USB port operation log
CN112463689B (en) OCP card hot plug device, method and computer readable storage medium
CN105184179B (en) Embedded encrypted mobile storage device and operation method thereof
CN101359309A (en) Status indication apparatus for hard disc of serial connection small computer system interface and method
CN111209151A (en) Linux-based NVME SSD hot plug test method, system, terminal and storage medium
CN110134447A (en) The system and method for BMC immediate updating hard disk information based on operating system
CN112699071B (en) USB port binding structure and method based on Linux system
CN112799985B (en) USB interface control method, USB control circuit and intelligent networking equipment mainboard
CN103314365A (en) Methods and physical computer-readable storage media for initiating re-enumeration of USB 3.0 compatible devices
CN108170620A (en) A kind of server hard disk extension system and method, hard disk signal enhancing method
CN113608790A (en) Linux system based self-adaptive management method and system for serial device and storage medium
CN111382027A (en) BMC IP obtaining method and device and cabinet type server
CN105868132B (en) A kind of Digital Oscillograph Module functions expanding method and system based on usb communication
CN109086081B (en) Method, system and medium for instantly prompting in-place change of SATA (Serial advanced technology attachment) and NVMe (network video recorder) equipment
CN101321166A (en) User message management methods and systems
CN114595178A (en) External protection equipment and method for protecting HID (human interface device) keyboard and mouse equipment
CN111124985A (en) Read-only control method and device for mobile terminal
CN103761202B (en) A kind of data storage node hard disk position identification method and system
CN1975701B (en) Master machine driving external equipment method and system
WO2012026958A1 (en) Real-time usb class level decoding
CN114518984A (en) Reporting method and device of embedded point information, storage medium and terminal equipment
CN114968386B (en) Device information management method, device and equipment of electronic device
CN115934616A (en) Serial port information storage method and device, server, electronic equipment and storage medium
CN115098342A (en) System log collection method, system, terminal and storage medium
CN206193766U (en) Acquire device and electronic equipment of diagnostics

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20190813