The page documents characteristics of the jvmstat tools that are common across the set of tools.
In order to monitor a Java application with this release of the tools, the target Java application must be running on the J2SE 1.4.2 HotSpot Java Virtual Machine. This release of the tools cannot be used to monitor Java applications running on the J2SE 1.4.1 HotSpot Java Virtual Machine.
The Host Identifier, or hostid is a string that indicates the target system of the jvmps command. The syntax of the hostid string largely corresponds to the syntax of a URI:[protocol:][[//]hostname][:port][/servername]
protocol
- The communications protocol. If the protocol is omitted and a hostname is not specified, the default protocol is a platform specific, optimized, local protocol. If the protocol is omitted and a hostname is specified, then the default protocol is rmi.
hostname
- A hostname or IP address indicating the target host. If hostname is omitted, then the target host is the local host.
port
- The default port for communicating with the remote server. If the hostname is omitted or the protocol specifies an optimized, local protocol, then port is ignored. Otherwise, treatment of the port parameter is implementation specific. For the default rmi protocol the port indicates the port number for the rmiregistry on the remote host. If port is omitted, and protocol indicates rmi, then the default rmiregistry port is used (port 1099).
servername
- The treatment of this parameter is implementation dependent. For the optimized, local protocol, this field is ignored. For the rmi protocol, this parameter is string representing the name of the RMI remote object on the remote host. See the -n option for the perfagent command.
The Virtual Machine Identifier, or vmid is a string that identifies a target Java Virtual Machine. The syntax of the vmid string largely corresponds to the syntax of a URI:[protocol:][//]lvmid[@hostname][:port][/servername]
protocol
- The communications protocol. If the protocol is omitted and a hostname is not specified, the default protocol is a platform specific, optimized, local protocol. If the protocol is omitted and a hostname is specified, then the default protocol is rmi.
lvmid
- The local VM identifier for the target Java Virtual Machine. The lvmid is a platform specific value that uniquely refers to a Java Virtual Machine on a system. The lvmid is the only required component of a Virtual Machine identifier. On most systems, this is generally equivalent to the process identifier for the target Java Virtual Machine process. On systems that do not maintain a one-to-one relationship of Java Virtual Machines to processes or do not have a process abstraction, some other unique mapping scheme will be used.
hostname
- A hostname or IP address indicating the target host. If hostname is omitted, then the target host is the local host.
port
- The default port for communicating with the remote server. If the hostname is omitted or the protocol specifies an optimized, local protocol, then port is ignored. Otherwise, treatment of the port parameter is implementation specific. For the default rmi protocol, the port indicates the port number for the rmiregistry on the remote host. If port is omitted, and protocol indicates rmi, then the default rmiregistry port is used (port 1099).
servername
- The treatment of this parameter is implementation dependent. For the optimized, local protocol, this field is ignored. For the rmi protocol, this parameter is string representing the name of the RMI remote object on the remote host. See the -n option for the perfagent command.
The interprocess communications mechanism for attaching to the instrumentation exported by an instrumented Java Virtual Machine is platform specific. For the HotSpot Java Virtual Machine on the Solaris, Linux, and Windows platforms, the IPC mechanism relies upon the concept of named shared memory. A shared memory region, with a backing store file in the file system name space, is created for each HotSpot Java Virtual Machine on a system. The file location varies depending on the native operating environment.Solaris and Linux
The file for a particular Java Virtual Machine is named /tmp/hsperfdata_username/lvmid, where lvmid is the local VM identifier of the target Java Virtual Machine. For UNIX systems, lvmid is the process identifier, or pid, for the target Java Virtual Machine. The username component of the path is the name of the user that corresponds to the effective user of the target Java Virtual Machine process.Access controls for the backing store files are set such that only the owner of the Java Virtual Machine has read/write access to the backing store file and shared memory region.
Windows
The location of the file differs depending on a number of factors, but is generally located in the directory indicated by the java.io.tmpdir system property. This property is set according to the value returned by the Windows GetTempPath() API. This interface returns the value of the %TMP% environment variable. If %TMP% is not defined, it returns the value of the %TEMP% environment variable. If neither are defined, it returns the Windows directory, which varies depending on the Windows operating system version. For Windows installations, it is important that both the monitoring and monitored Java Virtual Machines resolve java.io.tmpdir to the same directory. If the monitoring and monitored Java Virtual Machines resolve this property to different locations, the monitoring tools will not be able to locate their target Java Virtual Machine.The file for a particular Java Virtual Machine is named java.io.tmpdir\hsperfdata_username\lvmid, where lvmid is the local VM identifier of the target Java Virtual Machine. For Windows, this is the process identifier, or pid, for the Java Virtual Machine. The username component of the path is the name of the user that corresponds to the effective user of the target Java Virtual Machine process.
Access controls for these files are set such that only the owner of the Java Virtual Machine has read/write access to the backing store file and shared memory kernel object. If the java.io.tmpdir resides on a FAT or FAT32 file system, the file access controls are ineffective as they are not supported on these files system types. Sun recommends the use of an alternative local file system that supports access control lists, such as NTFS or an appropriate RAM based file system.
Copyright © 2003 Sun Microsystems, Inc. All Rights Reserved. |
![]() Java Software |