Important This documentation space contains information about PATROL Agents when deployed in a TrueSight Operations Management environment. If you are a BMC Helix Operations Management user, see PATROL Agent for BMC Helix Operations Management 24.3.01.

What is a Virtual Machine?


A virtual machine is a self-contained operating environment that behaves as if it is a separate computer.

Unlike some virtual machines (like Java), the PATROL VM has full access to the host operating system, with the possibility to communicate to the host OS under different credentials. Instead of requiring the developer to write and compile executables for each of the different OS's the PATROL VM technology allows you to write a single script that will be compiled and interpreted in a platform independent fashion. This approach makes it easy to run your scripts on any platform on which the VM runs.

One of the most well know virtual machines is the Java virtual machine 1. As shown in the following figure, the Java source is compiled into byte code.

Java Virtual Machine

7-30-2010 1-11-29 PM.gif

In the case of a Java applet, this byte code (which contains the list Java VM instructions) is then transported over the Web and executed by the Java VM (which is running in your web browser).

In the case of a Java application, your Java run-time environment will run this byte code.

Advantages of a VM

An enormous advantage of this design is that you only need to know one OS if you want to write virtual machine programs. If you understand how the VM works, you know how the agent will behave on any host OS. A KM is just a set of programs that the PATROL Agent needs to run. (This is a simplified description because a KM contains more than just commands to execute. However, the most important part is the code). 

Although the PATROL VM is a self-contained operating environment, with its own native programming language, PATROL Script Language (PSL), it is possible to use any other programming language within the VM. This is possible because the PATROL VM has a very good support for executing host OS commands. The VM for NT even has a javascript and vbscript engine compiled into make execution of script written in those languages even easier. 

Most virtual machines don't allow the VM to run host commands to make sure the machine acts fully self-contained. Because PATROL was designed to gather information of the OS where it is running on, communicating with the host OS is one of its primary tasks. Actually the PATROL VM is optimized for executing host commands and offers features like being able to spawn processes with any credentials or opening communication channels towards OS processes so the OS process can continue to run and has better responsiveness and less performance impact on the OS. 

If you know PSL, you can write programs that will run in every OS where the VM runs on without being a master of the OS you execute on. Your skill should be limited to knowing the VM itself. Of course, when executing OS commands, you will make your code system dependent.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*