Copy link to clipboard
Copied
I can not find the CF10 metrics logs.
Reference:
http://www.adobe.com/devnet/coldfusion/articles/coldfusion-tomcat.html
Says in part:
Logging mechanism in ColdFusion 10
ColdFusion 10 logs Tomcat metrics to metrics.log
I can not find the metrics log on the file system or CFadmin web page. Is there some way of enabling the CF10 metrics logging as there was with older CF7 8 9 versions to enable jrun metrics logging? eg:
http://helpx.adobe.com/coldfusion/kb/enable-metrics-logging-coldfusion-mx.html
As always thanks, Carl.
CFAdmin > Debugging & Logging > Debug Output Settings
tick Enable Metrics Logging
Select this option to enable ColdFusion Metrics Logging.
I have some tomcat metrics now. For interested readers contents:
"Information","scheduler-1","05/16/12","14:47:51",,"Max threads: 150 Current thread count: 8 Current thread busy: 0 Max processing time: 9443 Request count: 62 Error count: 1 Bytes received: 133 Bytes sent: 130660 Free memory: 42981784 Total memory: 238616576 Active Sessions: 0"
"Information","sched
...Copy link to clipboard
Copied
CFAdmin > Debugging & Logging > Debug Output Settings
tick Enable Metrics Logging
Select this option to enable ColdFusion Metrics Logging.
I have some tomcat metrics now. For interested readers contents:
"Information","scheduler-1","05/16/12","14:47:51",,"Max threads: 150 Current thread count: 8 Current thread busy: 0 Max processing time: 9443 Request count: 62 Error count: 1 Bytes received: 133 Bytes sent: 130660 Free memory: 42981784 Total memory: 238616576 Active Sessions: 0"
"Information","scheduler-1","05/16/12","14:48:51",,"Max threads: 150 Current thread count: 2 Current thread busy: 1 Max processing time: 9443 Request count: 62 Error count: 1 Bytes received: 133 Bytes sent: 130660 Free memory: 106822296 Total memory: 238616576 Active Sessions: 0"
"Information","scheduler-1","05/16/12","14:49:51",,"Max threads: 150 Current thread count: 2 Current thread busy: 0 Max processing time: 75772 Request count: 63 Error count: 1 Bytes received: 133 Bytes sent: 1428659 Free memory: 96648248 Total memory: 238616576 Active Sessions: 0"
"Information","scheduler-0","05/16/12","14:50:51",,"Max threads: 150 Current thread count: 4 Current thread busy: 1 Max processing time: 115526 Request count: 64 Error count: 1 Bytes received: 133 Bytes sent: 2726657 Free memory: 60275304 Total memory: 228327424 Active Sessions: 0"
"Information","scheduler-1","05/16/12","14:51:51",,"Max threads: 150 Current thread count: 8 Current thread busy: 5 Max processing time: 116536 Request count: 86 Error count: 2 Bytes received: 133 Bytes sent: 2788138 Free memory: 49445008 Total memory: 228327424 Active Sessions: 0"
Copy link to clipboard
Copied
Do you know, which CF Admin API method/property does the "Enable Metrics Logging" checkbox in Admin UI correspond to?
Br,
Jan
Copy link to clipboard
Copied
That’s a good question, Jan. I don’t find any that equates to it.
I wondered if perhaps it was a “property” that might be set in the runtime.cfc’s getruntimeproperty method, but according the API docs (more on that below), there is none listed that seems related. I tried to guess at a few, to no avail. Also, sadly, there is no function that returns what all the properties are (that can be set or gotten), so we have to trust the docs. (Besides the doc listing available methods, I also did a CFDUMP of the runtime CFC and see no such method to list all runtime properties.)
I will reach out to some others to see if anyone else might know an answer (to both whether there is a means to control it, or a means to get a list of all supported properties).
In the meantime, and in the vein of “teaching a person to fish”, if you or other readers may not have known how you might find an answer to that sort of question (“is the admin API able to do xyz?”), let me point out that you can find out much more on the API (than is documented in any CF docs), on your own, using a couple of tools that many never know about.
First, if you had a guess as to which CFC it might be, such as runtime.cfc, you could browse that using http://[servername]/CFIDE/adminapi/runtime.cfc. That would cause CF to show you the CFC browser, showing the available methods and CFCs in that CFC (or any CFC whose path/name you provide in the URL). Note that you do need to know the CF Admin or RDS password to see this. (A protection that can be removed by modifying the application.cfm in the CFIDE/componentutils/ directory that this tool uses.
Second, if the needed method or property was not in that CFC, and you wondered “what other CFCs are in the Admin API”, there is also a component package browser (related to that tool above), available at http://[server]/CFIDE/componentutils/componentlist.cfm, which will list all CFC packages (directories) on the entire server. To see just those for the Admin API, use this: http://[server]/CFIDE/componentutils/componentlist.cfm?package=CFIDE.adminapi.
Again, I looked through the various CFCs and their methods, and no others referred to metrics ( or logging, that seemed related to metrics logging). While a couple others also have support for “properties”, none listed metrics logging. But again, it could be that some may be the answer, but they don’t provide a way to dump all their supported properties, in case one of them may have been updated but the javadocs for the method just have not been updated.
Hope that’s helpful.
/charlie
Copy link to clipboard
Copied
Thanks for the tips, Charlie. Component browser was my first stop, and I also tried cfdumping the api objects, to no avail.
As a workaround, I just edited lib/neo-metric.xml and set cfmetrics variable to true there:
<var name="cfmetrics"> <string>true</string> </var>
Also, while I was at it, I made sure cfstat was enabled as well, and configured with a unique port number. Multiserver config is broken by default: all servers try to use port 7995 for cfstat, which obviously will not work well.
Br,
Jan
Copy link to clipboard
Copied
I have brought this to the attention of some Adobe engineers, who have acknowledged it and filed a bug report, but the number they gave me was not working when I tried it (https://bugbase.adobe.com/index.cfm?event=bug <https://bugbase.adobe.com/index.cfm?event=bug&id=3361360> &id=3361360). Maybe they need to mark it public or something. If I learn more, I’ll share it here.
As for CFSTAT not working in instances, sadly yes that seems an issue as well. It had always failed to work in CF9 and earlier, and when the new CFSTAT port field showed up in the Admin for instances, I hoped that they had solved it. But I have not gotten it to work, despite a fair bit of futzing. I’d recommend you open a bug report for that as well.
/charlie
Copy link to clipboard
Copied
I filed a bug report (#3361929) on the cfstat issues:
- cfstat server port conflict in multiserver configuration
- unable to change cfstat server port in Admin API or UI
- invalid admin UI field mapping "Connector Port" -> neo-metric.xml:cfconnectorport (should probably be cfstatport)
- admin UI field "Connector Port" is undocumented
Additionally I filed a feature request (#3361936) for cfstat configuration improvements:
- cfstat server should listen on a unix domain socket or localhost by default
- admin should be allowed to choose the bind address, not just port
Br,
Jan