How to find out all running as well as inacitve instances of CF on a server?
Copy link to clipboard
There are several ways. Here are the main ones, I’d think:
- assuming you created them with the main “cfusion” instance, using its Enterprise Manager>Instance Manager page, they would be listed there, with an indication of whether they are running
- in your OS, you could view any running instances. In Windows, you could use Task Manager, while in *nix you could use the top command. And in CF10 and later, they would be indicated (on Windows) as coldfusion.exe while on CF9 and earlier, they would be called jrun.exe. In Windows Task Manager, you can add a column (to the display of process details) called “command line”, which would show the command line used to start each instance (even if it was started as a Windows service)
- speaking of services, on Windows, you could of course also view running instances in the Services panel (assuming you indicated during their creation that a service should be created and used). There’s a corresponding means to list running daemons in *nix. This is also assuming you have indeed started the processes as a service (or daemon in *nix). You don’t have to start an instance that way, even if it’s configured to run as a service/daemon. One could start an instance from the command line, in which case again it will be listed as a running process by the OS, as discussed in the previous explanation
If this somehow doesn’t help and/or you have more questions on it, It may help a lot for you to indicate both the version of CF and the OS you’re running it on. And it would likely also help to explain why you’re asking (what challenge you’re facing).
But if this answered your question, great, in which case please do mark it as “the answer” in the web forum. Thanks.
The issue I am facing is : I have include file - in which sets some application level variables.
The Application timeout is 12 hours - just to cross check, if the application onstart fires after 12 hours, I have added mail script - now I am getting mail every 15 minutes
But when I place the mail script in on start it fires only after 12 hours, but in includes it fires every 15 minutes....
Ok...Identified issue - had another application.cfc in one of sub folders and from there the script was getting executed.
Actually my Question should be - in a CF instance - how to find how many applications are running?
Ah, ok. That’s certainly a different question. (I really wasn’t understanding your first reply to me, given that confusion.)
There is no single mechanism (tag or function) built into CFML that I know of, to list all current apps.
But I will note that in the Enterprise edition, there is both the CF Server Monitor and the servermonitoring.cfc in the Admin API which each have a means to list “applications by memory usage”. Now, if you don’t have the “memory tracking” feature of the CFSM enabled, then you don’t get the memory count (and for most people, the cost of memory tracking is not worth its risk), but even without memory tracking enabled, you still do get the list of current applications.
Are you on CF Enterprise? If so, see the Statistics tab, then Memory, then Applications by Memory Usage.
Let me know if that’s helpful. And if anyone else knows a better way, I’d love to hear it.