[go: up one dir, main page]

CN104346248A - Audit function implementation method based on history command - Google Patents

Audit function implementation method based on history command Download PDF

Info

Publication number
CN104346248A
CN104346248A CN201410552563.1A CN201410552563A CN104346248A CN 104346248 A CN104346248 A CN 104346248A CN 201410552563 A CN201410552563 A CN 201410552563A CN 104346248 A CN104346248 A CN 104346248A
Authority
CN
China
Prior art keywords
command
implementation method
audit function
function implementation
method based
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
CN201410552563.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.)
IEIT Systems 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 CN201410552563.1A priority Critical patent/CN104346248A/en
Publication of CN104346248A publication Critical patent/CN104346248A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

本发明公开了一种基于history命令的审计功能实现方法,其具体实现过程为:创建Log存放位置;修改路径、文件权限;添加shell命令并生效,进行存档操作;当出现疑似问题时,查看命令执行的log;将之前相关操作进行还原,查找问题原因;当问题依然存在时,重复上述操作继续查找其它原因。该一种基于history命令的审计功能实现方法与现有技术相比,方便随时查看历史命令,从而有助于在定位问题的时候能够更加快速实用性强,查错效率高,适用范围广泛,易于推广。

The invention discloses a method for realizing the audit function based on the history command. The specific realization process is as follows: creating a log storage location; modifying the path and file permissions; adding a shell command and taking effect, and performing an archive operation; when a suspected problem occurs, check the command Execution log; restore the previous related operations to find the cause of the problem; if the problem still exists, repeat the above operations to continue to find other reasons. Compared with the existing technology, this audit function implementation method based on the history command is convenient to view historical commands at any time, thus helping to locate problems faster and more practical, with high error checking efficiency, wide application range, and easy access. promote.

Description

A kind of audit function implementation method based on history order
Technical field
The present invention relates to server info technical field, specifically a kind of practical, based on the audit function implementation method of history order.
Background technology
Along with the development of IT field technology, conventional informationization service and the increasingly powerful stability requirement of cloud computing service to server more and more higher.As server product provider, a server all needs to carry out various test to product in development or production phase, and be find the problem of product thus the quality of this product of strict guarantee as testing authentication department prime responsibility.In test process, we can run into some problems, sometimes may be our some improper operations of carrying out and cause, in order to problem can more rapidly and efficiently be located, we need the process to we perform to carry out record, can navigate to very soon when going wrong the end be product itself existing problems or our operation causes, because problems really exists in our practical operation, and be easy to cause temporal waste and delay.
Based on this, now provide a kind of audit function implementation method based on history order, the method, by calling the history function carried in the Linux system that uses in testing, is checked and its operational order recorded is realized the quick position to product problem.
But sometimes time point also can have effect very much for the location of problem, self-definedly in history order a kind ofly can to log in when performing user, time, execution and use the information such as IP thus the function realizing audit seems particularly important by record order under this demand, thus in the present invention, the record of above-mentioned information is also realized by shell script.
Summary of the invention
Technical assignment of the present invention is for above weak point, provide a kind of practical, based on the audit function implementation method of history order.
Based on an audit function implementation method for history order, its specific implementation process is:
One, Log deposit position is created;
Two, path, file permission is revised;
Three, add shell-command and come into force, carrying out archive operations;
Four, when there is doubtful problem, the log that viewing command performs;
Five, will reduce by associative operation before, search problem reason;
Six, when problem still exists, repeat aforesaid operations and continue to search other reason.
Described file permission comprises root user right and general user's authority.
The shell-command of described interpolation comprises execution content, the archive operations information of execution time.
Described shell-command adds to/etc/profile in, and perform source/etc/profile and make it to come into force.
A kind of audit function implementation method based on history order of the present invention, has the following advantages:
A kind of audit function implementation method based on history order of this invention can log in information such as using IP when performing user, time, execution by record order, by use script on history self-defined go out we test some paid close attention to key messages, as the execution time, perform user etc. to add, and generate log file so that staff can check at any time, thus contribute to manufacturer can be quicker when orientation problem; Accurate positioning, practical, debugging efficiency is high, and debugging content is comprehensive, applied widely, is easy to promote.
Accompanying drawing explanation
Accompanying drawing 1 is realization flow figure of the present invention.
Embodiment
Below in conjunction with the drawings and specific embodiments, the invention will be further described.
Linux system carry history function for we furnish us with exectorial historical record, but because it is that basic information sometimes goes orientation problem also to lack the information of some necessity for us, the invention provides a kind of audit function implementation method based on history order, the method by use script on history self-defined go out we test some paid close attention to key message (execution time, perform user etc.) add, and we generate log file so that can check at any time, so that we are in the inquiry carrying out associative operation that goes wrong, thus assist our orientation problem.As shown in Figure 1, its specific implementation process is:
One, Log deposit position is created;
Two, path, file permission is revised;
Three, add shell-command and come into force, carrying out archive operations;
Four, when there is doubtful problem, the log that viewing command performs;
Five, will reduce by associative operation before, search problem reason;
Six, when problem still exists, repeat aforesaid operations and continue to search other reason.
Described file permission comprises root user right and general user's authority.
The shell-command of described interpolation comprises execution content, the archive operations information of execution time.
Described shell-command adds to/etc/profile in, and perform source/etc/profile and make it to come into force.
The core content of described shell script is:
export PROMPT_COMMAND='{ z=$(history 1 | { read x y; echo $y; }); echo -n $(date "+%c") :: $z ::; who am i; } >> $HOME/.history-timestamp'。
The present invention realizes the exectorial audit of operating system by using SHELL script edit, and encounter problems for test process and carry out assistant analysis, the method also can surpass very important effect in system routine maintenance procedure simultaneously.
Above-mentioned embodiment is only concrete case of the present invention; scope of patent protection of the present invention includes but not limited to above-mentioned embodiment; claims of any a kind of audit function implementation method based on history order according to the invention and any person of an ordinary skill in the technical field to its suitable change done or replacement, all should fall into scope of patent protection of the present invention.

Claims (4)

1., based on an audit function implementation method for history order, it is characterized in that its specific implementation process is:
One, Log deposit position is created;
Two, path, file permission is revised;
Three, add shell-command and come into force, carrying out archive operations;
Four, when there is doubtful problem, the log that viewing command performs;
Five, will reduce by associative operation before, search problem reason;
Six, when problem still exists, repeat aforesaid operations and continue to search other reason.
2. a kind of audit function implementation method based on history order according to claim 1, is characterized in that: described file permission comprises root user right and general user's authority.
3. a kind of audit function implementation method based on history order according to claim 1, is characterized in that: the shell-command of described interpolation comprises execution content, the archive operations information of execution time.
4. a kind of audit function implementation method based on history order according to claim 3, is characterized in that: described shell-command adds to/etc/profile in, and perform source/etc/profile and make it to come into force.
CN201410552563.1A 2014-10-17 2014-10-17 Audit function implementation method based on history command Pending CN104346248A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410552563.1A CN104346248A (en) 2014-10-17 2014-10-17 Audit function implementation method based on history command

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410552563.1A CN104346248A (en) 2014-10-17 2014-10-17 Audit function implementation method based on history command

Publications (1)

Publication Number Publication Date
CN104346248A true CN104346248A (en) 2015-02-11

Family

ID=52501922

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410552563.1A Pending CN104346248A (en) 2014-10-17 2014-10-17 Audit function implementation method based on history command

Country Status (1)

Country Link
CN (1) CN104346248A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108959021A (en) * 2018-06-14 2018-12-07 郑州云海信息技术有限公司 It is a kind of to carry out the method and system that NAS order executes time statistics using script

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004185345A (en) * 2002-12-04 2004-07-02 Hitachi Ltd Debugging method and system
US6871221B1 (en) * 2000-01-21 2005-03-22 Scriptlogic Corporation Method and apparatus to manage network client logon scripts using a graphical management and administration tool
US7627857B2 (en) * 2004-11-15 2009-12-01 International Business Machines Corporation System and method for visualizing exception generation
CN102184138A (en) * 2011-05-19 2011-09-14 广东威创视讯科技股份有限公司 Method and system for automatically reproducing and positioning software error
CN103250111A (en) * 2011-12-07 2013-08-14 三菱电机株式会社 Screen-data editing device for programmable display device
CN103944973A (en) * 2014-04-02 2014-07-23 北京中交兴路车联网科技有限公司 Method and device for collecting logs

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6871221B1 (en) * 2000-01-21 2005-03-22 Scriptlogic Corporation Method and apparatus to manage network client logon scripts using a graphical management and administration tool
JP2004185345A (en) * 2002-12-04 2004-07-02 Hitachi Ltd Debugging method and system
US7627857B2 (en) * 2004-11-15 2009-12-01 International Business Machines Corporation System and method for visualizing exception generation
CN102184138A (en) * 2011-05-19 2011-09-14 广东威创视讯科技股份有限公司 Method and system for automatically reproducing and positioning software error
CN103250111A (en) * 2011-12-07 2013-08-14 三菱电机株式会社 Screen-data editing device for programmable display device
CN103944973A (en) * 2014-04-02 2014-07-23 北京中交兴路车联网科技有限公司 Method and device for collecting logs

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108959021A (en) * 2018-06-14 2018-12-07 郑州云海信息技术有限公司 It is a kind of to carry out the method and system that NAS order executes time statistics using script

Similar Documents

Publication Publication Date Title
WO2018201797A1 (en) Block chain-based distributed storage
US20190187677A1 (en) System, method and computer program product for fault detection and location in power grid
US10394697B2 (en) Focus area integration test heuristics
CN102831052B (en) Test exemple automation generating apparatus and method
KR20210049033A (en) Method for fault injection, device, electronic equipment and storage medium
US8924916B2 (en) Software development standards compliance system
CN111291339B (en) Method, device, equipment and storage medium for processing blockchain data
CN109189602A (en) A kind of PCIE Slot Fault Locating Method, device and equipment
CN106681854B (en) An information verification method, device and system
US20160224462A1 (en) Devices and methods for generating test cases
US20190377662A1 (en) Identifying a source file for use in debugging compiled code
CN104601403A (en) Automatic test system
BR112017001171B1 (en) METHOD PERFORMED ON A COMPUTING DEVICE, COMPUTING DEVICE AND COMPUTER READABLE MEMORY DEVICE TO RECOVER THE OPERABILITY OF A CLOUD-BASED SERVICE
CN103838624A (en) Log processing method based on Linux message queue
US20160373313A1 (en) Impact analysis system and method
CN112527546A (en) Application exception rapid positioning method, system, equipment and storage medium
CN109885505A (en) A fault location method, system and related components
CN105302681A (en) Automatic test method for disk performance of rack whole cabinet
US11631416B1 (en) Audio content validation via embedded inaudible sound signal
CN104346248A (en) Audit function implementation method based on history command
Fakih et al. LLM4CVE: Enabling Iterative Automated Vulnerability Repair with Large Language Models
CN105574081B (en) A kind of data source tracing method based on no circuit digraph
US10664338B2 (en) System and method for root cause analysis in large scale data curation flows using provenance
CN113282583A (en) Data storage method, device, equipment and storage medium
CN113760696B (en) A program problem locating method, device, electronic device and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20150211

WD01 Invention patent application deemed withdrawn after publication