CN105701151B - A kind of system information acquisition method and device - Google Patents

A kind of system information acquisition method and device Download PDF

Info

Publication number
CN105701151B
CN105701151B CN201511017426.9A CN201511017426A CN105701151B CN 105701151 B CN105701151 B CN 105701151B CN 201511017426 A CN201511017426 A CN 201511017426A CN 105701151 B CN105701151 B CN 105701151B
Authority
CN
China
Prior art keywords
information
obtains
database
shell script
category
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
CN201511017426.9A
Other languages
Chinese (zh)
Other versions
CN105701151A (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 Beijing Electronic Information Industry Co Ltd
Original Assignee
Inspur Beijing 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 Beijing Electronic Information Industry Co Ltd filed Critical Inspur Beijing Electronic Information Industry Co Ltd
Priority to CN201511017426.9A priority Critical patent/CN105701151B/en
Publication of CN105701151A publication Critical patent/CN105701151A/en
Application granted granted Critical
Publication of CN105701151B publication Critical patent/CN105701151B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/211Schema design and management

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the present invention provides a kind of system information acquisition method and device, and wherein method includes: to obtain predetermined system information by shell script, obtains message file;All message files are converted into html format, obtain convert file;The convert file is shown in frame window.When need to obtain system information every time, system obtains all preset system informations automatically by shell script, carry out corresponding system operatio or input data library command manually again without user to obtain the system information of needs one by one, various types database is familiar with without user, process is simple and operation is convenient, simultaneously, all system informations that will acquire are shown in frame window with html, user can uniformly be checked by all system informations of the frame window to acquisition, be read convenient for system information of the user to acquisition.

Description

A kind of system information acquisition method and device
Technical field
The present invention relates to technical field of information processing, more particularly to a kind of system information acquisition method and device.
Background technique
Currently, system information (such as system configuration information, system operation information and operate in the database information in system Etc. information) collection need to obtain by executing corresponding system operatio and database command by hand respectively, it is every to obtain one Item system information, just needs user to carry out corresponding system operatio manually or is manually entered corresponding database command, and needle To different types of database (such as: ORACLE database, DB2 database and MySQL database etc.), in order to obtain each data The information in library, such as the information such as configuration, operation, log of database, need according to type of database using different method and Order, this, which requires operator to be familiar with various types database, just can be achieved, and process is cumbersome complicated and operation is more difficult, together When, each system operatio or database command generate an independent file, and the file of generation may be very more, also give file Check that reading is made troubles.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of system information acquisition method and device, to solve in the prior art System information is obtained by executing corresponding system operatio and database command by hand, and is directed to different types of database, In order to obtain each database information, need according to type of database using different method and order, this requires operator ripe Knowing various types database just can be achieved, and process is cumbersome complicated and operation is more difficult, meanwhile, each system operatio or data The problem of library command generates an independent file, and the file of generation may be very more, also makes troubles to Fileview reading.
To achieve the above object, the embodiment of the present invention provides the following technical solutions:
A kind of system information acquisition method, comprising:
Predetermined system information is obtained by shell script, obtains message file;
All message files are converted into html format, obtain convert file;
The convert file is shown in frame window.
Wherein, passed through shell script obtains predetermined system information, before obtaining message file further include:
The system information that determination need to obtain obtains predetermined system information, according to the classification of the predetermined system information to institute It states predetermined system information to classify, obtains each first category information;
Classified respectively to each first category information according to the classification of each first category information, obtains each Two classification informations;
Determine obtain each second category information needed for shell script, by each shell script respectively with its phase Corresponding second category information is bound.
Wherein, described to obtain predetermined system information by shell script, obtaining message file includes:
Determine the second category information that the predetermined system information includes;
Each second category information is obtained respectively by each shell script with second category information binding, is obtained To message file.
Wherein, it is described the convert file is carried out in frame window display include:
All first kind information are shown in the first display area of the frame window;
The first kind information that identification user chooses in first display area, the first kind that the user is chosen The corresponding all second category information of information are shown in the second display area of the frame window;
The second category information that identification user chooses in second display area, the second category that the user is chosen The corresponding all convert files of information are shown in the third display area of the frame window.
Wherein, the first category information includes: configuration information, operation information and database information,
The corresponding second category information of the configuration information includes: CPU information, memory information and disc information;
The corresponding second category information of the operation information includes: CPU usage information, memory usage information and magnetic Disk occupancy rate information;
The corresponding second category information of the database information includes: ORACLE database information, DB2 database information And/or MySQL database information.
Wherein, described to obtain each second category information respectively by shell script, obtaining message file includes:
Judge whether there is ORACLE database, and if it exists, then determine and obtain first of information in ORACLE database Shell script obtains information in ORACLE database by the first shell script, obtains first information file;
Judge whether there is DB2 database, and if it exists, then determine the 2nd shell foot for obtaining information in DB2 database This, obtains information in DB2 database by the 2nd shell script, obtains the second message file;
Judge whether there is MySQL database, and if it exists, then determine the 3rd shell for obtaining information in MySQL database Script obtains information in the MySQL database by the 3rd shell script, obtains third message file.
A kind of system information acquisition device, comprising: obtain module, conversion module and display module;Wherein,
The acquisition module obtains message file for obtaining predetermined system information by shell script;
The conversion module obtains convert file for all message files to be converted into html format;
The display module, for showing the convert file in frame window.
Wherein, the system information acquisition device further include: classification binding module, the system letter that need to be obtained for determination Breath, obtains predetermined system information, is classified according to the classification of the predetermined system information to the predetermined system information, obtained Each first category information;Classified respectively to each first category information according to the classification of each first category information, Each second category information is obtained, shell script needed for obtaining each second category information is determined, by each shell foot This second category information respectively corresponding thereto is bound.
Wherein, the display module includes: the first display unit, the second display unit and third display unit;Wherein,
First display unit, for showing all first kind information the first of the frame window Display area;
Second display unit, the first kind information that user chooses in first display area for identification will The corresponding all second category information of first kind information of user's selection are shown in the second of the frame window and show Show region;
The third display unit, the second category information that user chooses in second display area for identification will The corresponding all convert files of second category information that the user chooses are shown in the third viewing area of the frame window Domain.
Wherein, the acquisition module include: the first judgement acquiring unit, second judge acquiring unit and third judgement obtain Unit;Wherein,
Described first judges acquiring unit, for judging whether there is ORACLE database, and if it exists, then determines and obtains First shell script of information in ORACLE database is obtained in ORACLE database by the first shell script and is believed Breath, obtains first information file;
Described second judges acquiring unit, for judging whether there is DB2 database, and if it exists, then determines and obtains DB2 number According to the 2nd shell script of information in library, information in DB2 database is obtained by the 2nd shell script, obtains the second letter Cease file;
The third judges acquiring unit, for judging whether there is MySQL database, and if it exists, then determines and obtains 3rd shell script of information in MySQL database is obtained in the MySQL database by the 3rd shell script and is believed Breath, obtains third message file.
Based on the above-mentioned technical proposal, system information acquisition method and device provided in an embodiment of the present invention, pass through shell foot This acquisition predetermined system information, obtains message file, and all obtained message files are then converted into html format, are obtained Convert file finally shows obtained convert file in frame window.When need to obtain system information every time, user Only need to run the system information acquisition device, which will obtain all automatically by shell script Preset system information carries out corresponding system operatio or input data library command manually again without user to obtain need one by one The system information wanted is familiar with various types database without user, and process is simple and operation is convenient, meanwhile, the institute that will acquire There is system information to be shown in frame window with html, user can be by frame window to all systems of acquisition System information is uniformly checked, is read convenient for system information of the user to acquisition.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is the flow chart of system information acquisition method provided in an embodiment of the present invention;
Fig. 2 is predetermined system information to be arranged in system information acquisition method provided in an embodiment of the present invention and to predetermined system Information carries out the method flow diagram of classification binding;
Fig. 3 is provided for the embodiment of the present invention and is obtained predetermined system information, the method for obtaining message file by shell script Flow chart;
Fig. 4 is to carry out convert file in frame window in system information acquisition method provided in an embodiment of the present invention The method flow diagram of display;
Fig. 5 is to obtain each second respectively by shell script in system information acquisition method provided in an embodiment of the present invention Classification information obtains the method flow diagram of message file;
Fig. 6 is the system block diagram of system information acquisition device provided in an embodiment of the present invention;
Fig. 7 is the another system block diagram of system information acquisition device provided in an embodiment of the present invention;
Fig. 8 is the structural block diagram of display module 300 in system information acquisition device provided in an embodiment of the present invention;
Fig. 9 is the structural block diagram that module 100 is obtained in system information acquisition device provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
Fig. 1 is the flow chart of system information acquisition method provided in an embodiment of the present invention, when need to obtain system information every time, System obtains all preset system informations automatically by shell script, carries out corresponding system operatio manually again without user Or input data library command obtains the system informations of needs one by one, is familiar with various types database, process without user Simple and operation is convenient, meanwhile, all system informations that will acquire are shown in frame window with html, are used Family can uniformly be checked by all system informations of the frame window to acquisition, convenient for user to the system information of acquisition into Row is read;Referring to Fig.1, which may include:
Step S100: predetermined system information is obtained by shell script, obtains message file;
Optionally, it is checked for the ease of predetermined system information of the user to acquisition, therefore, is passing through shell script Before acquisition predetermined system information obtains message file, the system information that can need to be obtained in determination, after obtaining predetermined system information, root Classify according to the classification of predetermined system information to all predetermined system information, passes through the predetermined system information of each classification respectively Corresponding shell script obtains the predetermined system information of each classification, obtains message file.
Optionally, the system information that need to be obtained in determination can be first according to obtained default letter after obtaining predetermined system information Breath according to classification classify to all presupposed informations, each first category information is obtained, further according to each first category information Classification respectively classifies to each first category information, obtains each second category information, carries out to all predetermined system information Classification.
Optionally, classify to all predetermined system information, obtain each first category information and each second category letter After breath, shell script needed for obtaining each second category information can be determined again, corresponding thereto by each shell script difference Second category information is bound, after the second category information of each shell script respectively corresponding thereto will be bound, When obtaining predetermined system information by shell script, it can be obtained respectively by the shell script respectively with the binding of second category information Each second category information is taken, message file is obtained.
Optionally, according to presupposed information according to classification, all presupposed informations can be classified as configuration information, operation information And database information, i.e. first category information may include configuration information, operation information and database information.
Optionally, if after classifying to all presupposed informations, obtained first category information includes configuration information, even First category information includes configuration information, then according to the classification of each configuration information, configuration information can be classified as to CPU information, interior Information and disc information are deposited, i.e. the corresponding second category information of configuration information may include CPU information, memory information and disk letter Breath.
Optionally, if after classifying to all presupposed informations, obtained first category information includes operation information, even First category information includes operation information, then according to the classification of each operation information, operation information can be classified as to CPU usage letter Breath, memory usage information and disk occupancy rate information, the i.e. corresponding second category information of operation information may include that CPU is used Rate information, memory usage information and disk occupancy rate information.
Optionally, if after classifying to all presupposed informations, obtained first category information includes database information, i.e., If first category information includes database information, according to the classification of each database information, configuration information can be classified as ORACLE database information, DB2 database information and/or MySQL database information, the i.e. corresponding second category of configuration information Information may include ORACLE database information, DB2 database information and/or MySQL database information.
Optionally, because ORACLE database information, DB2 database information and MySQL data may be only included in system Therefore one or both of library information when obtaining each second category information respectively by shell script, obtains message file, It, can be by first judging whether there is ORACLE database, when true in the corresponding second category information of acquisition database information When there is ORACLE database surely, then determine obtain ORACLE database in information the first shell script, by this first Shell script obtains information in ORACLE database, obtains first information file.
Optionally, similarly, when obtaining each second category information respectively by shell script, message file is obtained, is being obtained It, can be by first judging whether there is DB2 database, when determining that there are DB2 when the corresponding second category information of database information It when database, then determines the 2nd shell script for obtaining information in DB2 database, DB2 is obtained by the 2nd shell script Information in database obtains the second message file.
Optionally, likewise, obtaining message file when obtaining each second category information respectively by shell script, obtaining When taking the corresponding second category information of database information, can exist by first judging whether there is MySQL database when determining It when MySQL database, then determines the 3rd shell script for obtaining information in MySQL database, passes through the 3rd shell script Information in MySQL database is obtained, third message file is obtained.
Step S110: all message files are converted into html format, obtain convert file;
Predetermined system information is obtained by shell script, obtained message file is generally text formatting, and is not easy to unite One observation is checked, therefore, obtained message file can be converted into html after obtaining the message file that shell script obtains Format obtains convert file, wherein and convert file is corresponding identical as the content of predetermined system information described in message file, Accordingly it is also possible to think, convert file is the message file of html format.
Step S120: the convert file is shown in frame window.
After the convert file for obtaining html format, obtained convert file is shown in frame window, All predetermined system information that will acquire are shown in frame window with html, and user can pass through frame window All predetermined system information of acquisition are uniformly checked, are read convenient for system information of the user to acquisition.
Optionally, if predetermined system information is carried out classification processing, each first category information and each second category letter are obtained Breath, then can be by respectively distinguishing first kind information, Second Type information and the corresponding convert file of Second Type information It is shown in the first display area, the second display area and third display area of frame window, by convert file in frame It is shown in window.
Optionally, if by respectively by first kind information, Second Type information and corresponding turn of Second Type information Exchange of notes part is respectively displayed on the first display area, the second display area and third display area of frame window, will convert text Part is shown in frame window, then can first be shown all first kind information in the first viewing area of frame window Domain, then in identification user after the first kind information that first display area is chosen, then the first kind that the user is chosen The corresponding all second category information of type information are shown in the second display area of frame window, finally exist in identification user After the second category information that second display area is chosen, then the second category information that the user is chosen is all turns corresponding Exchange of notes part is shown in the third display area of the frame window.
Based on the above-mentioned technical proposal, system information acquisition method and device provided in an embodiment of the present invention, pass through shell foot This acquisition predetermined system information, obtains message file, and all obtained message files are then converted into html format, are obtained Convert file finally shows obtained convert file in frame window.When need to obtain system information every time, user Only need to run the system information acquisition device, which will obtain all automatically by shell script Preset system information carries out corresponding system operatio or input data library command manually again without user to obtain need one by one The system information wanted is familiar with various types database without user, and process is simple and operation is convenient, meanwhile, the institute that will acquire There is system information to be shown in frame window with html, user can be by frame window to all systems of acquisition System information is uniformly checked, is read convenient for system information of the user to acquisition.
Optionally, Fig. 2 shows predetermined system information is arranged in system information acquisition method provided in an embodiment of the present invention And the method flow diagram of classification binding is carried out to predetermined system information, referring to Fig. 2, the setting predetermined system information and to default system System information carry out classification binding method may include:
Step S200: the system information that determination need to obtain obtains predetermined system information, according to the predetermined system information Classification classifies to the predetermined system information, obtains each first category information;
It is checked for the ease of predetermined system information of the user to acquisition, the system information that can need to be obtained in determination obtains To after predetermined system information, classified according to the classification of predetermined system information to all predetermined system information, respectively by each The corresponding shell script of the predetermined system information of a classification obtains the predetermined system information of each classification, obtains information text Part.
In the system information that determination need to obtain, after obtaining predetermined system information, can first according to obtained presupposed information according to Classification classify to all presupposed informations, obtain each first category information, for example, can by according to obtained presupposed information by According to classification all presupposed informations are classified as configuration information, operation information and database information to get the first category letter arrived Breath may include configuration information, operation information and database information.
Step S210: each first category information is divided respectively according to the classification of each first category information Class obtains each second category information;
After obtaining each first category information, each first category can be believed respectively further according to the classification of each first category information Breath is classified, and each second category information is obtained.For example, configuration information can be classified as to CPU information, memory information and disk letter Breath, is classified as CPU usage information, memory usage information and disk occupancy rate information for operation information, by configuration information point Class is ORACLE database information, DB2 database information and/or MySQL database information.
Step S220: shell script needed for obtaining each second category information is determined, by each shell script Second category information corresponding thereto is bound respectively.
Classify to all predetermined system information, it, can after obtaining each first category information and each second category information It determines shell script needed for obtaining each second category information, the second category of each shell script respectively corresponding thereto is believed Breath is bound, in this way, when obtaining predetermined system information by shell script, it can be by respectively being bound with second category information Shell script obtain each second category information respectively, obtain message file.
Optionally, Fig. 3 has shown in system information acquisition method provided in an embodiment of the present invention and has been obtained by shell script Predetermined system information is taken, the method flow diagram of message file is obtained, referring to Fig. 3, predetermined system letter should be obtained by shell script Breath, the method for obtaining message file may include:
Step S300: the second category information that the predetermined system information includes is determined;
Step S310: each second class is obtained by each shell script with second category information binding respectively Other information, obtains message file.
Classify to all predetermined system information, obtains each first category information and each second category information, and will After the second category information of each shell script respectively corresponding thereto is bound, each second category information has and its phase The shell script of binding, can be by determining the predetermined system information second category information that include, then by respectively and second category The shell script of information binding obtains each second category information respectively, obtains predetermined system letter by shell script to realize Breath, obtains message file.
Optionally, Fig. 4 is shown convert file in system information acquisition method provided in an embodiment of the present invention in frame The method flow diagram shown in window, referring to Fig. 4, which can To include:
Step S400: all first kind information are shown in the first display area of the frame window;
If predetermined system information is carried out classification processing, each first category information and each second category information are obtained, and lead to It crosses the shell script respectively with the binding of second category information and obtains each second category information, obtain message file, then will obtain It, then can be by dividing when being shown obtained convert file in frame window after message file is converted to convert file First kind information, Second Type information and the corresponding convert file of Second Type information frame window is not respectively displayed on The first display area, the second display area and the third display area of mouth, convert file is shown in frame window Show.
If by respectively by first kind information, Second Type information and the corresponding convert file point of Second Type information It is not shown in the first display area, the second display area and third display area of frame window, convert file is existed It is shown in frame window, it, can be first by all first kind information for the ease of system information needed for user query retrieval It is shown in the first display area of frame window.
Step S410: the first kind information that identification user chooses in first display area chooses the user The corresponding all second category information of first kind information be shown in the second display area of the frame window;
It is shown behind the first display area of frame window by all first kind information, user will be in the frame window First display area of mouth views all first kind information, and user is shown in the first display of frame window viewing After the first kind information in region, can according to the classification that need to check information, checked in the need that the first display area is chosen the One type information is identifying user after the first kind information that first display area is chosen, first which is chosen The corresponding all second category information of type information are shown in the second display area of frame window.
Step S420: the second category information that identification user chooses in second display area chooses the user The corresponding all convert files of second category information be shown in the third display area of the frame window.
It shows in the corresponding all second category information of first kind information for choosing user the of frame window Behind two display areas, user will view all Second Type information, Yong Hu in the second display area of the frame window View after being shown in the Second Type information of the second display area of frame window, can according to the classification that need to check information, In the Second Type information that the need that the second display area is chosen are checked, second chosen in identification user in second display area After type information, the corresponding all convert files of Second Type information which chooses are shown in the third of frame window Show that region is shown, the information that the third display area of the frame window is shown is the system information that user need to check.
Optionally, Fig. 5 shows in system information acquisition method provided in an embodiment of the present invention and is distinguished by shell script Each second category information is obtained, the method flow diagram of message file is obtained, referring to Fig. 5, should be obtained respectively respectively by shell script Second category information, the method for obtaining message file may include:
Step S500: ORACLE database is judged whether there is, and if it exists, then determine and obtain information in ORACLE database The first shell script, by the first shell script obtain ORACLE database in information, obtain first information file;
Because may be only included in system in ORACLE database information, DB2 database information and MySQL database information One or two therefore when obtaining each second category information respectively by shell script, obtain message file, obtaining number When second category information corresponding according to library information, can exist by first judging whether there is ORACLE database when determining It when ORACLE database, then determines the first shell script for obtaining information in ORACLE database, passes through the first shell foot Information in this acquisition ORACLE database, obtains first information file.
Step S510: DB2 database is judged whether there is, and if it exists, then determine and obtain second of information in DB2 database Shell script obtains information in DB2 database by the 2nd shell script, obtains the second message file;
Similarly, due to that may not include DB2 database in system, when obtaining each the respectively by shell script Two classification informations, obtain message file, in the corresponding second category information of acquisition database information, need to first judge whether to deposit In DB2 database, is determining there are after DB2 database, then determine the 2nd shell script for obtaining information in DB2 database, leading to It crosses the 2nd shell script and obtains information in DB2 database, obtain the second message file.
Step S520: MySQL database is judged whether there is, and if it exists, then determine and obtain information in MySQL database 3rd shell script obtains information in the MySQL database by the 3rd shell script, obtains third information text Part.
Likewise, due to that may also not include MySQL database in system, it is obtained respectively when by shell script Each second category information is taken, message file is obtained, in the corresponding second category information of acquisition database information, also needs first to sentence It is disconnected to whether there is MySQL database, it is determining there are after MySQL database, then determine and obtain the of information in MySQL database Three shell scripts obtain information in MySQL database by the 3rd shell script, obtain third message file.
System information acquisition method provided in an embodiment of the present invention, when need to obtain system information every time, system automatically by Shell script obtains all preset system informations, carries out corresponding system operatio or input data manually again without user Library command obtains the system informations of needs one by one, is familiar with various types database without user, process is simple and operation just Victory, meanwhile, all system informations that will acquire are shown that user can pass through frame with html in frame window Window uniformly checks all system informations of acquisition, reads convenient for system information of the user to acquisition
System information acquisition device provided in an embodiment of the present invention is introduced below, systems described below information obtains Take device that can correspond to each other reference with system as described above information acquisition method.
Fig. 6 is the system block diagram of system information acquisition device provided in an embodiment of the present invention, referring to Fig. 6, the system information Acquisition device may include: to obtain module 100, conversion module 200 and display module 300;Wherein,
Module 100 is obtained, for obtaining predetermined system information by shell script, obtains message file;
Conversion module 200 obtains convert file for all message files to be converted into html format;
Display module 300, for showing the convert file in frame window.
Optionally, Fig. 7 shows the another system block diagram of system information acquisition device provided in an embodiment of the present invention, reference Fig. 7, the system information acquisition device can also include: classification binding module 400.
Binding module 400 of classifying obtains predetermined system information for the system information that determination need to obtain, according to described pre- If the classification of system information classifies to the predetermined system information, each first category information is obtained;According to each described first The classification of classification information respectively classifies to each first category information, obtains each second category information, determines and obtains respectively Shell script needed for the second category information, by the second category information of each shell script respectively corresponding thereto It is bound.
Optionally, Fig. 8 shows the structure of display module 300 in system information acquisition device provided in an embodiment of the present invention Block diagram, referring to Fig. 8, which may include: that the first display unit 310, the second display unit 320 and third are shown Unit 330;Wherein,
First display unit 310 is shown for showing all first kind information the first of the frame window Show region;
Second display unit 320, the first kind information that user chooses in first display area for identification, by institute The corresponding all second category information of first kind information for stating user's selection are shown in the second display of the frame window Region;
Third display unit 330, the second category information that user chooses in second display area for identification, by institute The corresponding all convert files of second category information for stating user's selection are shown in the third viewing area of the frame window Domain.
Optionally, Fig. 9 shows the structure that module 100 is obtained in system information acquisition device provided in an embodiment of the present invention Block diagram, referring to Fig. 9, which may include: the first judgement acquiring unit 110, second judges 120 and of acquiring unit Third judges acquiring unit 130;Wherein,
First judges acquiring unit 110, for judging whether there is ORACLE database, and if it exists, then determines and obtains First shell script of information in ORACLE database is obtained in ORACLE database by the first shell script and is believed Breath, obtains first information file;
Second judges acquiring unit 120, for judging whether there is DB2 database, and if it exists, then determines and obtains DB2 number According to the 2nd shell script of information in library, information in DB2 database is obtained by the 2nd shell script, obtains the second letter Cease file;
Third judges acquiring unit 130, for judging whether there is MySQL database, and if it exists, then determines and obtains 3rd shell script of information in MySQL database is obtained in the MySQL database by the 3rd shell script and is believed Breath, obtains third message file.
System information acquisition device provided in an embodiment of the present invention, when need to obtain system information every time, system automatically by Shell script obtains all preset system informations, carries out corresponding system operatio or input data manually again without user Library command obtains the system informations of needs one by one, is familiar with various types database without user, process is simple and operation just Victory, meanwhile, all system informations that will acquire are shown that user can pass through frame with html in frame window Window uniformly checks all system informations of acquisition, reads convenient for system information of the user to acquisition.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with other The difference of embodiment, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodiment For, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is said referring to method part It is bright.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These Function is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Profession Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered Think beyond the scope of this invention.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

Claims (6)

1. a kind of system information acquisition method characterized by comprising
Predetermined system information is obtained by shell script, obtains message file;The message file is text formatting;
All message files are converted into html format, obtain convert file;
The convert file is shown in frame window;
Wherein, described that predetermined system information is obtained by shell script, before obtaining message file further include:
The system information that determination need to obtain obtains predetermined system information, according to the classification of the predetermined system information to described pre- If system information is classified, each first category information is obtained;
Classified respectively to each first category information according to the classification of each first category information, obtains each second class Other information;
Determine shell script needed for obtaining each second category information, respectively corresponding thereto by each shell script Second category information bound;
It is described the convert file is carried out in frame window display include:
All first kind information are shown in the first display area of the frame window;
The first kind information that identification user chooses in first display area, the first kind information that the user is chosen Corresponding all second category information are shown in the second display area of the frame window;
The second category information that identification user chooses in second display area, the second category information that the user is chosen Corresponding all convert files are shown in the third display area of the frame window.
2. system according to claim 1 information acquisition method, which is characterized in that described to be obtained in advance by shell script If system information, obtaining message file includes:
Determine the second category information that the predetermined system information includes;
Each second category information is obtained respectively by each shell script with second category information binding, obtains letter Cease file.
3. system according to claim 1 information acquisition method, which is characterized in that
The first category information includes: configuration information, operation information and database information,
The corresponding second category information of the configuration information includes: CPU information, memory information and disc information;
The corresponding second category information of the operation information includes: that CPU usage information, memory usage information and disk account for With rate information;
The corresponding second category information of the database information include: ORACLE database information, DB2 database information and/ Or MySQL database information.
4. system according to claim 1 information acquisition method, which is characterized in that described to be obtained respectively by shell script Each second category information is taken, obtaining message file includes:
Judge whether there is ORACLE database, and if it exists, then determine the first shell foot for obtaining information in ORACLE database This, obtains information in ORACLE database by the first shell script, obtains first information file;
Judge whether there is DB2 database, and if it exists, then determine the 2nd shell script for obtaining information in DB2 database, lead to It crosses the 2nd shell script and obtains information in DB2 database, obtain the second message file;
Judge whether there is MySQL database, and if it exists, then determine the 3rd shell foot for obtaining information in MySQL database This, obtains information in the MySQL database by the 3rd shell script, obtains third message file.
5. a kind of system information acquisition device characterized by comprising obtain module, conversion module and display module;Wherein,
The acquisition module obtains message file for obtaining predetermined system information by shell script;The message file For text formatting;
The conversion module obtains convert file for all message files to be converted into html format;
The display module, for showing the convert file in frame window;
Binding module of classifying obtains predetermined system information for the system information that determination need to obtain, and is believed according to the predetermined system The classification of breath classifies to the predetermined system information, obtains each first category information;According to each first category information Classification classify respectively to each first category information, obtain each second category information, determination obtains each described second Shell script needed for classification information ties up the second category information of each shell script respectively corresponding thereto It is fixed;
The display module includes: the first display unit, the second display unit and third display unit;Wherein,
First display unit, for all first kind information to be shown to the first display in the frame window Region;
Second display unit, the first kind information that user chooses in first display area for identification will be described The corresponding all second category information of first kind information that user chooses are shown in the second viewing area of the frame window Domain;
The third display unit, the second category information that user chooses in second display area for identification will be described The corresponding all convert files of second category information that user chooses are shown in the third display area of the frame window.
6. system information acquisition device according to claim 5, which is characterized in that the acquisition module includes: first to sentence Disconnected acquiring unit, second judge that acquiring unit and third judge acquiring unit;Wherein,
Described first judges acquiring unit, for judging whether there is ORACLE database, and if it exists, then determines and obtains ORACLE First shell script of information in database obtains information in ORACLE database by the first shell script, obtains First information file;
Described second judges acquiring unit, for judging whether there is DB2 database, and if it exists, then determines and obtains DB2 database 2nd shell script of interior information obtains information in DB2 database by the 2nd shell script, obtains the second information text Part;
The third judges acquiring unit, for judging whether there is MySQL database, and if it exists, then determines and obtains MySQL number According to the 3rd shell script of information in library, information in the MySQL database is obtained by the 3rd shell script, is obtained Third message file.
CN201511017426.9A 2015-12-29 2015-12-29 A kind of system information acquisition method and device Active CN105701151B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201511017426.9A CN105701151B (en) 2015-12-29 2015-12-29 A kind of system information acquisition method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201511017426.9A CN105701151B (en) 2015-12-29 2015-12-29 A kind of system information acquisition method and device

Publications (2)

Publication Number Publication Date
CN105701151A CN105701151A (en) 2016-06-22
CN105701151B true CN105701151B (en) 2019-09-24

Family

ID=56225969

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201511017426.9A Active CN105701151B (en) 2015-12-29 2015-12-29 A kind of system information acquisition method and device

Country Status (1)

Country Link
CN (1) CN105701151B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3416427A1 (en) * 2017-06-16 2018-12-19 Panasonic Intellectual Property Corporation of America User equipment and base station participating in a system information acquisition procedure
CN109063022B (en) * 2018-07-12 2022-02-18 郑州云海信息技术有限公司 Method for extracting server system information
CN109240884A (en) * 2018-08-30 2019-01-18 郑州云海信息技术有限公司 A kind of system file display methods and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102081679A (en) * 2011-01-24 2011-06-01 深圳市共济科技有限公司 Computer performance data acquisition method and device
CN102340415A (en) * 2011-06-23 2012-02-01 北京新媒传信科技有限公司 Server cluster system and monitoring method thereof
CN104317935A (en) * 2014-10-31 2015-01-28 北京思特奇信息技术股份有限公司 Method and system for generating HTML (hypertext markup language) pages from XML (extensible markup language) bill files in batches
CN104618161A (en) * 2015-02-02 2015-05-13 浪潮软件股份有限公司 Application cluster monitoring device and method
CN105100203A (en) * 2015-06-12 2015-11-25 北京京东尚科信息技术有限公司 Method and terminal for showing monitoring data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102081679A (en) * 2011-01-24 2011-06-01 深圳市共济科技有限公司 Computer performance data acquisition method and device
CN102340415A (en) * 2011-06-23 2012-02-01 北京新媒传信科技有限公司 Server cluster system and monitoring method thereof
CN104317935A (en) * 2014-10-31 2015-01-28 北京思特奇信息技术股份有限公司 Method and system for generating HTML (hypertext markup language) pages from XML (extensible markup language) bill files in batches
CN104618161A (en) * 2015-02-02 2015-05-13 浪潮软件股份有限公司 Application cluster monitoring device and method
CN105100203A (en) * 2015-06-12 2015-11-25 北京京东尚科信息技术有限公司 Method and terminal for showing monitoring data

Also Published As

Publication number Publication date
CN105701151A (en) 2016-06-22

Similar Documents

Publication Publication Date Title
US10824632B2 (en) System and method for generating event visualizations
US20180081531A1 (en) Systems and user interfaces for dynamic and interactive access of, investigation of, and analysis of data objects stored in one or more databases
US7742931B2 (en) Order generation system and user interface suitable for the healthcare field
CN110569298B (en) Data docking and visualization method and system
CN108292231A (en) It generates and applies from data
CN105701151B (en) A kind of system information acquisition method and device
CN108463832A (en) Electronic equipment and process execution method based on hardware diagnostic result
US8837294B2 (en) Schematic display of protocol-specific information
US10360998B1 (en) System and method for analyzing information on a time chart using a touch screen interface
US8150711B2 (en) Generating and managing medical documentation sets
JP2004342115A (en) Computer system, method for operating item interface, computer program product, and product
JP5377534B2 (en) Method, apparatus and system for identifying GUI elements
KR102071236B1 (en) USER INTERFACE PROVIDING METHOD USING IoT PLATFORM FOR SERVICE DEVELOPMENT AND IoT PLATFORM APPARATUS
CN105813549A (en) Combining information from multiple formats
CN108710636B (en) Medical record screening method, terminal equipment and computer readable storage medium
CN110349653A (en) Display methods, equipment and the storage medium of image analysing computer data
EP4278356A1 (en) Oncology workflow for clinical decision support
CN109561149B (en) Data processing method, device and storage medium
US20090300543A1 (en) Visual indication of changes in the same user interface dialog originally used to enter the data
JP4149137B2 (en) Protocol analyzer
WO2016131230A1 (en) Event information processing method and device
US20050043968A1 (en) Message data processing system suitable for healthcare and other fields
JP2004534982A (en) Offline data collection method
US20220230763A1 (en) Method and system for providing interactive medical guideline
JP5218250B2 (en) Input screen control apparatus, input screen control method, and input screen control program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant