From 62da347ef44074b30903312e89d88d1f4bf969e0 Mon Sep 17 00:00:00 2001 From: Tim Middleton Date: Tue, 27 Aug 2024 13:27:41 +0800 Subject: [PATCH] Minor update to enable thread dumps lock by default (#226) * Minor update to enable thread dumps lock by default * Add -D option to disable padding on startup --- pkg/cmd/cluster_utils.go | 2 +- pkg/cmd/monitor_cluster.go | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/cluster_utils.go b/pkg/cmd/cluster_utils.go index 430aa56e..0f4a9520 100644 --- a/pkg/cmd/cluster_utils.go +++ b/pkg/cmd/cluster_utils.go @@ -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 { diff --git a/pkg/cmd/monitor_cluster.go b/pkg/cmd/monitor_cluster.go index 30649744..ffe596da 100644 --- a/pkg/cmd/monitor_cluster.go +++ b/pkg/cmd/monitor_cluster.go @@ -54,6 +54,7 @@ var ( padMaxHeightParam = true showAllPanels bool ignoreRESTErrors bool + disablePadding bool monitorCluster bool additionalMonitorMsg = pressAdditional expandedPanel = "" @@ -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 @@ -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")