[go: up one dir, main page]

CN107276855A - A kind of automatically-monitored method of server stress based on linux system - Google Patents

A kind of automatically-monitored method of server stress based on linux system Download PDF

Info

Publication number
CN107276855A
CN107276855A CN201710624524.1A CN201710624524A CN107276855A CN 107276855 A CN107276855 A CN 107276855A CN 201710624524 A CN201710624524 A CN 201710624524A CN 107276855 A CN107276855 A CN 107276855A
Authority
CN
China
Prior art keywords
cpu
program
server pressure
status
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710624524.1A
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.)
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 CN201710624524.1A priority Critical patent/CN107276855A/en
Publication of CN107276855A publication Critical patent/CN107276855A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/2236Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test CPU or processors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明公开了一种基于Linux系统的服务器压力自动化监控方法,它包括以下步骤:编辑服务器压力监控程序;设置服务器压力监控程序的运行次数及运行间隔时间;编写shell脚本,并将服务器压力监控程序的命令集成到shell脚本中;运行shell脚本,获取当前系统的状态数据;输出Turbo与EIST的状态。本发明是通过运行服务器压力监控程序来实时监测CPU运行状态来判断服务器当前运行压力,并实时显示,并通过一定频率检查响应系统log来监测系统当前健康状态,从而实现了无人值守并能达到服务器压力自动化监控的目的。

The invention discloses an automatic monitoring method for server pressure based on a Linux system, which comprises the following steps: editing the server pressure monitoring program; setting the running times and running interval time of the server pressure monitoring program; The command is integrated into the shell script; run the shell script to obtain the status data of the current system; output the status of Turbo and EIST. The present invention monitors the CPU operating state in real time by running the server pressure monitoring program to judge the current operating pressure of the server, and displays it in real time, and monitors the current health state of the system by checking the response system log at a certain frequency, thereby realizing unattended and achieving The purpose of automatic server pressure monitoring.

Description

一种基于Linux系统的服务器压力自动化监控方法A method for automatic monitoring of server pressure based on Linux system

技术领域technical field

本发明涉及一种基于Linux系统的服务器压力自动化监控方法,属于服务器监测技术领域。The invention relates to an automatic monitoring method for server pressure based on a Linux system, belonging to the technical field of server monitoring.

背景技术Background technique

随着信息化社会的不断完善,信息化在社会各行各业都得到了长足的发展,信息化的进步使得社会上对于计算机的使用更加普及。With the continuous improvement of the information society, informatization has made great progress in all walks of life in society, and the progress of informatization has made the use of computers more popular in society.

伴随着信息化数字化的广泛应用,后台服务器的业务也呈现指数倍的增长,这就对服务器在高负荷的工作压力下可以保证长期运行,对服务器的质量要求更加苛刻,服务器运行过程中,CPU作为服务器计算最核心的部分,一般CPU运行是负载压力也可以看作是整个服务器运行时负载的压力。而一般CPU运行过程中其核心的实时频率及负载状态是CPU压力的表现显示。With the wide application of informatization and digitization, the business of the background server has also shown an exponential growth, which ensures that the server can run for a long time under high-load work pressure, and the quality requirements of the server are more stringent. During the operation of the server, the CPU As the core part of server computing, the load pressure of general CPU operation can also be regarded as the load pressure of the entire server during operation. The real-time frequency and load status of the core during the general CPU operation are the performance display of the CPU pressure.

因此,在研发测试过程中,服务器系统压力测试是必不可少的一项,然而目前尚未有一种对服务器系统进行压力测试的方法。Therefore, during the development and testing process, the server system stress test is an essential item, but there is no method for performing a stress test on the server system at present.

发明内容Contents of the invention

针对上述技术的不足,本发明实施例提供了一种基于Linux系统的服务器压力自动化监控方法,其能够实现对服务器系统状态的自动化监控。In view of the shortcomings of the above technologies, an embodiment of the present invention provides an automatic monitoring method for server pressure based on a Linux system, which can realize automatic monitoring of the state of the server system.

本发明实施例解决其技术问题采取的技术方案是:The technical scheme that the embodiment of the present invention solves its technical problem to take is:

一种基于Linux系统的服务器压力自动化监控方法,它包括以下步骤:A method for automatically monitoring server pressure based on a Linux system, comprising the following steps:

编辑服务器压力监控程序;Edit server pressure monitoring program;

设置服务器压力监控程序的运行次数及运行间隔时间;Set the running times and running interval of the server pressure monitoring program;

编写shell脚本,并将服务器压力监控程序的命令集成到shell脚本中;Write a shell script and integrate the commands of the server pressure monitoring program into the shell script;

运行shell脚本,获取当前系统的状态数据;Run the shell script to obtain the status data of the current system;

输出Turbo与EIST的状态。Output the status of Turbo and EIST.

可选地,所述服务器压力监控程序至少包括以下过程:Optionally, the server pressure monitoring program includes at least the following processes:

获取系统下CPU信息和CPU运行模式的过程;The process of obtaining CPU information and CPU operation mode under the system;

获取系统下CPU运行频率的过程;The process of obtaining the operating frequency of the CPU under the system;

输出频率信息的过程;The process of outputting frequency information;

输出CPU核心信息的过程;The process of outputting CPU core information;

输出CPU超频状态的过程;The process of outputting the CPU overclocking status;

输出CPU节能状态的过程。The process of outputting the CPU energy-saving state.

可选地,所述服务器压力监控程序的运行次数为100~10000次。Optionally, the running times of the server pressure monitoring program is 100-10000 times.

可选地,所述服务器压力监控程序的运行间隔时间为8~20S。Optionally, the running interval of the server pressure monitoring program is 8-20 seconds.

可选地,所述当前系统的状态数据利用服务器压力监控程序实时读取系统下/proc/cpuinfo文件来获取。Optionally, the status data of the current system is obtained by reading the /proc/cpuinfo file under the system in real time using a server pressure monitoring program.

可选地,所述shell脚本的运行过程包括以下步骤:Optionally, the running process of the shell script includes the following steps:

运行检测程序对系统信息进行检测;Run the detection program to detect system information;

CPU内核频率信息存储文件;CPU core frequency information storage file;

对log进行信息注释;Annotate the log information;

对重复的进行计数处理;Count the duplicates;

检查用户输入运行次数数据,如果有输入运行次数数据则调用总共运行次数程序的返回值,否则使用默认次数;Check the number of running times entered by the user, if there is input running times data, call the return value of the total running times program, otherwise use the default number of times;

检查用户输入运行时间间隔数据,如果有输入运行时间间隔数据则调用主程序运行时间间隔程序的返回值,否则使用默认时间;Check the user input running time interval data, if there is input running time interval data, call the return value of the main program running time interval program, otherwise use the default time;

读取proc/cpuinfo文件,获取CPU核心数信息;Read the proc/cpuinfo file to obtain information about the number of CPU cores;

读取proc/cpuinfo文件,获取CPU model name信息及CPU频率信息,Read the proc/cpuinfo file to obtain CPU model name information and CPU frequency information,

如果CPU频率返回值为1,则输出获取失败;If the CPU frequency return value is 1, the output acquisition fails;

获取系统从BIOS获取的CPU的Turbo与EIST状态;Obtain the Turbo and EIST status of the CPU obtained by the system from the BIOS;

记录CPU标频;Record CPU standard frequency;

记录CPU核心数;Record the number of CPU cores;

记录CPU Turbo状态;Record CPU Turbo status;

记录CPU EIST状态;Record CPU EIST status;

记录CPU Hyper状态;Record CPU Hyper status;

根据运行次数数据和运行时间间隔数据循环运行服务器压力监控程序,最后输出系统当前压力状态并检查系统log信息。Run the server pressure monitoring program cyclically according to the running times data and running time interval data, and finally output the current pressure status of the system and check the system log information.

可选地,所述检测程序包括以下程序:Optionally, the detection procedures include the following procedures:

获取系统下CPU信息和CPU运行模式的程序;A program to obtain CPU information and CPU operating mode in the system;

获取系统下CPU运行频率的程序;A program to obtain the operating frequency of the CPU in the system;

输出频率信息的程序;Programs that output frequency information;

输出CPU核心信息的程序;A program that outputs CPU core information;

输出CPU超频状态的程序;A program that outputs the CPU overclocking status;

输出CPU节能状态的程序。A program that outputs the CPU power saving status.

可选地,所述Turbo与EIST的状态通过SCELNX_64输出bios选项来获取,并以文本形式输出。Optionally, the states of Turbo and EIST are obtained through the SCELNX_64 output bios option, and output in text form.

本发明实施例提供的技术方案具有以下有益效果:The technical solutions provided by the embodiments of the present invention have the following beneficial effects:

本发明实施例方案基于Linux操作系统,使用shell脚本,通过实时读取系统下/proc/cpuinfo,model name中获取标称频率,cpu MHz获取各个核心动态频率,通过SCELNX_64输出bios选项,获取Turbo与EIST的状态,通过这些参数的实时变化来监控系统负压状态,并将状态数据以文本形式输出,可以实现服务器系统状态的自动化监控,避免了人为监控带来的疏忽,实现了服务器压力自动化测试,大大节省了人力成本和时间成本,无需操作人员有太深的技术经验即可完成。The scheme of the embodiment of the present invention is based on the Linux operating system, uses shell scripts, and obtains the nominal frequency in the model name by reading /proc/cpuinfo under the system in real time, and obtains each core dynamic frequency in cpu MHz, and outputs the bios option through SCELNX_64 to obtain Turbo and The state of EIST monitors the negative pressure state of the system through the real-time changes of these parameters, and outputs the state data in text form, which can realize the automatic monitoring of the server system state, avoid the negligence caused by manual monitoring, and realize the automatic server pressure test , greatly saving labor costs and time costs, and can be completed without the operator having too much technical experience.

本发明实施例方案是通过运行服务器压力监控程序来实时监测CPU运行状态来判断服务器当前运行压力,并实时显示,并通过一定频率检查响应系统log来监测系统当前健康状态,从而实现了无人值守并能达到服务器压力自动化监控的目的。The solution of the embodiment of the present invention is to monitor the CPU operating status in real time by running the server pressure monitoring program to judge the current operating pressure of the server and display it in real time, and to monitor the current health status of the system by checking the response system log at a certain frequency, thereby realizing unattended operation And can achieve the purpose of server pressure automatic monitoring.

附图说明Description of drawings

下面结合说明书附图对本发明进行说明。The present invention will be described below in conjunction with the accompanying drawings.

图1为本发明实施例提供的一种基于Linux系统的服务器压力自动化监控方法的流程示意图。FIG. 1 is a schematic flowchart of a method for automatically monitoring server pressure based on a Linux system provided by an embodiment of the present invention.

具体实施方式detailed description

为能清楚说明本方案的技术特点,下面通过具体实施方式,并结合其附图,对本发明进行详细阐述。下文的公开提供了许多不同的实施例或例子用来实现本发明的不同结构。为了简化本发明的公开,下文中对特定例子的部件和设置进行描述。此外,本发明可以在不同例子中重复参考数字和/或字母。这种重复是为了简化和清楚的目的,其本身不指示所讨论各种实施例和/或设置之间的关系。应当注意,在附图中所图示的部件不一定按比例绘制。本发明省略了对公知组件和处理技术及工艺的描述以避免不必要地限制本发明。In order to clearly illustrate the technical features of this solution, the present invention will be described in detail below through specific implementation modes and in conjunction with the accompanying drawings. The following disclosure provides many different embodiments or examples for implementing different structures of the present invention. To simplify the disclosure of the present invention, components and arrangements of specific examples are described below. Furthermore, the present invention may repeat reference numerals and/or letters in different instances. This repetition is for the purpose of simplicity and clarity and does not in itself indicate a relationship between the various embodiments and/or arrangements discussed. It should be noted that components illustrated in the figures are not necessarily drawn to scale. Descriptions of well-known components and processing techniques and processes are omitted herein to avoid unnecessarily limiting the present invention.

图1为本发明实施例提供的一种基于Linux系统的服务器压力自动化监控方法的流程示意图。FIG. 1 is a schematic flowchart of a method for automatically monitoring server pressure based on a Linux system provided by an embodiment of the present invention.

参见图1,本发明实施例的一种基于Linux系统的服务器压力自动化监控方法,它包括以下步骤:Referring to Fig. 1, a kind of server pressure automatic monitoring method based on Linux system of the embodiment of the present invention, it comprises the following steps:

S1,编辑服务器压力监控程序;所述服务器压力监控程序包括以下过程:获取系统下CPU信息和CPU运行模式的过程、获取系统下CPU运行频率的过程、输出频率信息的过程、输出CPU核心信息的过程、输出CPU超频状态的过程和输出CPU节能状态的过程。S1, edit the server pressure monitoring program; the server pressure monitoring program includes the following processes: the process of obtaining CPU information and CPU operating mode under the system, the process of obtaining the CPU operating frequency under the system, the process of outputting frequency information, and the process of outputting CPU core information process, the process of outputting the CPU overclocking state, and the process of outputting the CPU energy saving state.

S2,设置服务器压力监控程序的运行次数及运行间隔时间;所述服务器压力监控程序的运行次数优选设置为100~10000次,其默认值为1000次;所述服务器压力监控程序的运行间隔时间优选设置为8~20S,其默认值为10S。S2, setting the running times and running intervals of the server pressure monitoring program; the running times of the server pressure monitoring program is preferably set to 100-10000 times, and its default value is 1000 times; the running time interval of the server pressure monitoring program is preferably The setting is 8~20S, and the default value is 10S.

S3,编写shell脚本,并将服务器压力监控程序的命令集成到shell脚本中。S3, write a shell script, and integrate the commands of the server pressure monitoring program into the shell script.

S4,运行shell脚本,利用服务器压力监控程序实时读取系统下/proc/cpuinfo文件来获取当前系统的状态数据。S4, run the shell script, use the server pressure monitoring program to read the /proc/cpuinfo file under the system in real time to obtain the status data of the current system.

/proc/cpuinfo文件包含系统上每个处理器的数据段落。The /proc/cpuinfo file contains sections of data for each processor on the system.

proc/cpuinfo描述中有6个条目适用于多内核和超线程(HT)技术检查:processor,vendor id,physical id,siblings,core id和cpu cores;processor条目包括这一逻辑处理器的唯一标识符,physical id条目包括每个物理封装的唯一标识符,coreid条目保存每个内核的唯一标识符,siblings条目列出了位于相同物理封装中的逻辑处理器的数量,cpu cores条目包含位于相同物理封装中的内核数量。There are 6 entries in the proc/cpuinfo description that apply to multi-core and hyperthreading (HT) technology checks: processor, vendor id, physical id, siblings, core id, and cpu cores; the processor entry includes a unique identifier for this logical processor , the physical id entry contains a unique identifier for each physical package, the coreid entry holds a unique identifier for each core, the siblings entry lists the number of logical processors located in the same physical package, and the cpu cores entry contains The number of cores in .

S5,输出Turbo与EIST的状态。所述Turbo与EIST的状态通过SCELNX_64输出bios选项来获取,并以文本形式输出。S5, output the state of Turbo and EIST. The states of Turbo and EIST are obtained through the SCELNX_64 output bios option, and are output in text form.

可选地,所述shell脚本的运行过程包括以下步骤:Optionally, the running process of the shell script includes the following steps:

运行检测程序对系统信息进行检测;Run the detection program to detect system information;

CPU内核频率信息存储文件;CPU core frequency information storage file;

对log进行信息注释;Annotate the log information;

对重复的进行计数处理;Count the duplicates;

检查用户输入运行次数数据,如果有输入运行次数数据则调用总共运行次数程序的返回值,否则使用默认次数;Check the number of running times entered by the user, if there is input running times data, call the return value of the total running times program, otherwise use the default number of times;

检查用户输入运行时间间隔数据,如果有输入运行时间间隔数据则调用主程序运行时间间隔程序的返回值,否则使用默认时间;Check the user input running time interval data, if there is input running time interval data, call the return value of the main program running time interval program, otherwise use the default time;

读取proc/cpuinfo文件,获取CPU核心数信息;Read the proc/cpuinfo file to obtain information about the number of CPU cores;

读取proc/cpuinfo文件,获取CPU model name信息及CPU频率信息,Read the proc/cpuinfo file to obtain CPU model name information and CPU frequency information,

如果CPU频率返回值为1,则输出获取失败;If the CPU frequency return value is 1, the output acquisition fails;

获取系统从BIOS获取的CPU的Turbo与EIST状态;Obtain the Turbo and EIST status of the CPU obtained by the system from the BIOS;

记录CPU标频;Record CPU standard frequency;

记录CPU核心数;Record the number of CPU cores;

记录CPU Turbo状态;Record CPU Turbo status;

记录CPU EIST状态;Record CPU EIST status;

记录CPU Hyper状态;Record CPU Hyper status;

根据运行次数数据和运行时间间隔数据循环运行服务器压力监控程序,最后输出系统当前压力状态并检查系统log信息。Run the server pressure monitoring program cyclically according to the running times data and running time interval data, and finally output the current pressure status of the system and check the system log information.

所述检测程序可以封装在可编辑的Toolbox工具盒中,通过编辑的Toolbox工具盒实现对系统BMClog、系统防火墙、系统log信息等的检查,检测程序包括以下程序:Described detection program can be encapsulated in editable Toolbox tool box, realizes the inspection to system BMClog, system firewall, system log information etc. by the Toolbox tool box of editing, and detection program comprises following program:

获取系统下CPU信息和CPU运行模式的程序;A program to obtain CPU information and CPU operating mode in the system;

获取系统下CPU运行频率的程序;A program to obtain the operating frequency of the CPU in the system;

输出频率信息的程序;Programs that output frequency information;

输出CPU核心信息的程序;A program that outputs CPU core information;

输出CPU超频状态的程序;A program that outputs the CPU overclocking status;

输出CPU节能状态的程序。A program that outputs the CPU power saving status.

本发明实施例是通过实时监测CPU运行状态来判断服务器当前运行压力,并实时显示,并通过一定频率检查响应系统log来监测系统当前健康状态,从而实现无人值守达到服务器压力自动化监控。程序运行次数及运行时间间隔的设置可通过主程序中定义的Total Times、Single Sleep Time来实现,其中total times用于定义主程序总共运行次数,Single Sleep Time用于定于主程序运行的时间间隔。The embodiment of the present invention judges the current operating pressure of the server by monitoring the operating state of the CPU in real time, and displays it in real time, and monitors the current health status of the system by checking the response system log at a certain frequency, so as to realize unattended and automatic monitoring of server pressure. The setting of program running times and running time interval can be realized through the Total Times and Single Sleep Time defined in the main program, where total times is used to define the total running times of the main program, and Single Sleep Time is used to set the time interval for running the main program .

本发明实施例的整个过程主要是利用shell(提供用户使用界面)脚本,通过实时读取系统下/proc/cpuinfo,model name中获取标称频率,cpu MHz获取各个核心动态频率,通过SCELNX_64输出bios选项,获取Turbo与EIST的状态。,通过这些参数的实时变化来监控系统负压状态,并将状态数据以文本形式输出,实现了服务器系统状态的自动化监控,避免了人为监控带来的疏忽。The whole process of the embodiment of the present invention mainly utilizes the shell (providing the user interface) script to read /proc/cpuinfo under the system in real time, obtain the nominal frequency in the model name, obtain each core dynamic frequency in cpu MHz, and output bios through SCELNX_64 option to get the status of Turbo and EIST. , monitor the negative pressure status of the system through the real-time changes of these parameters, and output the status data in text form, which realizes the automatic monitoring of the server system status and avoids the negligence caused by manual monitoring.

以上所述只是本发明的优选实施方式,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也被视为本发明的保护范围。The above is only a preferred embodiment of the present invention. For those of ordinary skill in the art, without departing from the principle of the present invention, some improvements and modifications can also be made, and these improvements and modifications are also considered as the present invention. protection scope of the invention.

Claims (8)

1.一种基于Linux系统的服务器压力自动化监控方法,其特征是,包括以下步骤:1. a kind of server pressure automatic monitoring method based on Linux system, it is characterized in that, comprises the following steps: 编辑服务器压力监控程序;Edit server pressure monitoring program; 设置服务器压力监控程序的运行次数及运行间隔时间;Set the running times and running interval of the server pressure monitoring program; 编写shell脚本,并将服务器压力监控程序的命令集成到shell脚本中;Write a shell script and integrate the commands of the server pressure monitoring program into the shell script; 运行shell脚本,获取当前系统的状态数据;Run the shell script to obtain the status data of the current system; 输出Turbo与EIST的状态。Output the status of Turbo and EIST. 2.根据权利要求1所述的一种基于Linux系统的服务器压力自动化监控方法,其特征是,所述服务器压力监控程序至少包括以下过程:2. a kind of server pressure automatic monitoring method based on Linux system according to claim 1, is characterized in that, described server pressure monitoring program at least comprises the following process: 获取系统下CPU信息和CPU运行模式的过程;The process of obtaining CPU information and CPU operation mode under the system; 获取系统下CPU运行频率的过程;The process of obtaining the operating frequency of the CPU under the system; 输出频率信息的过程;The process of outputting frequency information; 输出CPU核心信息的过程;The process of outputting CPU core information; 输出CPU超频状态的过程;The process of outputting the CPU overclocking status; 输出CPU节能状态的过程。The process of outputting the CPU energy-saving state. 3.根据权利要求1所述的一种基于Linux系统的服务器压力自动化监控方法,其特征是,所述服务器压力监控程序的运行次数为100~10000次。3 . The method for automatic monitoring of server pressure based on Linux system according to claim 1 , characterized in that, the running times of the server pressure monitoring program are 100 to 10,000 times. 4 . 4.根据权利要求1所述的一种基于Linux系统的服务器压力自动化监控方法,其特征是,所述服务器压力监控程序的运行间隔时间为8~20S。4 . The method for automatically monitoring server pressure based on Linux system according to claim 1 , wherein the running interval of the server pressure monitoring program is 8-20 seconds. 5.根据权利要求1所述的一种基于Linux系统的服务器压力自动化监控方法,其特征是,所述当前系统的状态数据利用服务器压力监控程序实时读取系统下/proc/cpuinfo文件来获取。5. A kind of server pressure automatic monitoring method based on Linux system according to claim 1, it is characterized in that, the state data of described current system utilizes server pressure monitoring program to read the /proc/cpuinfo file under the system in real time to obtain. 6.根据权利要求1所述的一种基于Linux系统的服务器压力自动化监控方法,其特征是,所述shell脚本的运行过程包括以下步骤:6. a kind of server pressure automatic monitoring method based on Linux system according to claim 1, is characterized in that, the operation process of described shell script comprises the following steps: 运行检测程序对系统信息进行检测;Run the detection program to detect system information; CPU内核频率信息存储文件;CPU core frequency information storage file; 对log进行信息注释;Annotate the log information; 对重复的进行计数处理;Count the duplicates; 检查用户输入运行次数数据,如果有输入运行次数数据则调用总共运行次数程序的返回值,否则使用默认次数;Check the number of running times entered by the user, if there is input running times data, call the return value of the total running times program, otherwise use the default number of times; 检查用户输入运行时间间隔数据,如果有输入运行时间间隔数据则调用主程序运行时间间隔程序的返回值,否则使用默认时间;Check the user input running time interval data, if there is input running time interval data, call the return value of the main program running time interval program, otherwise use the default time; 读取proc/cpuinfo文件,获取CPU核心数信息;Read the proc/cpuinfo file to obtain information about the number of CPU cores; 读取proc/cpuinfo文件,获取CPU model name信息及CPU频率信息,Read the proc/cpuinfo file to obtain CPU model name information and CPU frequency information, 如果CPU频率返回值为1,则输出获取失败;If the CPU frequency return value is 1, the output acquisition fails; 获取系统从BIOS获取的CPU的Turbo与EIST状态;Obtain the Turbo and EIST status of the CPU obtained by the system from the BIOS; 记录CPU标频;Record CPU standard frequency; 记录CPU核心数;Record the number of CPU cores; 记录CPU Turbo状态;Record CPU Turbo status; 记录CPU EIST状态;Record CPU EIST status; 记录CPU Hyper状态;Record CPU Hyper status; 根据运行次数数据和运行时间间隔数据循环运行服务器压力监控程序,最后输出系统当前压力状态并检查系统log信息。Run the server pressure monitoring program cyclically according to the running times data and running time interval data, and finally output the current pressure status of the system and check the system log information. 7.根据权利要求6所述的一种基于Linux系统的服务器压力自动化监控方法,其特征是,所述检测程序包括以下程序:7. a kind of server pressure automatic monitoring method based on Linux system according to claim 6, is characterized in that, described detection program comprises following program: 获取系统下CPU信息和CPU运行模式的程序;A program to obtain CPU information and CPU operating mode in the system; 获取系统下CPU运行频率的程序;A program to obtain the operating frequency of the CPU in the system; 输出频率信息的程序;Programs that output frequency information; 输出CPU核心信息的程序;A program that outputs CPU core information; 输出CPU超频状态的程序;A program that outputs the CPU overclocking status; 输出CPU节能状态的程序。A program that outputs the CPU power saving status. 8.根据权利要求1-7任意一项所述的一种基于Linux系统的服务器压力自动化监控方法,其特征是,所述Turbo与EIST的状态通过SCELNX_64输出bios选项来获取,并以文本形式输出。8. according to a kind of automatic monitoring method of server pressure based on Linux system according to any one of claim 1-7, it is characterized in that, the state of described Turbo and EIST is obtained by SCELNX_64 output bios option, and output in text form .
CN201710624524.1A 2017-07-27 2017-07-27 A kind of automatically-monitored method of server stress based on linux system Pending CN107276855A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710624524.1A CN107276855A (en) 2017-07-27 2017-07-27 A kind of automatically-monitored method of server stress based on linux system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710624524.1A CN107276855A (en) 2017-07-27 2017-07-27 A kind of automatically-monitored method of server stress based on linux system

Publications (1)

Publication Number Publication Date
CN107276855A true CN107276855A (en) 2017-10-20

Family

ID=60078271

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710624524.1A Pending CN107276855A (en) 2017-07-27 2017-07-27 A kind of automatically-monitored method of server stress based on linux system

Country Status (1)

Country Link
CN (1) CN107276855A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109656765A (en) * 2018-12-18 2019-04-19 郑州云海信息技术有限公司 A kind of server Memory Mode automated test tool

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030167270A1 (en) * 2000-05-25 2003-09-04 Werme Paul V. Resource allocation decision function for resource management architecture and corresponding programs therefor
CN105260286A (en) * 2015-10-29 2016-01-20 浪潮电子信息产业股份有限公司 Method for monitoring CPU working state in real time
CN106021084A (en) * 2016-05-23 2016-10-12 浪潮电子信息产业股份有限公司 Method and apparatus for testing server performance

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030167270A1 (en) * 2000-05-25 2003-09-04 Werme Paul V. Resource allocation decision function for resource management architecture and corresponding programs therefor
CN105260286A (en) * 2015-10-29 2016-01-20 浪潮电子信息产业股份有限公司 Method for monitoring CPU working state in real time
CN106021084A (en) * 2016-05-23 2016-10-12 浪潮电子信息产业股份有限公司 Method and apparatus for testing server performance

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CUKER919: ""/proc/cpuinfo文件分析(查看CPU信息)", 《CSDN博客,BLOG.CSDN.NET/CUKER919/ARTICLE/DETAILS/7635488/》 *
林守林: "基于CPU利用率的功率调整策略的研究与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109656765A (en) * 2018-12-18 2019-04-19 郑州云海信息技术有限公司 A kind of server Memory Mode automated test tool

Similar Documents

Publication Publication Date Title
US11922100B2 (en) System and method for energy usage accounting in software applications
Pinto et al. Energy efficiency: a new concern for application software developers
CN114978883B (en) Network wakeup management method and device, electronic equipment and storage medium
Zhang et al. A comparison of energy bugs for smartphone platforms
CN105491143A (en) A software running state monitoring system and its implementation method
CN104461849B (en) CPU and GPU software power consumption measuring methods in a kind of mobile processor
CN107656856A (en) A kind of system mode display methods and device based on CPLD
CN108763002A (en) The method and system of cpu fault are predicted based on machine learning
CN108121842B (en) Verification method and device for low power consumption working mode of multiprocessor system chip
CN105892611A (en) CPU power-on time sequence control method, device and system
CN109257249A (en) A kind of network interface card stability test method, apparatus, terminal and storage medium
CN107391378A (en) The generation method and device of a kind of test script
CN105486998A (en) Processor board card parameter lossless automatic test method and monitoring host device
CN109032874A (en) A kind of memory pressure test method, device, terminal and storage medium
CN204044803U (en) A kind of server master board trouble-shooter of USB interface
CN107276855A (en) A kind of automatically-monitored method of server stress based on linux system
CN109783295A (en) Test macro self-test method for producing software and device based on configuration
CN114328103A (en) Method, system and related equipment for OpenBMC monitoring and management of discrete sensor
CN107631892A (en) A kind of method and system of fan test
CN107632911A (en) A kind of Cabinet-type server power consumption test method and test system
CN101751283B (en) Virtual machine monitor, dummy machine system and client operation system state acquiring method
Procaccianti et al. Energy efficiency in the ict-profiling power consumption in desktop computer systems
CN106055445A (en) Automatic CPU pressure testing method
CN114896824B (en) Joint simulation integration test verification method and device, readable storage medium and equipment
CN106909491A (en) A kind of BIOS tunings framework and method for reducing server energy consumption

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20171020

RJ01 Rejection of invention patent application after publication