CN106909489B - Method and device for testing EventLog state - Google Patents

Method and device for testing EventLog state Download PDF

Info

Publication number
CN106909489B
CN106909489B CN201710105103.8A CN201710105103A CN106909489B CN 106909489 B CN106909489 B CN 106909489B CN 201710105103 A CN201710105103 A CN 201710105103A CN 106909489 B CN106909489 B CN 106909489B
Authority
CN
China
Prior art keywords
state
log
eventlog
testing
test
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.)
Active
Application number
CN201710105103.8A
Other languages
Chinese (zh)
Other versions
CN106909489A (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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710105103.8A priority Critical patent/CN106909489B/en
Publication of CN106909489A publication Critical patent/CN106909489A/en
Application granted granted Critical
Publication of CN106909489B publication Critical patent/CN106909489B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/328Computer systems status display

Abstract

The invention relates to the field of system testing, and discloses a method for testing an EventLog state, which comprises the following steps: writing a program for testing the EventLog state; running a program for testing the EventLog state; and reading the EventLog state and judging whether an alarm appears. Also disclosed is a device for testing EventLog state, comprising: the compiling module is used for compiling a program for testing the EventLog state; the running module is used for running a program for testing the EventLog state; and the judging module is used for reading the EventLog state and judging whether an alarm occurs or not. According to the invention, based on the change of the EventLog state, the number of test logs which can repeatedly generate logs to the set number is designed, so that a program for judging the EventLog state is judged, and finally the test of the change of each state of the EventLog is completed.

Description

Method and device for testing EventLog state
Technical Field
The invention relates to the field of system testing, in particular to a method and a device for testing an EventLog state.
Background
The EventLog state can directly reflect the storage condition of the system log, when the system log is normally stored, the EventLog state is normally displayed under a hardware monitoring module, and a client can check the log storage condition of the machine through a BMC web or an IPMI command so as to judge the health state of the machine. Due to the fact that storage space is limited, the EventLog is calculated according to the number of records at present, 3639 logs are supported for storage at maximum, according to a Log storage strategy, when the number of logs reaches or approaches 2736, the state of the EventLog changes, a Log will be full, and when the number of logs reaches the maximum 3639, the Log will be full. A method for testing the eventlg state is needed to test the change of each state of the eventlg of the system, so that the operation and maintenance of the machine system can be better performed.
Disclosure of Invention
The invention provides a method and a device for testing the EventLog state, aiming at the current requirements and the defects of the prior art development.
In order to achieve the purpose, the invention adopts the following technical scheme:
writing a program for testing the EventLog state;
running a program for testing the EventLog state;
and reading the EventLog state and judging whether an alarm appears.
Preferably, the eventlg status refers to a log storage status of the BMC.
Preferably, writing a program for testing EventLog status includes:
defining a text document for storing a log;
setting the number of logs of a full state of a test log;
setting the number of logs of the full state of the test log;
and defining a test result document for storing the test EventLog state result.
Preferably, after the program for testing the eventlg state is written, the method further includes:
compiling the written program for testing the EventLog state.
Preferably, the program for testing EventLog state is executed, and comprises:
inputting the IP address of the machine to be tested through a host end;
clearing the existing log stored by the BMC;
the log is added and saved in the text document used to store the log.
Preferably, reading the eventlg status and determining whether an alarm occurs includes:
when the number of the stored logs reaches the number of logs in a set testing log to full state, judging whether the EventLog state gives an alarm that the logs are full, if so, outputting prompt information that the logs pass the full state testing, storing the testing result in a testing result document, and continuously adding the logs to carry out testing judgment on the full state of the logs, otherwise, outputting prompt information that the logs fail in the full state testing;
and when the number of the stored logs reaches the number of the logs in the set test log full state, judging whether the EventLog state has a log full alarm, if so, outputting prompt information that the test of the log full state passes, storing the test result in a test result document, and if not, outputting prompt information that the test of the log full state fails.
The invention also provides a device for testing the EventLog state based on the method for testing the EventLog state, which comprises the following steps:
the compiling module is used for compiling a program for testing the EventLog state;
the running module is used for running a program for testing the EventLog state;
and the judging module is used for reading the EventLog state and judging whether an alarm occurs or not.
Preferably, the writing module further includes:
the first definition module is used for defining a text document for storing the log;
the first setting module is used for setting the number of logs in a full state of the test log;
the second setting module is used for setting the number of the logs in the full state of the test logs;
and the second definition module is used for setting a test result document for storing the test EventLog state result.
Preferably, the method further comprises the following steps:
and the compiling module is used for compiling the written program for testing the EventLog state.
Preferably, the operation module further includes:
the input module is used for inputting the IP address of the to-be-tested machine through the host end;
the clearing module is used for clearing the existing log stored by the BMC;
and the log adding module is used for adding the log and storing the log in a text document for storing the log.
Preferably, the determining module further includes:
the first judgment submodule is used for judging whether the EventLog state has a log to full alarm when the number of the stored logs reaches the number of the logs in the full state of the set test log, if so, outputting prompt information that the log is tested to be in the full state, storing the test result in a test result document, continuously adding the log to carry out test judgment on the full state of the log, and if not, outputting prompt information that the test of the full state of the log fails;
and the second judgment submodule is used for judging whether the log fullness alarm appears in the EventLog state when the number of the stored logs reaches the number of the logs in the set test log fullness state, if so, outputting prompt information that the log fullness test passes and storing the test result in a test result document, and if not, outputting prompt information that the log fullness test fails.
The invention has the beneficial effects that:
the invention provides a program for testing an EventLog state, which is mainly applied to judgment of the EventLog state, can repeatedly increase system logs to the number of set test logs, can automatically set the number of the test logs to set the program operation times and read a machine table of the EventLog state, can read a normal state, and can display the EventLog state in a full state and a full state of the logs, so that operation and maintenance testers can better operate and maintain a machine system.
Drawings
Fig. 1 is a flowchart illustrating a method for testing an eventlg status according to the present invention.
Fig. 2 is a schematic structural diagram of an apparatus for testing eventlg status according to the present invention.
FIG. 3 is a second flowchart illustrating a method for testing EventLog status according to the present invention.
FIG. 4 is a second schematic diagram of an apparatus for testing EventLog status according to 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 some, but not all, embodiments of the present invention. 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.
For ease of understanding, some of the terms appearing in the present invention are explained below:
BMC: the BMC Controller is a special service processor that monitors the status of a computer, web server or other hardware driver by using sensors that measure internal physical variables such as: temperature, humidity, supply voltage, fan speed, communication parameters and operating system functions, and if any of these variables is outside of specified limits, he will notify the administrator, who will take corrective action using remote control. The monitoring device can be powered on and restarted when necessary, so that a single administrator can remotely control numerous servers and other devices simultaneously, saving the overall cost of the network and ensuring reliability.
EventLog: the log storage of the BMC mainly comprises monitoring records of hardware, trigger and release conditions of all states of a storage system log sensor, log records of a whole system and the like.
host: in the internet protocol, host represents a local computer that can access each other with other machines.
IPMI: the English full name of Intelligent Platform Management Interface is a new generation of universal Interface standard which makes hardware Management possess intellectualization. The IPMI may be used by a user to monitor physical characteristics of the server, such as temperature, voltage, fan operating conditions, power supply, and chassis intrusion.
The following detailed description of embodiments of the invention is provided in connection with the accompanying drawings and examples:
the first embodiment is as follows:
as shown in fig. 1, a method for testing eventlg status according to the present invention includes the following steps:
step S101: define the text document sdrelist.
Step S102: and setting the number of the logs of which the test logs are to be in a full state.
Step S103: and setting the number of the logs in the full state of the test log.
Step S104: define the test result document result.txt that saves the test eventlg state result.
Step S105: compiling the written program for testing the EventLog state.
Step S106: and inputting the IP address of the to-be-tested machine through the host terminal.
Step S107: and clearing the existing log stored by the BMC.
Step S108: the log is added and saved in the text document used to store the log.
Step S109: when the number of the stored logs reaches the number of the logs in the set testing log to full state, judging whether the EventLog state gives an alarm that the logs are full, if so, outputting prompt information that the logs pass the full state testing, storing the testing result in a testing result document, and continuously adding the logs to carry out testing judgment on the full state of the logs, and if not, outputting prompt information that the logs fail in the full state testing.
Step S110: and when the number of the stored logs reaches the number of the logs in the set test log full state, judging whether the EventLog state has a log full alarm, if so, outputting prompt information that the test of the log full state passes, storing the test result in a test result document, and if not, outputting prompt information that the test of the log full state fails.
As a practical way, the IP address of the dut is 192.168.16.22.
As an implementable manner, if the number of test log full status logs is set to 2800 and the number of test log full status logs is set to 900, the sum of 2800 and 900 is 3700.
As an implementation mode, the log defines the prompt information that the Full state Test passes as 'BMCEventLog all Full State Test Pass', and the log defines the prompt information that the Full state Test FAILs as 'BMCEventLog all Full State Test FAIL'.
As an implementable mode, the prompt message that the log Full state Test passes is defined as 'BMCEventLog Full State Test Pass', and the prompt message that the log Full state Test FAILs is 'BMC EventLogFull State Test FAIL'.
Example two:
as shown in fig. 2, an apparatus for testing eventlg status according to the present invention includes: a first defining module 201 in the compiling module, a first setting module 202 in the compiling module, a second setting module 203 in the compiling module, a second defining module 204 in the compiling module, a compiling module 205, an input module 206 in the running module, a clearing module 207 in the running module, an adding log module 208 in the running module, a first judging sub-module 209 in the judging module, a second judging sub-module 210 in the judging module, the first definition module 201 in the compiling module is connected with the first setting module 202 in the compiling module, the second setting module 203 in the compiling module, the second definition module 204 in the compiling module, the compiling module 205, the input module 206 in the running module, the clearing module 207 in the running module, the log adding module 208 in the running module, the first judgment sub-module 209 in the judgment module and the second judgment sub-module 210 in the judgment module in sequence.
A first definition module 201 in the compiling module, which is used for defining the text document for storing the log; a first setting module 202 in the compiling module, configured to set the number of logs in a full state of the test log; the second setting module 203 in the compiling module is used for setting the number of the test logs in the full state; a second definition module 204 in the compiling module, configured to define a test result document for storing a test eventlg state result; the compiling module 205 is used for compiling the written program for testing the EventLog state; the input module 206 in the running module is used for inputting the IP address of the to-be-tested machine through the host end; a clearing module 207 in the running module, which is used for clearing the existing log stored by the BMC; the log adding module 208 in the running module is used for adding logs and storing the added logs in a text document for storing the logs; a first judging submodule 209 in the judging module, configured to, when the number of stored logs reaches the number of logs in a set test log to full state, judge whether an EventLog state has an alarm that the logs are full, if yes, output a prompt message that the log will be full state tested, store the test result in a test result document, and continue to add logs to perform test judgment of the log full state, and if not, output a prompt message that the log will be full state tested failure; the second judgment sub-module 210 in the judgment module is configured to, when the number of the stored logs reaches the number of the logs in the set test log full state, judge whether the eventlg state changes and an alarm that the log is full occurs, if yes, output a prompt message that the test in the log full state passes, store the test result in a test result document, and if not, output a prompt message that the test in the log full state fails.
Example three:
as shown in fig. 3, another method for testing EventLog status according to the present invention includes the following steps:
step S301: a program is written to test the EventLog state.
Step S302: a program is run that tests the EventLog state.
Step S303: and reading the EventLog state and judging whether an alarm appears.
Example four:
as shown in fig. 4, another apparatus for testing eventlg status according to the present invention includes: the device comprises a compiling module 401, an operating module 402 and a judging module 403, wherein the compiling module 401 is sequentially connected with the operating module 402 and the judging module 403.
The compiling module 401 is used for compiling a program for testing the EventLog state; an operation module 402, configured to operate a program for testing an eventlg state; and the judging module 403 is configured to read an eventlg state and judge whether an alarm occurs.
Those of skill would further appreciate that the various illustrative modules 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 above shows only the preferred embodiments of the present invention, and it should be noted that it is obvious to those skilled in the art that various modifications and improvements can be made without departing from the principle of the present invention, and these modifications and improvements should also be considered as the protection scope of the present invention.

Claims (8)

1. A method for testing EventLog states, wherein EventLog states comprise a normal state, a log to-full state and a log full state, and the method is characterized by comprising the following steps:
writing a program for testing the EventLog state; the EventLog state refers to a log storage state of the BMC;
running a program for testing the EventLog state;
reading the EventLog state, and judging whether an alarm occurs or not, wherein the steps comprise:
when the number of the stored logs reaches the number of logs in a set testing log to full state, judging whether the EventLog state gives an alarm that the logs are full, if so, outputting prompt information that the logs pass the full state testing, storing the testing result in a testing result document, and continuously adding the logs to carry out testing judgment on the full state of the logs, otherwise, outputting prompt information that the logs fail in the full state testing;
and when the number of the stored logs reaches the number of the logs in the set test log full state, judging whether the EventLog state has a log full alarm, if so, outputting prompt information that the test of the log full state passes, storing the test result in a test result document, and if not, outputting prompt information that the test of the log full state fails.
2. The method for testing the EventLog state according to claim 1, wherein the programming for testing the EventLog state comprises:
defining a text document for storing a log;
setting the number of logs of a full state of a test log;
setting the number of logs of the full state of the test log;
and defining a test result document for storing the test EventLog state result.
3. The method for testing EventLog status according to claim 1, further comprising, after programming the test EventLog status:
compiling the written program for testing the EventLog state.
4. The method for testing the EventLog state according to claim 2, wherein the step of running a program for testing the EventLog state comprises the following steps:
inputting the IP address of the machine to be tested through a host end;
clearing the existing log stored by the BMC;
the log is added and saved in the text document used to store the log.
5. An EventLog status testing device based on the method for testing EventLog status of any one of claims 1 to 4, comprising:
the compiling module is used for compiling a program for testing the EventLog state;
the running module is used for running a program for testing the EventLog state;
the judging module is used for reading the EventLog state and judging whether an alarm occurs or not;
the judging module further comprises:
the first judgment submodule is used for judging whether the EventLog state has a log to full alarm when the number of the stored logs reaches the number of the logs in the full state of the set test log, if so, outputting prompt information that the log is tested to be in the full state, storing the test result in a test result document, continuously adding the log to carry out test judgment on the full state of the log, and if not, outputting prompt information that the test of the full state of the log fails;
and the second judgment submodule is used for judging whether the log fullness alarm appears in the EventLog state when the number of the stored logs reaches the number of the logs in the set test log fullness state, if so, outputting prompt information that the log fullness test passes and storing the test result in a test result document, and if not, outputting prompt information that the log fullness test fails.
6. The apparatus for testing EventLog status according to claim 5, wherein the programming module further comprises:
the first definition module is used for defining a text document for storing the log;
the first setting module is used for setting the number of logs in a full state of the test log;
the second setting module is used for setting the number of the logs in the full state of the test logs;
and the second definition module is used for defining a test result document for storing the test EventLog state result.
7. The apparatus for testing EventLog status according to claim 5, further comprising:
and the compiling module is used for compiling the written program for testing the EventLog state.
8. The apparatus for testing eventlg status according to claim 5, wherein the execution module further comprises:
the input module is used for inputting the IP address of the to-be-tested machine through the host end;
the clearing module is used for clearing the existing log stored by the BMC;
and the log adding module is used for adding the log and storing the log in a text document for storing the log.
CN201710105103.8A 2017-02-25 2017-02-25 Method and device for testing EventLog state Active CN106909489B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710105103.8A CN106909489B (en) 2017-02-25 2017-02-25 Method and device for testing EventLog state

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710105103.8A CN106909489B (en) 2017-02-25 2017-02-25 Method and device for testing EventLog state

Publications (2)

Publication Number Publication Date
CN106909489A CN106909489A (en) 2017-06-30
CN106909489B true CN106909489B (en) 2020-03-31

Family

ID=59208289

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710105103.8A Active CN106909489B (en) 2017-02-25 2017-02-25 Method and device for testing EventLog state

Country Status (1)

Country Link
CN (1) CN106909489B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107861831A (en) * 2017-12-07 2018-03-30 郑州云海信息技术有限公司 A kind of method of automatic quick addition BMC sel daily records

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102314392A (en) * 2011-08-09 2012-01-11 浪潮(北京)电子信息产业有限公司 Computer monitoring system and monitoring alarm method
CN103188105A (en) * 2011-12-31 2013-07-03 中国航天科工集团第二研究院七〇六所 Safety enhancing system and method thereof of NAS equipment
CN103902435A (en) * 2012-12-26 2014-07-02 鸿富锦精密工业(深圳)有限公司 System and method for recording log events in server testing
CN105955858A (en) * 2016-05-10 2016-09-21 浪潮电子信息产业股份有限公司 Method and device for testing log recording function of BMC (Baseboard Management Controller)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9146855B2 (en) * 2012-01-09 2015-09-29 Dell Products Lp Systems and methods for tracking and managing non-volatile memory wear

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102314392A (en) * 2011-08-09 2012-01-11 浪潮(北京)电子信息产业有限公司 Computer monitoring system and monitoring alarm method
CN103188105A (en) * 2011-12-31 2013-07-03 中国航天科工集团第二研究院七〇六所 Safety enhancing system and method thereof of NAS equipment
CN103902435A (en) * 2012-12-26 2014-07-02 鸿富锦精密工业(深圳)有限公司 System and method for recording log events in server testing
CN105955858A (en) * 2016-05-10 2016-09-21 浪潮电子信息产业股份有限公司 Method and device for testing log recording function of BMC (Baseboard Management Controller)

Also Published As

Publication number Publication date
CN106909489A (en) 2017-06-30

Similar Documents

Publication Publication Date Title
US9569325B2 (en) Method and system for automated test and result comparison
KR101540129B1 (en) Remote access diagnostic device and methods thereof
US7617086B2 (en) Monitoring simulating device, method, and program
CN107943637A (en) A kind of mains cycle test device and method based on IPMI platforms
CN109218407B (en) Code management and control method based on log monitoring technology and terminal equipment
WO2016197737A1 (en) Self-check processing method, apparatus and system
CN106909489B (en) Method and device for testing EventLog state
CN111124828B (en) Data processing method, device, equipment and storage medium
CN115632706B (en) FC link management method, device, equipment and readable storage medium
CN110875832B (en) Abnormal service monitoring method, device and system and computer readable storage medium
CN114138587B (en) Method, device and equipment for verifying reliability of server power firmware upgrade
US10713111B2 (en) Damage detection system
CN115687026A (en) Multi-node server fault early warning method, device, equipment and medium
CN115080132A (en) Information processing method, information processing apparatus, server, and storage medium
JP5268820B2 (en) Rewriting method for monitoring device program
CN112953788A (en) Network state detection method and device, BMC and storage medium
CN114461470B (en) Memory power consumption testing method, system, equipment and storage medium
CN113688017B (en) Automatic abnormality testing method and device for multi-node BeeGFS file system
CN114531383B (en) Method, device, equipment and storage medium for detecting abnormality of railway vehicle-mounted switch
CN113900890B (en) Method, device, equipment and medium for collecting server component information
CN114116395B (en) Aging room power supply line power overload protection method, system and device
CN117251333A (en) Method, device, equipment and storage medium for acquiring hard disk information
CN115981934A (en) Method, system, electronic device and storage medium for automatically performing stability test
CN114531383A (en) Abnormity detection method, device and equipment for railway vehicle-mounted switch and storage medium
CN114138574A (en) Controller testing method, device, server 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