Announcing: Server::Control and apachectlp
am 23.11.2009 21:14:11 von Jonathan Swartz
Server::Control allows you to control servers ala apachectl, but with =20=
better diagnostics and many more features. It includes both a drop-in =20=
replacement for apachectl (=94apachectlp=94) and an OO interface.
Though it was designed with Apache in mind, there are also subclasses =20=
for HTTP::Server::Simple and Net::Server, and it=92s general enough to =20=
use with any server that has a pid file and listens on a port.
Features include:
* Checks server status via both pid file and port connect
* Detects and handles corrupt or out-of-date pid files
* Reports what is using a port when it is busy (via lsof)
* Tails the error log when server fails to start
* Supports sudo usage for restricted (< 1024) port
* Easy to customize for your environment with start/stop hooks, =20
etc.
Coming soon: plugins for common tasks associated with starting and =20
stopping servers, such as generating conf files from templates and =20
auto-restarting a server on file change.
If you try this and have problems getting it to work, or suggestions =20
for improvement, please let me know!
Jon
Re: Announcing: Server::Control and apachectlp
am 23.11.2009 21:35:01 von Devin Teske
Perhaps it would be prudent to add some logic that when "lsof" is not
available, check for (and possibly use) "fstat" instead.
Do note that the syntax of these two commands (lsof vs. fstat) are not
the same and additional logic may need to be added.
Just thought I'd mention "fstat" because not all systems have
"lsof" (for example, FreeBSD vs. Linux).
--
Devin
On Mon, 2009-11-23 at 12:14 -0800, Jonathan Swartz wrote:
> Server::Control allows you to control servers ala apachectl, but with =20
> better diagnostics and many more features. It includes both a drop-in =20
> replacement for apachectl (â=9Dapachectlpâ=9D) and an OO interf=
ace.
>=20
> Though it was designed with Apache in mind, there are also subclasses =20
> for HTTP::Server::Simple and Net::Server, and itâ=99s general enough=
to =20
> use with any server that has a pid file and listens on a port.
>=20
> Features include:
>=20
> * Checks server status via both pid file and port connect
> * Detects and handles corrupt or out-of-date pid files
> * Reports what is using a port when it is busy (via lsof)
> * Tails the error log when server fails to start
> * Supports sudo usage for restricted (< 1024) port
> * Easy to customize for your environment with start/stop hooks, =20
> etc.
>=20
> Coming soon: plugins for common tasks associated with starting and =20
> stopping servers, such as generating conf files from templates and =20
> auto-restarting a server on file change.
>=20
> If you try this and have problems getting it to work, or suggestions =20
> for improvement, please let me know!
>=20
> Jon
>=20
--=20
Cheers,
Devin Teske
-> CONTACT INFORMATION <-
Field Engineer
FIS - Vicor Business Unit
626-573-6040 Office
510-735-5650 Mobile
devin.teske@metavante.com
-> LEGAL DISCLAIMER <-
This message contains confidential and proprietary information
of the sender, and is intended only for the person(s) to whom it
is addressed. Any use, distribution, copying or disclosure by any
other person is strictly prohibited. If you have received this
message in error, please notify the e-mail sender immediately,
and delete the original message without making a copy.
-> END TRANSMISSION <-