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 al
Server::Control allows you to control servers ala apachectl, but with
better diagnostics and many more features. It includes both a drop-in
replacement for apachectl (”apachectlp”) and an OO interface.
Though it was designed with Apache in mind, there are also subclasses
for HTTP::Server::S