This invention relates, in general, to managing resources of a communications environment, and in particular, to determining the amount of resources being used by one or more connections of the environment to facilitate management of the resources.
A node of a communications environment has limited resources and situations can arise in which the resources are consumed by predominately one or more connections of the node. Although there are legitimate reasons for a connection using a large amount of resources, there may also be situations in which a connection is using an undesired amount of resources due to an error or denial of service. Should this occur, the availability of the node can become jeopardized, especially if those connections are allowed to continue to deplete the resources of the node. Potential impacts include node outages, the inability of the node to accept any new connections, existing connections becoming stalled, and/or the loss or corruption of data.
Previously, attempts have been made to limit the number of connections. However, this does not help in those situations in which it is an existing connection that is using a dominant amount of the resources. Thus, a need exists for a capability to determine the amount of resources being utilized by the connections. In particular, a need exists for a capability that identifies the one or more connections that are predominately utilizing the resources of a node.
The shortcomings of the prior art are overcome and additional advantages are provided through the provision of a method of facilitating management of resources of communications environments. The method includes, for instance, identifying one or more connections of a communications environment; and determining for at least one connection of the one or more connections an amount of one or more resources being utilized by the at least one connection.
System and computer program products corresponding to the above-summarized method are also described and claimed herein.
Additional features and advantages are realized through the techniques of the present invention. Other embodiments and aspects of the invention are described in detail herein and are considered a part of the claimed invention.
The subject matter which is regarded as the invention is particularly pointed out and distinctly claimed in the claims at the conclusion of the specification. The foregoing and other objects, features, and advantages of the invention are apparent from the following detailed description taken in conjunction with the accompanying drawings in which:
In accordance with an aspect of the present invention, a capability is provided for obtaining the amount of resources utilized by one or more connections of a communications environment. By obtaining the amount of resources used, a determination may be made as to whether a particular connection is utilizing a dominant amount of the resources. Should one or more of the connections be utilizing a dominant amount of resources, action may be taken with regards to those particular connections. For instance, if it is undesirable to have a particular connection using a dominant amount of a resource, then that particular connection is terminated, while leaving the other connections of the environment undisturbed.
One embodiment of a communications environment incorporating and using one or more aspects of the present invention is depicted in
Executing within node 102 are one or more server applications 108, which may be accessed by the client applications. The server applications include, for instance, Web Servers, File Servers, Transaction Servers, Database Servers, as well as other applications.
Node 102 also includes at least one stack 110 that is used in communications with the client applications. The stack includes, for instance, rules of the communications protocol, buffers, code and data structures utilized during and/or for communications. The stack is also the facility by which connection usage information is obtained, in accordance with an aspect of the present invention. Since the communications protocol is TCP/IP, in this example, the stack is referred to as a TCP/IP stack.
A connection (e.g., a socket connection) is initiated by a client application. In particular, client application 104 establishes an active connection with node 102 via network 106. Each active connection has a token, known as a file descriptor, associated therewith which uniquely identifies the connection. A connection utilizes various resources of the node, and in accordance with an aspect of the present invention, the resources utilized by the connection are tracked or determined upon request. This connection usage information is maintained, for instance, within a data structure of the stack, as described with reference to
As depicted in
In one embodiment, the node (e.g., code or logic in the stack) tracks resource usage as a client connects to the server and uses those resources. For example, as shown in
As shown in
By obtaining the amount of resources used by a connection, a determination may be made as to which, if any, of the one or more connections is using a dominant amount of the resources. As examples, an operator interface, such as a query command can be used to retrieve the information, and/or a program interface, such as an automated program, can be created that issues a function to retrieve the information. Regardless of whether it is a command or an automated function, the request can be a request to identify the connections using the most system resources (overall or a specific type), or it may be a request to identify the amount of system resources being used by one or more particular connections.
In the case where the requestor issues a request with one or more specific connections as input, the diagnostic tool (e.g., command or program) interfaces with the TCP/IP stack to obtain resource usage information regarding the specified connection(s) and returns that information to the requestor.
In the case where the requestor issues a request to find the top N number of connections using the most system resources, the diagnostic tool interfaces with the stack to obtain resource information for each connection in the system. The tool then sorts the information based on the requestor's input criteria for type of system resource and returns to the requestor information on the top N entries in the sort. This is further described with reference to
As shown in
In response to the operator obtaining this information, the operator may take action with regards to the one or more connections using the most resources. This is further described with reference to
Referring to
In response to the requestor receiving the connection usage information, the requestor determines whether the usage by one or more connections is undesirable (e.g., too dominating), INQUIRY 504. If the usage is acceptable, then processing continues with determining the connection usage, STEP 500 (or processing is terminated, in another example). However, if the usage is unacceptable, then action is taken, STEP 506. The action taken may vary, but in one example, it includes terminating the connections that are using an undesirable amount of system resources. This terminating effects only those specific connections that are terminated, while leaving undisturbed the other connections. Processing then continues with STEP 500 (or ends).
Described in detail above is a capability for obtaining the amount of resources used by one or more connections of a communications environment. This obtaining enables a determination to be made as to which, if any, of the one or more connections of the environment is utilizing a dominant amount of the resources. An operator or program can inquire about the resources used by a specific connection by passing the connection's file descriptor as input to a tool (e.g., an interface), or can request information on the top N number of connections using the most system resources. Input can also include the type of system resource. For example, an operator may inquire about the top ten connections using the most core memory.
Advantageously, one or more aspects of the present invention can be used to identify existing and potentially troubled connections that are using the most resources. This is useful in many situations, and particularly, in real-time processing and/or continuous availability systems, such as with reservation systems, banking systems, etc. One or more aspects of the present invention can be used with a variety of environments, including a variety of nodes and/or networks. Further, it can be used to track a wide variety of resources, including network resources, application resources, database resources, file resources and/or other system resources.
Although an example of an environment is described above, many other environments, including different types of environments, may include and/or benefit from one or more aspects of the present invention. For example, the environment may include one or more networks and/or client applications that are other than TCP/IP. For example, one or more aspects of the present invention can be employed with other communications protocols, such as the System Network Architecture (SNA) or X.25 protocol, as well as other protocols. Yet further, the environment may include a plurality of nodes, a plurality of networks and/or more or less client applications. Moreover, a node may be other than a server node, such as a mainframe, laptop or other type of computing unit. Yet further, the client applications may run on other than personal computers or laptops, and there may be many types of client applications, as well as server applications. Many other variations exist and are considered a part of the claimed invention.
As yet a further example, the connection usage information may be maintained in other than the stack, such as in memory, external storage, etc. Further, the connections may be identified by other than file descriptors, such as other types of identifiers. Moreover, the logic employed to determine connection usage, determine if action is to be taken and to take action can be independent of the stack. For instance, it can be included in a program running in the node or in a facility coupled to the node.
The capabilities of one or more aspects of the present invention can be implemented in software, firmware, hardware or some combination thereof.
One or more aspects of the present invention can be included in an article of manufacture (e.g., one or more computer program products) having, for instance, computer usable media. The media has therein, for instance, computer readable program code means or logic (e.g., instructions, code, commands, etc.) to provide and facilitate the capabilities of the present invention. The article of manufacture can be included as a part of a computer system or sold separately.
Additionally, at least one program storage device readable by a machine embodying at least one program of instructions executable by the machine to perform the capabilities of the present invention can be provided.
The flow diagrams depicted herein are just examples. There may be many variations to these diagrams or the steps (or operations) described therein without departing from the spirit of the invention. For instance, the steps may be performed in a differing order, or steps may be added, deleted or modified. All of these variations are considered a part of the claimed invention.
Although preferred embodiments have been depicted and described in detail herein, it will be apparent to those skilled in the relevant art that various modifications, additions, substitutions and the like can be made without departing from the spirit of the invention and these are therefore considered to be within the scope of the invention as defined in the following claims.