Skip to end of banner
Go to start of banner

General Information(Agent)

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 20 Next »

This page provides room for information about the agent, that is important or could be useful for this project.
The information on this can provide a short overview, but is not intended as user documentation about InspectIT.

Agent Component

Framework

The agent uses the PICO Container to handle class instantiation. The container is following the principle of Dependency Injection and Inversion of Control.

Tasks

The agent has the following tasks:

  • Reading and applying of the provided configuration files
  • Gathering of invocation data
  • Communication with the server.(Sensor registration etc.)
  • Temporal Storage of invocation data, before its send to CMR
  • Performing the sensor logic
  • Hook Injection

Configuration

Each agent has a configuration that provides IP-address and port, via which he can communicate with the CMR and send data to.
Also the sensors that have to be used and the classes that have to be instrumented are configured in the configuration file.
Also a buffer strategy has to be set, so that the agent knows, what to do when it's not possible to send the data at the moment.
Its important to keep in mind, that a high aggregation of the collected data has an negative impact on the CPU consumption of the target application, bus puts less stress on the network.

JVM Environment

Class Loading

The classes are loaded at that moment, when there are needed for the first time. Not earlier.
Static classes and that containing static methods are instantiated on application startup and are not effected by this rule.
When a class is needed, the class loader loads the class and then it's linked:

There are three phases in the linking process:

  1. Verification (Checking format and suitability of this JVM)
  2. Preparation ( Memory allocation etc.)
  3. Resolution (Recursive loading and linking of classes needed by the resolved class)

After that the classes are initialized (static and as needed) and are executed.
When all non-daemon threads are done, the application terminates.

Method Invocations

See overview in IS advanced.

Instrumentation

Classes are instrumented by using the Java Agent interface. Only static instrumentation is used by InspectIT( with the preMain() method).

There is no need to instrument classes with the class loader method anymore.

Threads

A created Java object Thread performs execution if the start() method is called, the method run() starts execution in the current thread, so no concurrency of the creator and the instantiated thread is achieved. Only the start() method is producing a new system thread, which is then calling the run()method of the runnable to execute.

The thread object is created, but no execution is started until the method start() is called. That means, that there is no concurrency involved.

Three points of interest are essential on threads:
  • Which thread created a the thread
  • Which one starts it
  • Which thread executes it
Example scenario:

Thread1- Creates
Thread2- Initializes
Thread3- Calls the Runnable from a queue
Thread4- Executes it

Its important to keep the principle of thread pools in mind. Its commonly used by web applications.
It allows the reuse of threads, which means there is no need to create new thread instances. This reduces overhead, since the system don't have to manage new threads(no new memory allocation etc.).

 

 

 

  • No labels