DevSupport
asked on
How to find Tomcat initial memory and Max memory through command line windows
Hi,
We have the tomcat variables set in the tomcatw.exe JAVA options on windows, but I want to get the Java Initial memory and Java Max memory settings results in command line.
I tried jinfo -flags pid and catalina.exe version
Please help me with the command to get the initial memory and max memory pool settings of a tomcat instance.
Thanks
We have the tomcat variables set in the tomcatw.exe JAVA options on windows, but I want to get the Java Initial memory and Java Max memory settings results in command line.
I tried jinfo -flags pid and catalina.exe version
Please help me with the command to get the initial memory and max memory pool settings of a tomcat instance.
Thanks
ASKER
May I know why this question is neglected? Is there no way to accomplish this? or is my question not clear enough?
Thanks
Thanks
I have been listening. I don't have a solution. I do wonder if you know about Tomcat's pre-installed manager app ? If you click on the "Server Status" button on Tomcat's home page, then you will see memory usage info(if you entered name and password in tomcat-users.xml file). Although that proves that the info can be obtained programmatically, I don't know how it is done. I realize that you wanted to access the info on command line. I don't know about that.
Hi,
Give it a try with wmic + find command.
I tried in my computer (on Win 7) and i can able to get the information (refer attached snap).
Basically, please play with wmic process command and check the list of processes it displays. Then
You may need to add more text to find specific (tomcat) process from the list if you multiple java processes are running.
Hope it helps.
Give it a try with wmic + find command.
wmic process | find "java" | find "catalina"
I tried in my computer (on Win 7) and i can able to get the information (refer attached snap).
Basically, please play with wmic process command and check the list of processes it displays. Then
You may need to add more text to find specific (tomcat) process from the list if you multiple java processes are running.
Hope it helps.
ASKER
I tried it in a single java application instance with tomcat 8 and its not working
On a command window, can run below command (by keeping tomcat running) and share generated text file ?
wmic process >> processes.txt
wmic process >> processes.txt
ASKER
Please find attached result. I took this while tomcat is running as a service.
Seems you missed to attach a file.
ASKER
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The response from Roger worked really well for my requirement. Thank You!
ASKER
Any help would be highly appreciated!.
Thanks
xmx-and-xms-settings-of-tomcat.jpg