Skip to content

Commit

Permalink
Minor update to enable thread dumps lock by default (#226)
Browse files Browse the repository at this point in the history
* Minor update to enable thread dumps lock by default
* Add -D option to disable padding on startup
  • Loading branch information
tmiddlet2666 authored Aug 27, 2024
1 parent 6e2f1d9 commit 62da347
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cmd/cluster_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ func startCluster(cmd *cobra.Command, connection ClusterConnection, serverCount,
func getCommonArguments(connection ClusterConnection) []string {
splitArguments := strings.Split(connection.Arguments, " ")
return append(splitArguments, "-cp", connection.BaseClasspath, getPersistenceProperty(connection.PersistenceMode),
getLogLevelProperty(logLevelParam))
getLogLevelProperty(logLevelParam), "-Dcom.oracle.coherence.common.util.Threads.dumpLocks=FULL")
}

func startClient(cmd *cobra.Command, connection ClusterConnection, class string) error {
Expand Down
6 changes: 6 additions & 0 deletions pkg/cmd/monitor_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ var (
padMaxHeightParam = true
showAllPanels bool
ignoreRESTErrors bool
disablePadding bool
monitorCluster bool
additionalMonitorMsg = pressAdditional
expandedPanel = ""
Expand Down Expand Up @@ -161,6 +162,10 @@ Use --show-panels to show all available panels.`,
return err
}

if disablePadding {
padMaxHeightParam = false
}

// check for default layouts
if l, ok := defaultMap[layoutParam]; ok {
layoutParam = l
Expand Down Expand Up @@ -1338,6 +1343,7 @@ func init() {
monitorClusterCmd.Flags().StringVarP(&layoutParam, "layout", "l", defaultLayoutName, "layout to use")
monitorClusterCmd.Flags().BoolVarP(&showAllPanels, "show-panels", "", false, "show all available panels")
monitorClusterCmd.Flags().BoolVarP(&ignoreRESTErrors, "ignore-errors", "I", false, "ignore errors after initial refresh")
monitorClusterCmd.Flags().BoolVarP(&disablePadding, "disable-padding", "D", false, "disable padding of panels by default")
monitorClusterCmd.Flags().StringVarP(&serviceName, serviceNameOption, "S", "", serviceNameDescription)
monitorClusterCmd.Flags().StringVarP(&selectedCache, "cache-name", "C", "", "cache name")
monitorClusterCmd.Flags().StringVarP(&selectedTopic, "topic-name", "T", "", "topic name")
Expand Down

0 comments on commit 62da347

Please sign in to comment.