[go: up one dir, main page]

CN104539630A - Method and device for checking linux journal files at windows client - Google Patents

Method and device for checking linux journal files at windows client Download PDF

Info

Publication number
CN104539630A
CN104539630A CN201510025755.1A CN201510025755A CN104539630A CN 104539630 A CN104539630 A CN 104539630A CN 201510025755 A CN201510025755 A CN 201510025755A CN 104539630 A CN104539630 A CN 104539630A
Authority
CN
China
Prior art keywords
journal file
request
file
content
client
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
CN201510025755.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.)
Beijing Netqin Technology Co Ltd
Original Assignee
Beijing Netqin 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 Beijing Netqin Technology Co Ltd filed Critical Beijing Netqin Technology Co Ltd
Priority to CN201510025755.1A priority Critical patent/CN104539630A/en
Publication of CN104539630A publication Critical patent/CN104539630A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/131Protocols for games, networked simulations or virtual reality

Landscapes

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

Abstract

The invention provides a method for checking linux journal files at a windows client as well as a corresponding windows client and a corresponding linux server. The method provided by the invention comprises the following steps: creating configuration files which at least comprise journal main computer information and journal file path information; creating sockets so as to establish connection with the journal main computer; sending a request aiming at the journal files; and receiving the contents of the required journal files.

Description

Windows client is checked method and the device of linux journal file
Technical field
The present invention relates to computer realm, more specifically, relate to the method and corresponding windows client and linux server of in windows client, checking linux journal file.
Background technology
In linux operating system, usually use tail order when the daily record of certain program will be checked.File can be write standard output by tail order from specified point, facilitates developer to check the ruuning situation of program.
Present most developer's custom is developed on windows.Even exploitation linux program is also like this.During exploitation linux program, developer's most time uses the developing instrument on windows.In time developing to a certain extent, need debugging routine in linux operating system.General is all the ruuning situation of checking debugged program from journal file.But check that daily record must sign in in linux operating system, tail-f order could be used to check the content of journal file.
At present, the journal file on Linux to be checked in window client, terminal software (such as: xshell) can only be passed through and sign in in linux operating system and perform.If journal file to be viewed is in long-range local area network (LAN), then also need first to sign in proxy server (also referred to as " springboard machine "), and then sign in Intranet linux main frame, finally find the journal file needing to check, use the mode viewing files content of " tail-f journal file ".And after this has checked daily record, next time has needed to check this daily record again, or the operation that needs repeat above.This mode and inconvenience thereof of checking daily record.
Therefore need a kind of developer that can facilitate of improvement on windows, check the mechanism of the journal file of Linux.
Summary of the invention
To achieve these goals, the present invention proposes a kind of on windows, check linux journal file method and corresponding windows client and linux server.
According to an aspect of the present invention, a kind of method of checking linux journal file in windows client is provided.Described method can comprise: create configuration file, described configuration file at least comprises logging host information and journal file routing information; Create socket (socket) to connect with logging host; Send the request for journal file; And, receive the content of the journal file of asking.
In certain embodiments, described establishment socket can comprise direct Connection Step to connect with logging host.In direct Connection Step, be directly connected to set up with logging host according to logging host information creating socket.
Alternatively, in certain embodiments, described configuration file can also comprise proxy information.In the case, described establishment socket acts on behalf of Connection Step to connect to comprise with logging host.Acting on behalf of in Connection Step, creating socket to connect with proxy server, to connect via proxy server and logging host according to proxy information.
In certain embodiments, described configuration file can also comprise journal displaying configuration information.Described method can also comprise: according to described journal displaying configuration information, shows the content of the different stage of the journal file received in different forms.
According to a second aspect of the invention, a kind of method performed on linux server is provided.Described method can comprise: the first socket creating binding Self address, to wait for the connection of client; The request for journal file is received from client; Read the content of the journal file of asking; And, the content of the journal file read is sent to client.Described client-side is windows client in this way.
In certain embodiments, the content of journal file that described reading is asked can comprise local read step.In local read step, according to the content of the journal file routing information reading local log file that described request comprises.
Alternatively, in certain embodiments, the content of journal file that described reading is asked can comprise acts on behalf of read step.Acting on behalf of in read step, logging host information creating second socket comprised according to described request is to connect with logging host, send the request for journal file comprising journal file routing information to logging host, and read the content of the journal file returned from logging host.
Alternatively, in certain embodiments, the content of journal file that described reading is asked can comprise: the type judging request; In response to the first request type, perform local read step; And, in response to the second request type, agents read step.
According to a third aspect of the invention we, a kind of windows client for checking linux journal file is provided.Described client can comprise: configuration module and link block.Described configuration module can be configured to: create configuration file, described configuration file at least comprises logging host information and journal file routing information.Described link block can be configured to: create socket to connect with logging host; And by described connection, send the content of the journal file that request and reception for journal file are asked.
In certain embodiments, described link block can also be further configured to: be directly connected to set up with logging host according to logging host information creating socket.
Alternatively, in certain embodiments, described configuration file can also comprise proxy information.Described link block can be further configured to: in response to there is proxy information, creates socket to connect with proxy server, to connect via proxy server and logging host according to proxy information.
In certain embodiments, described configuration file can also comprise journal displaying configuration information.Described client can also comprise display module, is configured to: according to described journal displaying configuration information, the in different forms content of the different stage of show log file.
According to a forth aspect of the invention, a kind of Linux server is provided.Described server can comprise link block and read module.Described link block can be configured to: the first socket creating binding Self address, to wait for the connection of client; And, by described connection, receive the request for journal file from client, and send the content of the journal file that described read module reads to client.Described read module can be configured to: according to the described request for journal file, reads the content of the journal file that client is asked.
In certain embodiments, described linux server can be logging host, and wherein said read module comprises local read module.Described local read module can be configured to: according to the content of the journal file routing information reading local log file that described request comprises.
In certain embodiments, described Linux server can be proxy server.
In the embodiment of proxy server of the present invention, described read module can comprise acts on behalf of read module.Described read module of acting on behalf of can be configured to: logging host information creating second socket comprised according to described request is to connect with logging host, send the request for journal file to logging host, and read the content of the journal file returned from logging host.
In the preferred embodiment of proxy server of the present invention, described read module can comprise: for judging the judge module of request type, in response to first request type operation local read module, and in response to second request type operation act on behalf of read module.
That can imitate tail order according to embodiments of the invention realizes effect, constantly reads the content of journal file, can also preserve the journal file path checked, convenient inquiry next time.According to a preferred embodiment of the invention, the daily record of different stage can also be revealed as different colors, such as mistake (error) represents by redness, and information (info) represents by green, and alarm (warning) represents by yellow.According to a preferred embodiment of the invention, can also filter log file contents, as only shown the daily record of error.According to a preferred embodiment of the invention, the mechanism of the journal file being checked Intranet by broker machines is additionally provided.First developer can be signed in in broker machines by windows client, is then read the Linux journal file of Intranet by broker machines.
Accompanying drawing explanation
By the preferred embodiments of the present invention being described below in conjunction with accompanying drawing, above-mentioned and other objects, features and advantages of the present invention will be made clearly, wherein:
Fig. 1 a and Fig. 1 b schematically shows the schematic diagram of the adaptable two kinds of application scenarioss of the embodiment of the present invention;
Fig. 2 schematically shows the flow chart checking the method for linux journal file in windows client according to the embodiment of the present invention;
Fig. 3 schematically shows the flow chart checking a concrete example of the method for linux journal file in windows client according to the embodiment of the present invention;
Fig. 4 schematically shows the flow chart of the method performed on linux server according to the embodiment of the present invention;
Fig. 5 schematically shows the flow chart of a concrete example of the method performed on linux server according to the embodiment of the present invention;
Fig. 6 diagrammatically illustrates the schematic block diagram of the windows client according to the embodiment of the present invention;
Fig. 7 schematically shows the schematic block diagram of the log server according to the embodiment of the present invention;
Fig. 8 schematically shows the schematic block diagram of the proxy server according to the embodiment of the present invention;
Fig. 9 schematically shows the schematic block diagram of proxy server according to another embodiment of the present invention.
In all the drawings in the present invention, same or analogous structure all identifies with same or analogous Reference numeral.
Embodiment
Describe the present invention in detail referring now to accompanying drawing, shown in the drawings of illustrative embodiment of the present invention, can the present invention be realized to make those skilled in the art.Be noted that the following drawings and example do not mean that and limit the scope of the present invention to single embodiment, on the contrary by exchange and combine different embodiment some or all described in or shown element to form other embodiments be also possible.In addition, when known tip assemblies can be used partially or completely to realize element-specific of the present invention, to only describe in these known tip assemblies to understand part assembly essential to the invention, and the detailed description that will omit other parts in these known tip assemblies, to make the present invention more outstanding.Unless otherwise noted herein, otherwise those skilled in the art should understand that: although some embodiments of the present invention are described as realizing by software form, but the present invention is not limited to this, but also can realize with the combination of firmware, software and firmware, and vice versa.Unless explicit state separately herein, otherwise in this manual, the embodiment showing single component should be considered as being restrictive, but the invention is intended to comprise other embodiments comprising multiple same components, and vice versa.In addition, the present invention comprises the equivalent herein as the current of the known tip assemblies illustrating to quote and exploitation in the future.
As used herein, term " windows client " can be the machine of any support windows operating system.Term " linux server " can be the machine of any support linux operating system.Term " log server " can be any machine storing daily record." proxy server " can be any machine providing agent functionality between client and log server.When client-access proxy server is from journal file with it, this proxy server is regarded as " log server ".
In this article, " windows client " also referred to as client, " linux server " is also referred to as server.
Fig. 1 a and Fig. 1 b schematically shows the schematic diagram of the adaptable two kinds of application scenarioss of the embodiment of the present invention.
Fig. 1 a shows the application scenarios of the journal file on the direct access log server of client.As shown in Figure 1a, system 100a comprises windows client 110 and linux log server 120a.Client 110 directly and linux log server 120a connect, to access the journal file on it.Should be appreciated that, client 110 in Fig. 1 a and the connection between server 120a can by direct link (such as, wireless link, or wire link) realize, also can realize via network (such as the Internet, cable LAN or WLAN (wireless local area network) etc.).The present invention is unrestricted in this regard.
Fig. 1 b shows the application scenarios of client via the journal file on proxy access log server.As shown in Figure 1 b, system 100b comprises windows client 110, log server 120b and proxy server 130.Log server 120 is positioned at remote lan.For safety or employ the reasons such as network address translation (NAT), client 110 directly can not access the machine (as log server 120b) of remote lan inside usually from outside, but needs visit the journal file on log server 120b via proxy server 130.This remote lan is for client, and it can not comprise any cable LAN or the WLAN (wireless local area network) of this client.
Should be appreciated that, although client 110 is depicted as desktop computer in Fig. 1 a and 1b, it can be any computer supporting windows operating system, as laptop computer etc.Although by log server 120a in Fig. 1 a and 1b, 120b is depicted as desktop computer, it can be any computer supporting linux operating system, as laptop computer etc.Proxy server 130 can be any computer being mounted with agent software of the present invention (will hereinafter be described), and it can be desktop computer, laptop computer, etc.
Fig. 2 schematically shows the flow chart of the method 200 of the journal file on linux log server of checking in windows client (as client 110) according to the embodiment of the present invention.Method 200 can be performed by the client software according to the embodiment of the present invention that client is installed (or program).When client wishes the journal file checked on log server, method 200 starts.
In step S210, create configuration file.The configuration file created can be saved, for later application.This configuration file at least comprises logging host information and journal file routing information.Logging host information can comprise logging host address and logging host port.Alternatively, this configuration file can also comprise title, the proxy information and/or journal displaying configuration information etc. of daily record connection.Proxy information can comprise proxy address and proxy port etc.Journal displaying configuration information such as can comprise the difference display configuration for the log content of different stage.Described display configuration is as comprised background color, font color, font type, font size etc.Such as, mistake (error) represents by redness, and information (info) represents by green, and alarm (warning) represents by yellow, etc.Journal displaying configuration information can also comprise filtering information, such as, indicate the indication information of the log content only showing error level, indicate the indication information of the log content only showing mistake and alarm level, etc.
Table 1 below and table 2 respectively illustrate without agency and two configuration file examples having agency
Table 1: without proxy log file
Table 2: have proxy log file
In step S220, create socket to connect with logging host.This can comprise direct connection (as shown in Figure 1a scene) and be connected (as shown in Figure 1 b scene) two kinds of situations with agency.
When not comprising proxy information in configuration file, in step S220, perform direct Connection Step.Particularly, the logging host information (as logging host address and port) comprised according to configuration file creates socket to connect with logging host.
When configuration file comprises proxy information, agents Connection Step in step S220.Particularly, the proxy information comprised according to configuration file creates socket to connect with proxy server, to connect via proxy server and logging host.
Table 3 below shows a concrete example of step S220.
Table 3: create socket, and connection server
Should be understood that under directly connecting scene, the sample address information addr=(" 192.168.33.144 ", 9999) in table 3 is corresponding to the address of logging host and port; And agency connects under scene, the sample address information addr=(" 192.168.33.144 ", 9999) in table 3 is corresponding to the address of proxy server and port.
In step S230, by the connection of setting up in step S220, send the request for journal file.So, receive requesting party's (server) can read the journal file of asking content (also referred to as log content) according to this request.Described request at least comprises log-file information (as journal file path).Alternatively, described request can also comprise the indication information about request type.Request type can comprise: the first request type of the local daily record of request recipient, and as so-called " log request ", and request recipient reads the second request type of the daily record of another main frame as agency, as so-called " proxy requests ".When proxy requests, this request can also comprise logging host information.
Table 4 below shows two concrete examples of step S230.
Table 4: send the request for journal file
Easily find out from the example of table 4, in log request, comprise the indication information " log " about request type and journal file path/root/logserver/test.log.Indication information " agent ", the logging host information 193.168.33.244:9999 about request type is comprised in proxy requests, and log-file information/root/logserver/test.log.
In step S240, receive the content of the journal file of asking.Then the log content received can be shown.
Table 5 below shows a concrete example of step S240.
Table 5: the information that continuous reception server end is sent, and be shown to user.
In certain embodiments, configuration file also comprises journal displaying configuration information.So, according to the journal displaying configuration information in configuration file, the content of the different stage of the journal file received can be shown in different forms in step S240.Such as, by the log content of different colors display different stage, or only log content showing specified level etc.
Then, after completing the reception to the content of journal file, method 200 terminates.
Fig. 3 schematically shows the flow chart checking one of linux journal file concrete exemplary method 300 according to the preferred embodiment of the invention in windows client.Method 300 can be performed by the client software according to the embodiment of the present invention that client is installed (or program).
As shown in the figure, in step s 302, first configuration file is created.The title of daily record connection, logging host address, logging host port, journal file path can be comprised in this configuration file.If need agency, then configuration file also comprises proxy address and port.
Can save after having created configuration file, apply after facilitating.
In step s 304, configuration file is opened.
In step S306, read the configuration information in configuration file.
In step S310, check in configuration information whether have proxy information.
If determine do not have proxy information in step S310, then method 300 proceeds to step S314, reads logging host address and port, creates socket, to be connected with logging host.If log services termination by the connection of client, then successfully sets up the connection of client and log server.
In step S316, send the request for journal file, this request comprises the path of the journal file that needs read.Log services end, after receiving the path of journal file, constantly reads the content in journal file in the mode of tail order, and the content read is write in socket.
Client, after the path sending journal file, starts constantly from socket, to read log content, and in step s 320 the log content of reading is presented to user in step S318.
If define proxy information in step S310, then method 300 proceeds to step S322, reads proxy address and port, creates socket, to be connected with proxy.If agency service termination by the connection of client, then successfully sets up the connection of client and proxy server.
In step S324, send the request for journal file, this request comprises information and the journal file path of logging host corresponding to journal file that needs read.Agency service end reads logging host information and log-file information the socket (referred to as client socket) linked with client is upper, create the socket (referred to as logging host socket) linked with logging host, send the path of journal file to logging host.
Agency service end, after the path sending journal file to logging host, constantly reads the content of logging host socket, and is write client socket.
In step S326, client reads log content from the socket of oneself, and in step S328, the log content of reading is shown to user.
Then method 300 terminates.
Also show the log services end mutual with client and the operation of agency service end in dotted line frame in Fig. 3, this will describe in detail with reference to figure 5 hereinafter, does not repeat them here.
Fig. 4 schematically shows the flow chart of the method 400 performed on linux server according to the embodiment of the present invention.Method 400 can be performed by the service terminal software according to the embodiment of the present invention that server is installed (or program).This server can be log server 120a, 120b or can be proxy server 130.
In step S410, create the first socket of binding Self address, to wait for the connection of client.This first socket also can be described as ServerSocket.
Table 6 below and Fig. 7 show a concrete example of step S410.
Table 6: create service end socket, and bind address
Table 7: the connection waiting for client
Can find out in superincumbent table 6, " 127.0.0.1 " is loopback address, or claims local IP address.Therefore addr=(" 127.0.0.1 ", 9999) points to the machine.
In the step s 420, the request for journal file is received from client.As mentioned above, this request at least comprises log-file information (as journal file path).Alternatively, described request can also comprise the indication information about request type.Request type can comprise: the first request type of the local daily record of request service end, and as so-called " log request ", and request service end reads the second request type of the daily record of another main frame as agency, as so-called " proxy requests ".When proxy requests, this request can also comprise logging host information.
In step S430, read the content of the journal file of asking.Depend on that the function of service end is different, the specific implementation of step S430 can be different.Step S430 can comprise local reading and/or agency's reading (will describe in detail) below.
When the server of manner of execution 400 is log servers, step S430 can be read by this locality and realize.In this locality is read, service end reads the content of local log file according to the journal file routing information comprised in received request.
When the server of manner of execution 400 is proxy servers, step S430 can by acting on behalf of reading to realize.In agency reads, service end according to logging host information creating second socket comprised in received request to connect with logging host, then in the connection of setting up, send the request (comprising the journal file routing information the request received from client in the step s 420 in this request) for journal file to logging host, and read the content of the journal file returned from logging host.
Preferably, when the server of manner of execution 400 is proxy servers, step S430 can also be realized by following manner: the type first judging the request received; And, be the first request type in response to received request, perform local reading; Or be the second request type in response to received request, agents reads.In this case, proxy server not only has agent functionality, and allows the daily record in client-requested proxy server the machine.
Table 8 below shows a preferred realization example of step S430.In this example, first judge request type, then perform local reading or agency's reading respectively in response to different request types.
Table 8: based on different request types, performs local reading or agency's reading
Can find out in superincumbent table 8 and can be realized by the tail order in linux operating system when reading the journal file of proxy server the machine.Similarly, also can be realized by tail order when log server reading journal file.Table 9 shows the example implementation being read journal file by tail order.
Table 9:tailf realizes
In step S440, send the content of the journal file read to client.This by realizing with client foundation in step S410, also can be about to read log content and writing its socket.
Then, after completing the transmission to the content of journal file, method 400 terminates.
Fig. 5 schematically shows according to the preferred embodiment of the invention at the flow chart of the upper concrete exemplary method 500 performed of linux proxy server (such as proxy server 130).Method 500 can be performed by the service terminal software according to the embodiment of the present invention that proxy server is installed (or program).
As shown in the figure, in step S502, first agency service end creates socket, and bind address, to wait for the connection of client in step S504.
If the connection received from client and accepting, then successfully set up the connection with client, method proceeds to step S506.In step S506, with the connection of client on receive the request for journal file from client.
In step S508, read the request type indication information in the request received.
In step S5110, judge request type according to request type indication information.
If judge that in step S510 request type is daily record, then method proceeds to step S512.In step S512, read the journal file path in the request received.Then, in step S514, according to read journal file path, the content of journal file is constantly read in the mode of tail.And in step S516, by the socket that the log content read write links with client.
If judge that in step S510 request type is agency, then method proceeds to step S520.The logging host information and journal file path that comprise in received request is read in step S520.Then in step S522 according to logging host information creating socket to be connected with log server.If log server accepts this connection, then successfully set up the connection with log server, method proceeds to step S524.In step S524, proxy server sends the request for journal file to log server, and this request is included in the journal file path of reading in step S520.Log services end, after receiving the path of journal file, by the content constantly read in the mode of tail order in journal file, and is write the content read in socket.So, in step S526, proxy server constantly reads log content from the socket linked with log server, and the socket (socket namely created in step S502) constantly the log content write of reading and client linked in step S528 is to send to client.
Then method 500 terminates.
The operation of the log services end mutual with proxy server is also show in dotted line frame in Fig. 5.The operation of step S502 ', S512 ', S514 ' and S516 ' respectively with the class of operation of step S502, S512, S514 and S516 seemingly, do not repeat them here.
Fig. 6 diagrammatically illustrates the schematic block diagram of the windows client 110 according to the embodiment of the present invention.
As shown in the figure, client 110 can comprise configuration module 12 and link block 14.
Configuration module 12 can be configured to: create configuration file.The configuration file created can be saved, for later application.This configuration file at least comprises logging host information and journal file routing information.Alternatively, this configuration file can also comprise title, the proxy information and/or journal displaying configuration information etc. of daily record connection.
Link block 14 can be configured to: create socket to connect with logging host.Direct connection (as shown in Figure 1a scene) can be comprised with the connection of logging host and act on behalf of and connect (as shown in Figure 1 b scene) two kinds of situations.
When not comprising proxy information in configuration file, the logging host information (as logging host address and port) that link block 14 can comprise according to configuration file creates socket and is directly connected to set up with logging host.
When configuration file comprises proxy information, the proxy information that link block 14 can comprise according to configuration file creates socket to connect with proxy server, to connect with logging host (being connected also referred to as agency in this article) via proxy server.
Link block 14 is also configured to: after a connection is established, sends the content of the journal file that request and reception for journal file are asked on which.Described request at least comprises log-file information (as journal file path).Alternatively, described request can also comprise the indication information about request type.Request type such as can comprise log request and proxy requests.When proxy requests, this request can also comprise logging host information.
Alternatively, client 110 can also comprise display module.The journal displaying configuration information (if present) that display module can comprise according to configuration file, the content of the different stage of show log file in different forms.Such as, by the log content of different colors display different stage, or only log content showing specified level etc.
Fig. 7 diagrammatically illustrates the schematic block diagram of the log server 120 (as 120a or 120b) according to the embodiment of the present invention.
As shown in the figure, log server 120 can comprise link block 22 and read module 24.Link block 22 can be configured to: the first socket creating binding Self address, to wait for the connection of client.
Link block 22 is also configured to: by the connection with client, receives the request for journal file from client, and sends the content of the journal file that read module 24 reads to client.
Read module 24 can be configured to: according to the received request for journal file (particularly, the journal file path according to it comprises), reads the content of the journal file that client is asked.
Fig. 8 diagrammatically illustrates the schematic block diagram of the proxy server 130a according to the embodiment of the present invention.
As shown in the figure, proxy server 130a can comprise link block 32 and read module 34.Link block 32 can be configured to: the first socket creating binding Self address, to wait for the connection of client.
Link block 32 is also configured to: by the connection with client, receives the request for journal file from client, and sends the content of the journal file that read module 34 reads to client.
Read module 34a can be configured to: according to logging host information creating second socket comprised in received request to connect with logging host, send the request for journal file to logging host, and read the content of the journal file returned from logging host.
Fig. 9 schematically shows the schematic block diagram of proxy server 130b according to another embodiment of the present invention.
As shown in the figure, proxy server 130b can comprise link block 32 and read module 34b.Link block 32 can be configured to: the first socket creating binding Self address, to wait for the connection of client.
Link block 32 is also configured to: by the connection with client, receives the request for journal file from client, and sends the content of the journal file that read module 34b reads to client.
Read module 34b comprises the judge module 342 for judging request type, local read module 344, and acts on behalf of read module 346.
Local read module 344 can be configured to: in response to the first request type, according to the content of the journal file routing information reading local log file that received request comprises.
Act on behalf of read module 346 can be configured to: in response to the second request type, according to logging host information creating second socket comprised in received request to connect with logging host, send the request for journal file to logging host, and read the content of the journal file returned from logging host.
Client 110 can perform above referring to figs. 2 and 3 the method 200 and 300 described.Log server 120 (as 120a, 120b) can perform above with reference to the method 400 of figure 4 description or with reference to the method described in the dotted line frame of figure 5.Proxy server 130a and 130b can perform above with reference to the method 400 of figure 4, also can perform the method 500 described with reference to figure 5 part or all above.Therefore, no longer the operation of the modules of client, log server and proxy server is described in more detail at this.
In conjunction with the preferred embodiments the method and apparatus of the embodiment of the present invention is described above.It will be understood by those skilled in the art that the method and apparatus illustrated is only exemplary above.Method of the present invention is not limited to the step and order that illustrate above, but can comprise more or less step.Device of the present invention is not limited to the module illustrated above, but can comprise more or less module.Such as, memory module etc. can also be comprised according to device of the present invention.Those skilled in the art can carry out many changes and amendment according to the instruction of illustrated embodiment.
According to the embodiment of the present invention, facilitate user and check linux journal file in windows client, the effect of tail-f order can also be realized.According to the embodiment of the present invention, agent functionality can be realized, to read the linux journal file on long-range Intranet machine.In addition, according to the embodiment of the present invention, also optimize the display to daily record, be convenient to user and identify crucial log content.
Describe the present invention although it should be appreciated by those skilled in the art that by specific embodiment, scope of the present invention is not limited to these specific embodiments.Scope of the present invention is limited by claims and any equivalents thereof.

Claims (16)

1. in windows client, check a method for linux journal file, comprising:
Create configuration file, described configuration file at least comprises logging host information and journal file routing information;
Create socket to connect with logging host;
Send the request for journal file; And
Receive the content of the journal file of asking.
2. method according to claim 1, wherein said establishment socket comprises to connect with logging host: be directly connected to set up with logging host according to logging host information creating socket.
3. method according to claim 1, wherein, described configuration file also comprises proxy information, and described establishment socket comprises to connect with logging host:
Socket is created to connect with proxy server, to connect via proxy server and logging host according to proxy information.
4. the method according to any one of claim 1-3, wherein said configuration file also comprises journal displaying configuration information, and described method also comprises:
According to described journal displaying configuration information, show the content of the different stage of the journal file received in different forms.
5. the method performed on linux server, comprising:
Create the first socket of binding Self address, to wait for the connection of client;
The request for journal file is received from client;
Read the content of the journal file of asking; And
The content of the journal file read is sent to client.
6. method according to claim 5, wherein, the content of the journal file that described reading is asked comprises: according to the content of the journal file routing information reading local log file that described request comprises.
7. method according to claim 5, wherein, the content of the journal file that described reading is asked comprises:
Logging host information creating second socket comprised according to described request to connect with logging host,
The request for journal file comprising journal file routing information is sent to logging host, and
Read the content of the journal file returned from logging host.
8. method according to claim 5, wherein, the content of the journal file that described reading is asked comprises:
Judge the type of request;
In response to the first request type, according to the content of the journal file routing information reading local log file that described request comprises; And
In response to the second request type, logging host information creating second socket comprised according to described request is to connect with logging host, send the request for journal file comprising journal file routing information to logging host, read the content of the journal file returned from logging host.
9., for checking a windows client for linux journal file, comprising:
Configuration module, is configured to: create configuration file, described configuration file at least comprises logging host information and journal file routing information; And
Link block, is configured to: create socket to connect with logging host,
Wherein
Described link block is also configured to: by described connection, sends the content of the journal file that request and reception for journal file are asked.
10. client according to claim 9, described link block is further configured to: be directly connected to set up with logging host according to logging host information creating socket.
11. clients according to claim 9, wherein, described configuration file also comprises proxy information, and described link block is further configured to:
Socket is created to connect with proxy server, to connect via proxy server and logging host according to proxy information.
12. clients according to any one of claim 9-11, wherein said configuration file also comprises journal displaying configuration information, described client also comprises display module, is configured to: according to described journal displaying configuration information, the in different forms content of the different stage of show log file.
13. 1 kinds of linux servers, comprising:
Link block, is configured to: the first socket creating binding Self address, to wait for the connection of client;
Read module, is configured to: the content reading the journal file that client is asked,
Wherein said link block is also configured to: by described connection, receives the request for journal file, and send the content of the journal file of asking to client from client.
14. servers according to claim 13, described read module comprises local read module, is configured to: according to the content of the journal file routing information reading local log file that described request comprises.
15. servers according to claim 13, described read module comprises acts on behalf of read module, is configured to:
Logging host information creating second socket comprised according to described request to connect with logging host,
The request for journal file is sent to logging host, and
Read the content of the journal file returned from logging host.
16. servers according to claim 13, wherein said read module comprises:
Judge module, judges the type of request;
Local read module, is configured to: in response to the first request type, according to the content of the journal file routing information reading local log file that described request comprises; And
Act on behalf of read module, be configured to: in response to the second request type, logging host information creating second socket comprised according to described request is to connect with logging host, send the request for journal file comprising journal file routing information to logging host, read the content of the journal file returned from logging host.
CN201510025755.1A 2015-01-19 2015-01-19 Method and device for checking linux journal files at windows client Pending CN104539630A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510025755.1A CN104539630A (en) 2015-01-19 2015-01-19 Method and device for checking linux journal files at windows client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510025755.1A CN104539630A (en) 2015-01-19 2015-01-19 Method and device for checking linux journal files at windows client

Publications (1)

Publication Number Publication Date
CN104539630A true CN104539630A (en) 2015-04-22

Family

ID=52855099

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510025755.1A Pending CN104539630A (en) 2015-01-19 2015-01-19 Method and device for checking linux journal files at windows client

Country Status (1)

Country Link
CN (1) CN104539630A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106357454A (en) * 2016-10-08 2017-01-25 武汉斗鱼网络科技有限公司 Log system control device and method
CN107317723A (en) * 2017-05-27 2017-11-03 北京金山安全软件有限公司 Data processing method and server
CN107846319A (en) * 2017-11-17 2018-03-27 北京锐安科技有限公司 A kind of method and device for transmitting data
CN107947975A (en) * 2017-11-17 2018-04-20 北京锐安科技有限公司 The method and device of a kind of gathered data
CN111416767A (en) * 2020-03-16 2020-07-14 广东科徕尼智能科技有限公司 Log output method, device and storage medium of edge intelligent gateway

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040105923A (en) * 2003-06-10 2004-12-17 박세현 Remote Monitoring System of Architectural Structure
CN103179162A (en) * 2011-12-23 2013-06-26 阿里巴巴集团控股有限公司 Method and system for outputting log
CN103425750A (en) * 2013-07-23 2013-12-04 国云科技股份有限公司 A cross-platform and cross-application log collection system and its collection management method
CN103840953A (en) * 2012-11-21 2014-06-04 中兴通讯股份有限公司 Remote log real-time acquisition method and system
CN103942134A (en) * 2014-04-04 2014-07-23 福建星网视易信息系统有限公司 Method and system for viewing embedded device log

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040105923A (en) * 2003-06-10 2004-12-17 박세현 Remote Monitoring System of Architectural Structure
CN103179162A (en) * 2011-12-23 2013-06-26 阿里巴巴集团控股有限公司 Method and system for outputting log
CN103840953A (en) * 2012-11-21 2014-06-04 中兴通讯股份有限公司 Remote log real-time acquisition method and system
CN103425750A (en) * 2013-07-23 2013-12-04 国云科技股份有限公司 A cross-platform and cross-application log collection system and its collection management method
CN103942134A (en) * 2014-04-04 2014-07-23 福建星网视易信息系统有限公司 Method and system for viewing embedded device log

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
周西峰,陆鹏,郭前岗: "利用socket实现Windows与Linux平台间的网络通信", 《微型机与应用》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106357454A (en) * 2016-10-08 2017-01-25 武汉斗鱼网络科技有限公司 Log system control device and method
CN106357454B (en) * 2016-10-08 2020-06-16 武汉斗鱼网络科技有限公司 Log system control device and control method thereof
CN107317723A (en) * 2017-05-27 2017-11-03 北京金山安全软件有限公司 Data processing method and server
CN107317723B (en) * 2017-05-27 2021-01-05 北京金山安全软件有限公司 Data processing method and server
CN107846319A (en) * 2017-11-17 2018-03-27 北京锐安科技有限公司 A kind of method and device for transmitting data
CN107947975A (en) * 2017-11-17 2018-04-20 北京锐安科技有限公司 The method and device of a kind of gathered data
CN111416767A (en) * 2020-03-16 2020-07-14 广东科徕尼智能科技有限公司 Log output method, device and storage medium of edge intelligent gateway

Similar Documents

Publication Publication Date Title
US9235451B2 (en) Browser kernel switching method
US9645910B1 (en) Cross platform mobile HTML debugging
US9652364B1 (en) Cloud service for mobile testing and debugging
CN104539630A (en) Method and device for checking linux journal files at windows client
US8555366B2 (en) Method of managing communication between an electronic token and a remote web server
CN111177617A (en) Web direct operation and maintenance method and device based on operation and maintenance management system and electronic equipment
CN110659021B (en) Development and test system for micro application in mobile terminal
CN110300133A (en) Cross-domain data transmission method, apparatus, equipment and storage medium
CN111447170A (en) Data processing method and system, computer system and computer readable medium
US20150378881A1 (en) Platform-independent selenium to application lifecycle management ("alm") server connectivity
WO2019085290A1 (en) Test preparation method and apparatus, terminal device, and storage medium
Bhat et al. Practical Docker with Python
CN112379965B (en) Sandbox file mapping system, client device, mapping end device, sandbox file mapping method and electronic equipment
CN115514611B (en) Message processing method, device, equipment and storage medium
Cisco Release Notes for Cisco SN 5420 Storage Router Release 1.1.4
CN114915565B (en) Network debugging method and system
CN116599949A (en) Third-party API protocol access method and system based on HTTP protocol
MX2014007564A (en) Systems and methods to facilitate a request for oilfield services using a data transfer protocol.
US20130080499A1 (en) Communication apparatus, communication method, and computer program product
Cisco Release Notes for Cisco Content Optimization Engine 1.2 for ACNS 4.1
Cisco Release Notes for Cisco Aironet Workgroup Bridges
Cisco Release Notes for Cisco Aironet Client Adapter Drivers
CN116546076A (en) Automatic driving long connection realization method and path planning method based on Netty
Cisco Release Notes for Cisco Content Optimization Engine for ACNS 4.0
Cisco Release Notes for Cisco Content Optimization Engine 1.2 for ACNS 4.1

Legal Events

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

Application publication date: 20150422