javagc (forced execution of garbage collection)
Format
javagc [-i|-f] [-v] [-s] [-force] [-ehgc] -p process-ID
Function
This command executes full garbage collection at a desired time for the Java process whose process ID is process-id, such as when a memory leak or system error has occurred, or when application debugging is to be performed. Also, executes the full garbage collection and the Explicit memory block release at any time, for the Java process with the specified process- ID.
The SIGQUIT signal is used for communicating with a Java process. When the command is executed, requests user to check the process contents of the command. When the response is n (do not generate, execute, or send), the command does not execute the process contents of the command (the return value is 1). You can omit this configuration step by specifying the -f option.
If a copy garbage collection or a full garbage collection that occurs because of normal causes is running in the java process indicated by process-ID, you wait for the garbage collection to end, and then execute the command.
Arguments
For the Hitachi-specific Java VM extension options, see the following locations:
Return values
Input examples
javagc -i -v -p 8326
Output example
[VGC]<Wed Mar 17 00:42:30 2004>(Skip Full:0,Copy:0)[Full GC 149K->149K(1984K), 0.0786038 secs][DefNew::Eden: 264K->0K(512K)][DefNew::Survivor: 0K->63K(64K)][Tenured: 85K->149K(1408K)][Perm: 1300K->1300K(1536K)][cause:JavaGC Command] |
Output messages
Table 10-7 Messages output by the javagc command (in Windows)
No. | Error message | Explanation |
---|---|---|
1 | usage: javagc [-f|-i] [-v] [-s] [-ehgc] -p process-id | An argument specified in the javagc command is invalid. |
2 | javagc: illegal option --option | The indicated option (option) specified in the javagc command arguments is invalid. |
3 | javagc: can't communicate with process process-id | Communication with the process specified in the javagc command was not possible because the process has a problem or an error occurred in communication. |
4 | process-id: Not owner | 0 was specified in process-id specified in the javagc command. |
5 | process-id: Now processing previous request, this request canceled | The process indicated by process-id specified in the argument of the javagc command is currently executing the garbage collection using the previous javagc command. The javagc command cancels the garbage collection execution request. |
6 | javagc: can't create work file at temporary directory, this request canceled | The user does not have permission to reference or write data into the temporary file directory, so a garbage collection request file cannot be created. This garbage collection execution request is cancelled. |
7 | javagc: can't get temporary directory, this request canceled | The temporary file directory could not be extracted, so a garbage collection request file could not be created. This garbage collection execution request is cancelled. |
8 | javagc: unexpected error occurred:error-cause | An unexpected error occurred during javagc command execution. The following are examples of causes that may be displayed in error-cause:
|
9 | process-id: Timeout occurred. Java process not responding. | The process indicated by process-id specified in the javagc command did not return a response indicating that garbage collection was completed within the specified amount of time. Or, the indicated process is not a Java process. |
10 | javagc: please delete name-of-undeleted-file in full-path-of-undeleted-file | When the javagc command terminated, it could not delete an internal file. Delete the indicated file on the indicated full path. |
Table 10-8 Messages output by the javagc command (in UNIX)
No. | Error message | Explanation |
---|---|---|
1 | javagc [-f|-i][-v][-s] [-ehgc] [-force] -p process-id | An argument specified in the javagc command is invalid. |
2 | javagc: illegal option --option | The indicated option (option) specified in the javagc command arguments is invalid. |
3 | process-id: No such process | The process indicated by process-id specified in the argument of the javagc command is not found or the process indicated by process-id specified in the javagc command is not the java process. |
4 | process-id: Not owner | The executing user is not the owner of the process indicated by process-id specified in the javagc command. |
5 | process-id: Now processing previous request, this request canceled | The process indicated by process-id specified in the argument of the javagc command is currently executing the garbage collection using the previous javagc command. The javagc command cancels the garbage collection execution request. |
6 | javagc: can't create work file at /tmp, this request canceled | The user does not have permission to reference or write data into /tmp, so a garbage collection request file cannot be created. This garbage collection execution request is cancelled. |
7 | javagc: unexpected error occurred:error-cause | An unexpected error occurred during javagc command execution. The following are examples of causes that may be displayed in error-cause:
|
8 | process-id: Timeout occurred. Java process not responding. | The process indicated by process-id specified in the argument of the javagc command does not return a response indicating that the garbage collection is completed within the fixed time. |
9 | javagc: please delete name-of-undeleted-file in full-path-of-undeleted-file | When the javagc command terminated, it could not delete an internal file. Delete the indicated file on the indicated full path. |
Notes