@@ -323,6 +323,13 @@ public static final Configure getInstance() {
323323 @ ConfigDesc ("" )
324324 public int autodump_stuck_check_interval_ms = 10000 ;
325325
326+ @ ConfigDesc ("ends sxlog profile when it exceeds profile_force_end_stuck_millis." )
327+ public boolean profile_force_end_stuck_service = true ;
328+ @ ConfigDesc ("alert when forcibly ends xlog profile." )
329+ public boolean profile_force_end_stuck_alert = true ;
330+ @ ConfigDesc ("stuck service millis for forcibly ends xlog profile" )
331+ public int profile_force_end_stuck_millis = 300000 ;
332+
326333 //Auto dump options on exceeded process cpu
327334 @ ConfigDesc ("Enable the function to generate dump file when this process cpu is over than the set threshold" )
328335 public boolean autodump_cpu_exceeded_enabled = false ;
@@ -974,6 +981,10 @@ private void apply() {
974981 this .autodump_stuck_thread_ms = getInt ("autodump_stuck_thread_ms" , 0 );
975982 this .autodump_stuck_check_interval_ms = getInt ("autodump_stuck_check_interval_ms" , 10000 );
976983
984+ this .profile_force_end_stuck_service = getBoolean ("profile_force_end_stuck_service" , false );
985+ this .profile_force_end_stuck_alert = getBoolean ("profile_force_end_stuck_alert" , true );
986+ this .profile_force_end_stuck_millis = getInt ("profile_force_end_stuck_millis" , 300000 );
987+
977988 this .autodump_cpu_exceeded_enabled = getBoolean ("autodump_cpu_exceeded_enabled" , false );
978989 this .autodump_cpu_exceeded_threshold_pct = getInt ("autodump_cpu_exceeded_threshold_pct" , 90 );
979990 this .autodump_cpu_exceeded_duration_ms = getInt ("autodump_cpu_exceeded_duration_ms" , 30000 );
@@ -1627,8 +1638,8 @@ public void initTmpDir() {
16271638 }
16281639
16291640 private boolean isKube () {
1630- Properties properties = System .getProperties ();
1631- return !StringUtil .isEmpty (properties . getProperty ("KUBERNETES_SERVICE_HOST" ));
1641+ Map < String , String > env = System .getenv ();
1642+ return !StringUtil .isEmpty (env . get ("KUBERNETES_SERVICE_HOST" ));
16321643 }
16331644
16341645 private String readHostNameFromHostAgent () {
0 commit comments