One way is to start the JRUN console and look at the settings of each instance to get a clue. It does not show the name of the config file though.
But perhaps a better way is to look at the WIndows service of each instance in the services control panel and look for the command line of the service, it contains the config file name. We moved from Windows to Linux so I can not supply exact steps.
thanks for the response.
i'd tried that one already, and unfortunately all the windows services point at '"C:\JRun4\bin\jrunsvc.exe"...
in terms of the JRUN console you mention, what more specifically are you referring to? and how do i start it?
On windows someone would have done something like jrunsvc -install <server_name> <server_name> "<service_name>" -config jvm_<server_name>.config.
Maybe the "jvm.config" has a comment inside it expaining which instance it belongs to?
Something you could do is enable some JVM logging and specify a sepate log name to the JVM arguments, then when you stop start an instance you will be able to identify the "jvm.config" to instance by the log name generated EG:
java.args=-server etc -XX:+UseParallelGC -Xloggc:which_instance1.log etc
java.args=-server etc -XX:+UseParallelGC -Xloggc:which_instance2.log etc
thanks for the suggestions. i'd imagine that's exactly how this was set up initially...
unfortunately the config files offer no pointers that i could find. pretty plain jane.
in terms of logging, that's not a bad idea, however as this is a production machine, i'd prefer to avoid restarting the instances if possible. i'll keep this one in mind if i can't find another solution.
The JRUN Admin Server is normally pre-installed as a service, as part of the CF installation. It normally runs under port 8000 so you could access it at http://localhost:8000 on the server itself for instance.
I has a settings tab for each instance, which shows the JVM settings. IF each one had some unique setting, like Carl Type 3 suggests, you'd possibily see it there.
ah, didn't realize you were talking about the cfamin. i tried there as well, the instance manager section shows the various instances, but there's not much in the way in terms of information on them (i checked the edit screen for each instance as well). perhaps you were meaning to check elsehwere?
The JRUN Admin is not the same as the CF Admin..
What about use JMC to apply a sane change to instance JVM arguments setting then go check Jrun4\bin\ as to which JVM.CONFIG has been updated. I expect there should be need to restart your production instances.
Hope helps, Carl.
@djangolives, the simple answer is that what you seek is tracked in the registry. The longer answer, including how to get that info from the command line, follows.
Since you’re running CF on Windows, then if you’re running each instance as a service, then @joopk was on the right track. The way to indicate a different jvm.config for an instance is to modify the service definition to denote it. And as Carl later noted, you do that using the command line jrunsvc command and the –config argument. Sadly, there is no jrunsvc argument that lists these definitions (that I know of).
And you’re right that if you look at the Windows service definition, all you’ll see is it pointing to jrunsvc.exe itself, not indicating the jvm.config.
Instead, the configuration is saved as part of the Service definition as tracked by Windows in the registry, and that’s where you need to look to find this info. If you’re comfortable using RegEdit, I’ll share what you need to find it. If you may prefer to use a command-line tool instead, I’ll show that also, which is helpful both to get for many instances quickly as well as to avoid risk of editing values by mistake in regedit.
First, note that all services are defined in the registry at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\. So let’s say your service name of interest was “Adobe Coldfusion 8 AS instance1”. You’d find that there’s a key there with that name. And under that key you will see it has various values, among which is one (if you did modify it to have its own jvm.config) called “Parameters”, which is where the JRunSVC command would place this –config argument and value if provided.
So that’s one way to find what config is used for what service. But a second way is to use the REG command-line tool (should be available free within Windows on most versions that I’ve seen.) You’d want to use its “query” argument, and you then pass it the keyname (including the service/instance name, so it’s varied a bit from what I showed above). Note also that if the service name has spaces, then you need to enclose the whole keyname in quotes.
reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Adobe Coldfusion 8 AS instance1"
That will show all the keys and their values, but even niftier is that you can get it to list JUST the one value you’re interested in (in this case, the one called “parameters”) using the /v argument:
reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Adobe Coldfusion 8 AS instance1" /v parameters
Note also that the reg query command also lets you specify the machine name (before the keyname) if you wanted to use this to run against other servers in your network, and it has still other args that may be of interest. Run “reg query /?” from the command line to learn more.
I do think this will be the most straight-forward way to get the info you seek, @djangolives. Let us know if that helps or if you need more info.
PS As I was responding to this note, and referring to djangolives and joopk above, I wondered, “do people realize they can change the forums to show their real name rather than just their Adobe ID?” I do appreciate that some may like it that way, but if you maybe didn’t know you could and you’d like to show your name instead, see another forum entry I just created at http://forums.adobe.com/thread/1029289.
PPS I am also going to blog all this above. I was torn as to whether to do it there and point to it here, or vice-versa. I decided it may be best for all concerned to just repeat the info in both places. I’ll update the blog entry if we get some new info to modify what I propose above.
One more little tip about the above. If you wanted to just list all the jvm.configs for all the instances, without naming each one, you can do that also, using the REG command's /s command, as in:
reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services" /v parameters /s
This would return a list of each service definition that had a Parameters value. Here's an example of how that could look:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Macromedia JRun Admin Server
Parameters REG_SZ -config C:\Jrun4\bin\jvm.config
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Macromedia JRun CFusion Server
Parameters REG_SZ -config C:\\Jrun4\\bin\\jvm2.config
That's a lot easier than listing each service one by one! :-)
Of course, technically this variation of the command would return info on any services that may have a parameters value, beyond just CF services. I'll note taht you could limit this list still further, using any of a number of available arguments to the REG QUERY command. Again, use REG QUERY /? to get more details.
thanks for the answers everyone. i greatly appreciate it. hopefully i'll get to trying these later today...i'll follow up when i do.
Here' the blog entry I referred to:
How to identify what jvm.config a #ColdFusion instance uses (and vice-versa)
(Or a shortened link: http://bit.ly/MVmBUo)
BTW, to the suggesiton above of using the JRun Admin (or Management Console, or JMC), I do not find that it lists what jvm.config is used for a given instance, if indeed that instance it configured to run as a Windows service (which is what I think what djangolives had been referring to). If anyone finds otherwise, please do report it here, and I'll add that to my blog entry. Thanks.
thanks charlie, the reg query utility worked like a charm...now i can actually go and clean these jvm config args up.
thanks to everyone else that responded as well.
Indeed, the JRUN management console doe not show the name of the config file used. But it shows the JVM settings so if you added a unique JVM setting to each config file yu could find it that way. It is a roundabout way.
Good to hear. Thanks (and to jkaashoek for confirming things about the JMC.)