You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* enhancements: human-readable error message and hints, file system location(r/w access) support, container-dir to store dump and local-dir to save dump copy
* fix issues when save local copy
* Update README.md
Co-authored-by: Tim Gerlach <Tim.Gerlach@sap.com>
* Update cf_cli_java_plugin.go
Co-authored-by: Tim Gerlach <Tim.Gerlach@sap.com>
* Update cf_cli_java_plugin.go
Co-authored-by: Tim Gerlach <Tim.Gerlach@sap.com>
* update based on review comments
* return err if utils any error
* Update cf_cli_java_plugin_test.go
Co-authored-by: Tim Gerlach <Tim.Gerlach@sap.com>
* Update cf_cli_java_plugin_test.go
Co-authored-by: Tim Gerlach <Tim.Gerlach@sap.com>
* udpate according Tim's comments
* fix jvmmon check issues
* Update README.md
Co-authored-by: Tim Gerlach <Tim.Gerlach@sap.com>
* Update README.md
Co-authored-by: Tim Gerlach <Tim.Gerlach@sap.com>
* update per Tim's comments
* support specify dump file path for jvmmon
* Fix issues with OpenJDK VMs
Co-authored-by: Tim Gerlach <Tim.Gerlach@sap.com>
Copy file name to clipboardExpand all lines: README.md
+13-2Lines changed: 13 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,13 +87,24 @@ OPTIONS:
87
87
-app-instance-index -i [index], select to which instance of the app to connect
88
88
-dry-run -n, just output to command line what would be executed
89
89
-keep -k, keep the heap dump in the container; by default the heap dump will be deleted from the container's filesystem after been downloaded
90
+
-container-dir -cd, the directory path in the container that the heap dump file will be saved to
91
+
-local-dir -ld, the local directory path that the dump file will be saved to
90
92
</pre>
91
93
92
-
The heap dump or thread dump (depending on what you execute) will be outputted to `std-out`.
94
+
The heap dump will be copied to a local file if `-local-dir` is specified as a full folder path. Without providing `-local-dir` the heap dump will only be created in the container and not transferred.
95
+
To save disk space of the application container, heap dumps are automatically deleted unless the `-keep` option is set.
96
+
97
+
Providing `-container-dir` is optional. If specified the plugin will create the heap dump at the given file path in the application container. Without providing this parameter, the heap dump will be created either at `/tmp` or at the file path of a file system service if attached to the container.
commandFlags.NewIntFlagWithDefault("app-instance-index", "i", "application `instance` to connect to", -1)
126
128
commandFlags.NewBoolFlag("keep", "k", "whether to `keep` the heap/thread-dump on the container of the application instance after having downloaded it locally")
127
129
commandFlags.NewBoolFlag("dry-run", "n", "triggers the `dry-run` mode to show only the cf-ssh command that would have been executed")
130
+
commandFlags.NewStringFlag("container-dir", "cd", "specify the folder path where the dump file should be stored in the container")
131
+
commandFlags.NewStringFlag("local-dir", "ld", "specify the folder where the dump file will be downloaded to, dump file wil not be copied to local if this parameter was not set")
return"", &InvalidUsageError{message: fmt.Sprintf("The flag %q is not supported for thread-dumps", "keep")}
151
160
}
152
-
break
161
+
ifcommandFlags.IsSet("container-dir") {
162
+
return"", &InvalidUsageError{message: fmt.Sprintf("The flag %q is not supported for thread-dumps", "container-dir")}
163
+
}
164
+
ifcommandFlags.IsSet("local-dir") {
165
+
return"", &InvalidUsageError{message: fmt.Sprintf("The flag %q is not supported for thread-dumps", "local-dir")}
166
+
}
153
167
default:
154
168
return"", &InvalidUsageError{message: fmt.Sprintf("Unrecognized command %q: supported commands are 'heap-dump' and 'thread-dump' (see cf help)", command)}
0 commit comments