CN110941405A - Kernel client log printing method, device, equipment and storage medium - Google Patents

Kernel client log printing method, device, equipment and storage medium Download PDF

Info

Publication number
CN110941405A
CN110941405A CN201911161219.9A CN201911161219A CN110941405A CN 110941405 A CN110941405 A CN 110941405A CN 201911161219 A CN201911161219 A CN 201911161219A CN 110941405 A CN110941405 A CN 110941405A
Authority
CN
China
Prior art keywords
function
printing
log
linked list
instruction
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.)
Granted
Application number
CN201911161219.9A
Other languages
Chinese (zh)
Other versions
CN110941405B (en
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.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry Co 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 Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201911161219.9A priority Critical patent/CN110941405B/en
Publication of CN110941405A publication Critical patent/CN110941405A/en
Application granted granted Critical
Publication of CN110941405B publication Critical patent/CN110941405B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1218Reducing or saving of used resources, e.g. avoiding waste of consumables or improving usage of hardware resources
    • G06F3/122Reducing or saving of used resources, e.g. avoiding waste of consumables or improving usage of hardware resources with regard to computing resources, e.g. memory, CPU
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1253Configuration of print job parameters, e.g. using UI at the client
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1278Dedicated interfaces to print systems specifically adapted to adopt a particular infrastructure
    • G06F3/128Direct printing, e.g. sending document file, using memory stick, printing from a camera
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a kernel client log printing method, which comprises the following steps: creating a function linked list, and adding printing function information in the function linked list; when a log printing instruction is detected, judging whether target printing function information specified by the log printing instruction exists in a function linked list or not; if the target printing function information appointed by the log printing instruction exists in the function linked list, calling a log appointed by the target printing function printing log printing instruction corresponding to the target printing function information; the method limits the logs allowed to be printed by setting the function linked list, and only prints the logs allowed to be printed during printing, thereby avoiding printing the logs in a useless state and reducing the storage space occupied by the logs; in addition, the invention also provides a kernel client log printing device, equipment and a computer readable storage medium, and the device and the equipment also have the beneficial effects.

Description

Kernel client log printing method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of file systems, in particular to a kernel client log printing method, a kernel client log printing device, kernel client log printing equipment and a computer readable storage medium.
Background
In the software debugging process, the log is widely used as a recording mode of effective information. The same is true in file system kernel debugging. The file system kernel client side realizes file reading and writing, mounting and other operations, and the operations comprise operations of printing various log information. The current file system kernel client side adopts a traditional log printing method, when each service is executed to a log printing position, corresponding printing function information is allowed to be called to execute log printing operation, and the printing function information corresponding to different services may be the same or different. Because the kernel of the file system runs a plurality of services and operates very frequently, a large amount of logs can be generated, and most logs are in a useless state under most conditions and have no value. Even if the information in the log is required to be used, only the log for a specific certain service is required to be used, and the whole log is not required to be used. Therefore, the conventional journal printing method wastes the storage space of the file system by printing all the journals and storing the journals.
Therefore, how to solve the problem that the conventional log printing method wastes the storage space of the file system is a technical problem to be solved by those skilled in the art.
Disclosure of Invention
In view of the above, the present invention provides a kernel client log printing method, a kernel client log printing apparatus, a kernel client log printing device, and a computer readable storage medium, which solve the problem that the conventional log printing method wastes the storage space of a file system.
In order to solve the technical problem, the invention provides a kernel client log printing method, which comprises the following steps:
creating a function linked list, and adding printing function information in the function linked list;
when a log printing instruction is detected, judging whether target printing function information appointed by the log printing instruction exists in the function linked list or not;
if the target printing function information appointed by the log printing instruction exists in the function linked list, calling a target printing function corresponding to the target printing function information to print the log appointed by the log printing instruction.
Optionally, adding print function information in the function linked list includes:
acquiring a function adding instruction, and determining first printing function information appointed by the function adding instruction;
and adding the first printing function information into the function linked list.
Optionally, the determining the first print function information specified by the function adding instruction includes:
analyzing the function adding instruction to obtain a first printing function number;
and determining the first printing function information by utilizing the corresponding relation between the first printing function number and a preset function.
Optionally, the method further includes:
acquiring and analyzing a function deleting instruction, and determining second printing function information appointed by the function deleting instruction;
judging whether the function linked list has the second printing function information or not;
and if the second printing function information exists in the function linked list, deleting the second printing function information from the function linked list.
Optionally, the creating a function linked list includes:
installing and operating a debugging tool, and registering a character device driver corresponding to the debugging tool;
and when a creating instruction is obtained by utilizing the character device driver, creating the function linked list.
Optionally, when a log print instruction is detected, determining whether the function linked list has target print function information specified by the log print instruction includes:
when the log printing instruction is detected, analyzing the log printing instruction to obtain a target printing function number;
determining the target printing function information by using a preset function corresponding relation and the target printing function number;
and comparing the target printing function information with the printing function information in the function linked list to judge whether the target printing function information exists in the function linked list.
The invention also provides a file system log printing device, which comprises:
the creating module is used for creating a function linked list and adding printing function information in the function linked list;
the judging module is used for judging whether target printing function information appointed by the log printing instruction exists in the function linked list or not when the log printing instruction is detected;
and the printing module is used for calling a target printing function corresponding to the target printing function information to print the log specified by the log printing instruction if the target printing function information specified by the log printing instruction exists in the function linked list.
Optionally, the creating module includes:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a function adding instruction and determining first printing function information appointed by the function adding instruction;
and the adding unit is used for adding the first printing function information into the function linked list.
The invention also provides a file system log printing device, which comprises a memory and a processor, wherein:
the memory is used for storing a computer program;
the processor is used for executing the computer program to realize the file system log printing method.
The present invention also provides a computer readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the file system log printing method described above.
The kernel client log printing method provided by the invention is characterized in that a function linked list is created, and printing function information is added in the function linked list. When the log printing instruction is detected, whether the target printing function information specified by the log printing instruction exists in the function linked list or not is judged. And if the target printing function information specified by the log printing instruction exists in the function linked list, calling the log specified by the target printing function printing log printing instruction corresponding to the target printing function information.
Therefore, the method creates the function chain table for storing the printing function information, namely the information corresponding to the printing function allowed to be called. When a log printing instruction is detected, judging whether a printing function corresponding to the log printing instruction is allowed to be called or not, namely whether the designated target printing function information is stored in a function linked list or not, and if the target printing function information is not stored in the function linked list, not printing the log designated by the log printing instruction; if the target printing function information is stored in the function linked list, the log specified by the log printing instruction is allowed to be printed, so that the log specified by the target printing function printing log printing instruction corresponding to the target printing function information is called. The log which is allowed to be printed is limited by setting the function linked list, and only the log which is allowed to be printed is printed during printing, so that the logs in a useless state can be prevented from being printed, the storage space occupied by the logs is reduced, and the problem that the storage space of a file system is wasted by a traditional log printing method is solved.
In addition, the invention also provides a kernel client log printing device, kernel client log printing equipment and a computer readable storage medium, and the kernel client log printing device, the kernel client log printing equipment and the computer readable storage medium also have the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for printing a log of a kernel client according to an embodiment of the present invention;
fig. 2 is a flow chart of adding print function information according to an embodiment of the present invention;
fig. 3 is a flowchart of deleting print function information according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a kernel client log printing apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a kernel client log printing device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of a method for printing a log of a kernel client according to an embodiment of the present invention. The method comprises the following steps:
s101: creating a function linked list, and adding printing function information in the function linked list.
It should be noted that the kernel client executes the kernel client log printing method provided by the embodiment of the present invention. The kernel client may be a kernel client within a file system, or may be a kernel client of another system. It should be noted that the function Linked list is a name of a space for storing print function information, the structure of the function Linked list may be one Linked list, and the Linked list (Linked list) is a common basic data structure, and is a linear table, and the function Linked list may also adopt other data structures. The embodiment does not limit the time for creating the function linked list, for example, the function linked list may be created when the kernel client is initialized; or the function linked list may be created upon receipt of a create instruction, which may be input by a user.
Further, in order to simplify the operation of the user, in an embodiment of the present invention, it is preferable that a debugging tool is installed and run, and a character device driver corresponding to the debugging tool is registered. Specifically, a debugging code can be acquired, the debugging code is compiled to obtain a debugging tool, the debugging tool is a user mode application program, and the user operation can be simplified by using the debugging tool. And when the character device driver is used for acquiring a creating instruction, creating a function linked list.
The printing function information is information for identifying the printing function, the corresponding log can be responded by calling the printing function, the printing function has multiple kinds, and the printing functions called by different services and different printing points may be different. The print function information may be a name of the print function, or may be a number of the print function, or may be the print function itself, as long as the print function can be identified and distinguished. After the function linked list is created, print function information may be added to the function linked list, and a print function corresponding to the print function information in the function linked list is a print function that is allowed to be called. The number and the type of the printing function information in the function linked list are not limited in this embodiment, for example, the number may only include the printing function information for printing the basic log, and the number may be one or more; or may include print function information for printing certain specific service logs, which may be one or more in number as well. It should be noted that when there is no need to print any log, no print function information may be added in the function linked list, but in practical applications, in order to record the running status of the kernel client itself or to know the running status of some services, it is necessary to print a basic log or some specific logs.
S102: when the log printing instruction is detected, whether the target printing function information specified by the log printing instruction exists in the function linked list or not is judged.
The log printing instruction is used to instruct the kernel client to print a log, and a specific generation method of the log printing instruction is not limited in this embodiment, for example, a log printing point exists in some services, and the log printing instruction is generated when the service is executed to the log printing point; or the log print instruction may be generated at a preset cycle. The log print instruction includes information indicating a designated print function, and when the log print instruction is detected, it is determined whether or not target print function information designated by the log print instruction is stored in the function linked list.
Further, the information of the print function specified in the log print instruction may be a print function number, and therefore when the log print instruction is detected, the log print instruction is parsed to obtain the target print function number. And determining target printing function information by using the preset function corresponding relation and the target printing function number. The preset function corresponding relationship is the corresponding relationship of information such as the printing function number, the printing function name and the printing function content of each printing function, and can be pre-stored locally. The preset function correspondence may be in the form of a correspondence table, or may be a correspondence database. When the target printing function number is obtained and the printing function information in the function linked list is not the printing function number, the corresponding target printing function information can be determined by using the corresponding relation between the target printing function number and the preset function. And comparing the target printing function information with the printing function information in the function linked list to judge whether the target printing function information exists in the function linked list.
S103: and if the target printing function information specified by the log printing instruction exists in the function linked list, calling the log specified by the target printing function printing log printing instruction corresponding to the target printing function information.
If the function linked list has the target printing function information specified by the log printing instruction, the target printing function specified by the log printing instruction can be called, namely the log specified by the log printing instruction can be printed, so that the target printing function corresponding to the target printing function information is called, and the log specified by the log printing instruction is printed by using the target printing function. After the log is printed, the log may be stored, or other processes such as a compression process and a format change process may be performed on the log before the log is stored.
When the target print function information specified by the log print instruction does not exist in the function linked list, it is described that the log print instruction cannot be executed, and the log specified by the log print instruction cannot be printed. At this time, no operation may be performed, or information such as the time of the printing failure, the corresponding service, and the log printing instruction may be recorded.
By applying the kernel client log printing method provided by the embodiment of the invention, the function chain table is created to store the printing function information, namely the information corresponding to the printing function allowed to be called. When a log printing instruction is detected, judging whether a printing function corresponding to the log printing instruction is allowed to be called or not, namely whether the designated target printing function information is stored in a function linked list or not, and if the target printing function information is not stored in the function linked list, not printing the log designated by the log printing instruction; if the target printing function information is stored in the function linked list, the log specified by the log printing instruction is allowed to be printed, so that the log specified by the target printing function printing log printing instruction corresponding to the target printing function information is called. The log which is allowed to be printed is limited by setting the function linked list, and only the log which is allowed to be printed is printed during printing, so that the logs in a useless state can be prevented from being printed, the storage space occupied by the logs is reduced, and the problem that the storage space of a file system is wasted by a traditional log printing method is solved.
Based on the above embodiment of the present invention, the embodiment of the present invention will explain a specific print function information adding process, that is, further explain step S101. Referring to fig. 2, fig. 2 is a flow chart of adding print function information according to an embodiment of the present invention, including:
s201: acquiring a function adding instruction, and determining first printing function information specified by the function adding instruction.
Specifically, the function adding instruction may be manually input by a user, or the basic information input by the user may be acquired, and the corresponding function adding instruction is generated by using the basic information and the instruction generating rule, for example, the user may click an adding button after selecting a print function desired to be added, and generate the corresponding function adding instruction. One function addition instruction may specify one piece of first print function information, or may specify a plurality of pieces of first print function information. The function adding instruction includes information that can identify the print function information, and the specific content of the information indicating the print function information is not limited in this embodiment, and may be, for example, a number of the print function or a name of the print function.
Further, the information indicating the print function information in the function addition instruction is the number of the print function, and therefore, after the function addition instruction is acquired. And analyzing the function adding instruction to obtain a first printing function number. When the first print function number is determined and the print function information is not the print function number, the first print function information may be determined using the first print function number and a preset function correspondence relationship. For example, when the print function information is a print function name, the first print function name may be determined using a print function number and preset function correspondence, and determined as the first print function information.
S202: and adding the first printing function information into the function linked list.
After determining the first print function information, adding the first print function information to the function linked list. After the first print function information is added to the function linked list, other operations may also be performed, such as sending an addition success notification.
Based on the foregoing embodiment of the present invention, in practical applications, sometimes the print function information in the function linked list needs to be deleted, an embodiment of the present invention will describe a process for deleting print function information, please refer to fig. 3, where fig. 3 is a flowchart for deleting print function information provided by an embodiment of the present invention, and includes:
s301: and acquiring and analyzing the function deleting instruction, and determining second printing function information specified by the function deleting instruction.
And the function deleting instruction is used for deleting the designated second printing function information, and after the function deleting instruction is obtained, the function deleting instruction is analyzed to determine the second printing function information designated by the function deleting instruction. For example, when the number of the print function is included in the function deletion instruction, and when the print function information is the number of the print function, the number of the print function in the function deletion instruction may be directly determined as the second print function information; or when the print function information is the name of the print function, the name of the print function specified by the function deletion instruction may be determined using a preset function correspondence relationship, and the name may be determined as the second print function information.
S302: and judging whether the function linked list has second printing function information or not.
And after the second printing function information is determined, judging whether the function linked list has the second printing function information. If the function linked list does not have the second printing function information, no operation can be executed, and a deletion failure notification can be output.
S303: and if the second printing function information exists in the function linked list, deleting the second printing function information from the function linked list.
It should be noted that after deleting the second print function information from the function linked list, other operations may also be performed, for example, deleting a log printed by using the second print function corresponding to the second print function information; or may output deletion success information.
By applying the kernel client log printing method provided by the embodiment of the invention, the printing function information in the function linked list can be deleted, so that the log to be printed can be flexibly determined, and the problem that the log occupies a storage space because the log is continuously printed after some logs are not needed is solved.
Based on the above embodiment of the present invention, a specific implementation of a method for printing a log on a kernel client is described in the embodiment of the present invention.
In the embodiment of the invention, the kernel client is a file system kernel client, a debugging tool is installed in the kernel client, the debugging tool is positioned in a user mode, and the log printing of the kernel mode is controlled through a user mode application program. The debugging tool provides a user operation command externally, and internally drives a management device I/O mode through a character device, namely, the user operation command is transmitted into a kernel mode by using an ioctl function, namely, after the command input by the user is obtained, the command is analyzed and transmitted to the kernel. Specifically, after a debugging tool is installed, a character device driver is registered, and when a creating instruction is obtained by using the character device driver, a function linked list is created; or when the function adding instruction is obtained by the character device driver, the step of determining the first print function information specified by the function adding instruction is performed. When the kernel client runs daily and the service is executed to the log printing position in the code, whether the corresponding printing function exists in the function linked list or not is judged, if yes, the log is printed, and if not, the log is not printed.
By applying the kernel client log printing method provided by the embodiment of the invention, the user mode application program is utilized to provide the user operation command externally, namely the user is allowed to input the operation command, and the analyzed user operation command is transmitted to the kernel mode of the kernel client by utilizing the ioctl function internally so as to maintain the function chain table. The logs which are allowed to be printed are limited through the function linked list, and only the logs which are allowed to be printed are printed during printing, so that the logs in a useless state can be prevented from being printed, the storage space occupied by the logs is reduced, and the problem that the storage space of a file system is wasted by a traditional log printing method is solved.
In the following, the kernel client log printing apparatus provided by the embodiment of the present invention is introduced, and the kernel client log printing apparatus described below and the kernel client log printing method described above may be referred to in a corresponding manner.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a kernel client log printing apparatus according to an embodiment of the present invention, including:
a creating module 410, configured to create a function linked list, and add print function information to the function linked list;
the judging module 420 is configured to, when a log print instruction is detected, judge whether target print function information specified by the log print instruction exists in the function chain table;
the printing module 430 is configured to, if target print function information specified by the log print instruction exists in the function linked list, call a log specified by the target print function print log print instruction corresponding to the target print function information.
Optionally, the creating module 410 includes:
the adding instruction acquisition unit is used for acquiring a function adding instruction and determining first printing function information specified by the function adding instruction;
and the adding unit is used for adding the first printing function information into the function linked list.
Optionally, the add instruction obtaining unit includes:
the analysis subunit is used for analyzing the function adding instruction to obtain a first printing function number;
and the determining subunit is used for determining the first printing function information by utilizing the corresponding relation between the first printing function number and the preset function.
Optionally, the method further includes:
the deleting instruction acquisition module is used for acquiring and analyzing the function deleting instruction and determining second printing function information specified by the function deleting instruction;
the existence judging module is used for judging whether the function linked list has second printing function information or not;
and the deleting module is used for deleting the second printing function information from the function linked list if the second printing function information exists in the function linked list.
Optionally, the creating module 410 includes:
the device comprises a registering unit, a debugging unit and a character device driver, wherein the registering unit is used for installing and operating a debugging tool and registering the character device driver corresponding to the debugging tool;
and the creating unit is used for creating the function linked list when the character device driver is used for acquiring the creating instruction.
Optionally, the determining module 420 includes:
the number acquisition unit is used for analyzing the log printing instruction to obtain a target printing function number when the log printing instruction is detected;
the information determining unit is used for determining target printing function information by utilizing the preset function corresponding relation and the target printing function number;
and the judging unit is used for comparing the target printing function information with the printing function information in the function linked list and judging whether the target printing function information exists in the function linked list.
In the following, the kernel client log printing device provided by the embodiment of the present invention is introduced, and the kernel client log printing device described below and the kernel client log printing method described above may be referred to in a corresponding manner.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a kernel client log printing device according to an embodiment of the present invention, where the kernel client log printing device includes a memory and a processor, where:
a memory 510 for storing a computer program;
the processor 520 is configured to execute a computer program to implement the above-described kernel client log printing method.
In the following, the computer-readable storage medium provided by the embodiment of the present invention is introduced, and the computer-readable storage medium described below and the kernel client log printing method described above may be referred to correspondingly.
The invention also provides a computer readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the kernel client log printing method.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relationships such as first and second, etc., are intended only to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
The kernel client log printing method, the kernel client log printing device, the kernel client log printing equipment and the computer readable storage medium provided by the invention are introduced in detail, specific examples are applied in the text to explain the principle and the implementation mode of the invention, and the description of the above embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A file system log printing method is characterized by comprising the following steps:
creating a function linked list, and adding printing function information in the function linked list;
when a log printing instruction is detected, judging whether target printing function information appointed by the log printing instruction exists in the function linked list or not;
if the target printing function information appointed by the log printing instruction exists in the function linked list, calling a target printing function corresponding to the target printing function information to print the log appointed by the log printing instruction.
2. The method according to claim 1, wherein the adding print function information to the function linked list comprises:
acquiring a function adding instruction, and determining first printing function information appointed by the function adding instruction;
and adding the first printing function information into the function linked list.
3. The file system log printing method according to claim 2, wherein the determining the first printing function information specified by the function addition instruction includes:
analyzing the function adding instruction to obtain a first printing function number;
and determining the first printing function information by utilizing the corresponding relation between the first printing function number and a preset function.
4. The file system log printing method according to claim 1, further comprising:
acquiring and analyzing a function deleting instruction, and determining second printing function information appointed by the function deleting instruction;
judging whether the function linked list has the second printing function information or not;
and if the second printing function information exists in the function linked list, deleting the second printing function information from the function linked list.
5. The method according to claim 1, wherein the creating a linked list of functions comprises:
installing and operating a debugging tool, and registering a character device driver corresponding to the debugging tool;
and when a creating instruction is obtained by utilizing the character device driver, creating the function linked list.
6. The file system log printing method according to claim 1, wherein said determining whether target print function information specified by the log print instruction exists in the function linked list when the log print instruction is detected comprises:
when the log printing instruction is detected, analyzing the log printing instruction to obtain a target printing function number;
determining the target printing function information by using a preset function corresponding relation and the target printing function number;
and comparing the target printing function information with the printing function information in the function linked list to judge whether the target printing function information exists in the function linked list.
7. A file system log printing apparatus, comprising:
the creating module is used for creating a function linked list and adding printing function information in the function linked list;
the judging module is used for judging whether target printing function information appointed by the log printing instruction exists in the function linked list or not when the log printing instruction is detected;
and the printing module is used for calling a target printing function corresponding to the target printing function information to print the log specified by the log printing instruction if the target printing function information specified by the log printing instruction exists in the function linked list.
8. The file system log printing apparatus of claim 7, wherein the creating module comprises:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a function adding instruction and determining first printing function information appointed by the function adding instruction;
and the adding unit is used for adding the first printing function information into the function linked list.
9. A file system log printing device comprising a memory and a processor, wherein:
the memory is used for storing a computer program;
the processor configured to execute the computer program to implement the file system log printing method according to any one of claims 1 to 6.
10. A computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the file system log printing method according to any one of claims 1 to 6.
CN201911161219.9A 2019-11-24 2019-11-24 Kernel client log printing method, device, equipment and storage medium Active CN110941405B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911161219.9A CN110941405B (en) 2019-11-24 2019-11-24 Kernel client log printing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911161219.9A CN110941405B (en) 2019-11-24 2019-11-24 Kernel client log printing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110941405A true CN110941405A (en) 2020-03-31
CN110941405B CN110941405B (en) 2023-05-16

Family

ID=69908143

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911161219.9A Active CN110941405B (en) 2019-11-24 2019-11-24 Kernel client log printing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110941405B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113064750A (en) * 2021-04-26 2021-07-02 山东英信计算机技术有限公司 Tracking method, device and medium for BIOS log information
CN113553578A (en) * 2021-07-08 2021-10-26 北京奇艺世纪科技有限公司 Log printing response method and device, electronic equipment and storage medium
CN115729479A (en) * 2021-08-30 2023-03-03 华为技术有限公司 Method and electronic equipment for printing dynamic log
CN117492877A (en) * 2023-12-28 2024-02-02 苏州元脑智能科技有限公司 Program management method, system, equipment and medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070103715A1 (en) * 2005-11-04 2007-05-10 Hiroaki Nakata Printing management system and printing management method
CN101030127A (en) * 2006-03-02 2007-09-05 佳能株式会社 Printing apparatus, information processing apparatus, control method thereof, print management system
CN102043704A (en) * 2009-10-14 2011-05-04 中兴通讯股份有限公司 Method and system for generating log information
CN107092483A (en) * 2017-03-24 2017-08-25 武汉斗鱼网络科技有限公司 The method and system of data type in a kind of automatic parsing daily record storehouse
CN107145341A (en) * 2017-03-31 2017-09-08 武汉斗鱼网络科技有限公司 A kind of method and device that print log function is added in Flash
CN107577577A (en) * 2017-09-13 2018-01-12 郑州云海信息技术有限公司 Method, apparatus, system and the computer-readable recording medium of log-rank printing
CN109375884A (en) * 2018-09-03 2019-02-22 中国平安人寿保险股份有限公司 Using log Method of printing, device, computer equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070103715A1 (en) * 2005-11-04 2007-05-10 Hiroaki Nakata Printing management system and printing management method
CN101030127A (en) * 2006-03-02 2007-09-05 佳能株式会社 Printing apparatus, information processing apparatus, control method thereof, print management system
CN102043704A (en) * 2009-10-14 2011-05-04 中兴通讯股份有限公司 Method and system for generating log information
CN107092483A (en) * 2017-03-24 2017-08-25 武汉斗鱼网络科技有限公司 The method and system of data type in a kind of automatic parsing daily record storehouse
CN107145341A (en) * 2017-03-31 2017-09-08 武汉斗鱼网络科技有限公司 A kind of method and device that print log function is added in Flash
CN107577577A (en) * 2017-09-13 2018-01-12 郑州云海信息技术有限公司 Method, apparatus, system and the computer-readable recording medium of log-rank printing
CN109375884A (en) * 2018-09-03 2019-02-22 中国平安人寿保险股份有限公司 Using log Method of printing, device, computer equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
XIN-RONG LI; MAO YE; QING-XIN CHU: "\"Novel high gain printed log-periodic dipole antenna\"", 《2016 IEEE INTERNATIONAL SYMPOSIUM ON ANTENNAS AND PROPAGATION (APSURSI)》 *
巩琛;蔡文;: "基于ARM的Linux驱动调试技术研究", 计算机应用与软件 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113064750A (en) * 2021-04-26 2021-07-02 山东英信计算机技术有限公司 Tracking method, device and medium for BIOS log information
CN113064750B (en) * 2021-04-26 2023-03-28 山东英信计算机技术有限公司 Tracking method, device and medium for BIOS log information
CN113553578A (en) * 2021-07-08 2021-10-26 北京奇艺世纪科技有限公司 Log printing response method and device, electronic equipment and storage medium
CN113553578B (en) * 2021-07-08 2024-04-12 北京奇艺世纪科技有限公司 Log printing response method and device, electronic equipment and storage medium
CN115729479A (en) * 2021-08-30 2023-03-03 华为技术有限公司 Method and electronic equipment for printing dynamic log
WO2023029955A1 (en) * 2021-08-30 2023-03-09 华为技术有限公司 Method for printing dynamic log, and electronic device
CN117492877A (en) * 2023-12-28 2024-02-02 苏州元脑智能科技有限公司 Program management method, system, equipment and medium
CN117492877B (en) * 2023-12-28 2024-03-19 苏州元脑智能科技有限公司 Program management method, system, equipment and medium

Also Published As

Publication number Publication date
CN110941405B (en) 2023-05-16

Similar Documents

Publication Publication Date Title
CN110941405B (en) Kernel client log printing method, device, equipment and storage medium
US11538046B2 (en) Page data acquisition method, apparatus, server, electronic device and computer readable medium
US7739282B1 (en) Method and system for tracking client software use
US7774760B2 (en) Tracing errors in software
US20070255979A1 (en) Event trace conditional logging
CN110704521A (en) Interface data access method and system
CN108287708B (en) Data processing method and device, server and computer readable storage medium
CN103226510B (en) Resolve the method and apparatus of vmcore file
CN103220441B (en) Messaging device and control method thereof
CN110888628A (en) Method, device, equipment and storage medium for generating control tool
CN111026604B (en) Log file analysis method and device
JP7412938B2 (en) Information analysis device, information analysis method, information analysis system and program
CN112711536A (en) Automatic dial testing method and system, and computer readable storage medium
CN110716866A (en) Code quality scanning method and device, computer equipment and storage medium
CN106874004B (en) Method for enabling low-version software to be compatible with high-version file, client and server
CN113590564B (en) Data storage method, device, electronic equipment and storage medium
CN112287643B (en) Message monitoring method, device, equipment and computer readable storage medium
CN105243022B (en) The performance data analysis method and device of host application software system
CN110187385B (en) Seismic data acquisition method, seismic data processing method and device
CN109509467B (en) Code generation method and device
CN114461954A (en) Dynamic plug-in operation method, device, system and storage medium
CN112069143A (en) Log level adjusting method, device, equipment and readable storage medium
CN110717131B (en) Page revising monitoring method and related system
CN111026466A (en) File processing method and device, computer readable storage medium and electronic equipment
CN112416735A (en) Application program detection method and device, terminal equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant