Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

check cf server from command line?

Status
Not open for further replies.

ttrinh

MIS
Jan 21, 2002
93
AU
Hi
Is there anyway to check say, from the command line whether the cf server is up and running? If not is there another way as opposed to going into start>settings control panel ...services etc to see if the service is running?

thanks
 
From a command prompt, you can type NET START -- this should show you all the processes that are running. I'm not sure if it's the same in CF5 and CFMX, but in CF4.5 the service names of the ColdFusion processes are:[ul][li]Cold Fusion Application Server[/li]
[li]Cold Fusion Executive[/li]
[li]Cold Fusion RDS[/li][/ul]If you see these services (or something like them) in the list returned by NET START, you know the server is running.

You can use NET START and NET STOP to control the services too. Just type NET START "Service Name" or NET STOP "Service Name" to start or stop the service. I have a batch file that executes a NET STOP on all the services and then a NET START on all the services, when I need to restart the server when it's misbehaving.
 
thanks pcorriea
Is it possible say to do that on the server from my work station? ie check the server from my workstation?
 
It's certainly possible using some other tools, but it depends a lot on what OS version you have on the server and the workstation. Windows 2000 has a built-in Telnet server that would accomplish this -- you'd telnet from your workstation to the server (all versions of Windows have a telnet client built-in) and then execute the commands from the telnet session. If you also have Windows 2000 or XP on the workstation, you can use Computer Management (in your Administrative Tools) to connect to the server and manage the services using a GUI.

If you're running Windows NT on the desktop, you can use Windows NT Diagnostics. Go to File > Select Computer and type in the name of the server. You should then be able to check the status of the services running on the server. However, this tool does not allow you to start or stop the services. If you're in an NT environment, you might want to investigate installing a Telnet server application on the web server.
 
Along those same lines, do you know how to restart K2 Service in CF 5? Is it possible? Ive never seen anyone talk about it, only the other parts of CF.

Thanks in advance,

Dave
 
pcorriea,
is it possible to say, in a batch file (or something else ) if the cold fusion service stops or misbehaves can it trigger off an email to let someone know about it ?

Thanks
 
ttrinh,

You could certainly write a script that checked the status of the Cold Fusion Application Server service on a periodic basis and perform additoinal tasks, such as restarting the service or notifying an administrator, if the service is stopped. I would recommend using Windows Scripting Host to write such a script rather than batch files because you have the power to do a lot more, like call CDO (Collaboration Data Objects) to send the mail. WMI would also be an option, but it is considerably more complex. Here are some links:

Windows Scripting Host:
Collaboration Data Objects:


What I meant specifically by "misbehaving" is some bad memory management that we have found in the ColdFusion server when it stops long-running processes. We normally observe a memory usage of about 15-30MB for the cfserver.exe process. But after halting a couple of long-running templates, it's not uncommon for us to see a memory usage of upwards of 90MB, at which point the server becomes unbearably slow. To capture information about memory usage, I think you would have to use WMI to trap memory usage events. I don't have any experience with this, so I can't give you specific examples, but here's the Microsoft documentation:

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top