How can I verify which locale the Spectrum Tomcat is running on?
search cancel

How can I verify which locale the Spectrum Tomcat is running on?

book

Article ID: 442057

calendar_today

Updated On:

Products

Network Observability Spectrum

Issue/Introduction

In an environment that is not specifically built with a US locale, there can be issues with multiple locales, as the Tomcat JVM will use the very last locale in the list that it finds.

When it uses a non US locale, such as Norwegian or Swedish, it can cause inconsistent behavior with custom alarm filters.

How can we verify which locale the Spectrum Tomcat JVM is using?

 

Environment

Spectrum : Any

Tomcat Java JVM

Multiple Locales

Resolution

You can get the Spectrum tomcat pid

1. From Windows through Process Explorer, Services Tab and find the Spectrum Tomcat pid

2. From Linux  bash shell, ps -ef | grep tomcat

3. From a bash shell cd into $SPECROOT/Java/bin

 

Syntax

jcmd <Spectrum Tomcat PID> VM.system_properties | grep -E "user.(language|country)"

 

For Windows (example if Spectrum tomcat pid is 2084)

 

$ jcmd 2084 VM.system_properties | grep -E "user.(language|country)"
user.country=US
user.language=en

 

For Linux (example if Spectrum tomcat pid is 1154)

 

./jcmd 1154 VM.system_properties | grep -E "user.(language|country)"
user.country=US
user.language=en

 

If the output is different then above, you will need to follow the OS recommendations for using the correct locale as en_US