Tag: server

  • Which process at which port?

    I came back to the computer earlier today and found one of my servers to be unresponsive. The front-end of one of my bittorrent hosting boxes did not load so I tried some of the other websites hosted on the same box. None were loading.

    Luckily accessing via SSH worked fine and revealed that Apache had died for unknown reasons at some point from yesterday onwards. Trying to start Apache was not possible since it could not bind to the socket at port 80. I had already checked for any remaining PIDs from the previous httpd process, so I started worrying about a possible intrusion or some root-kit binding to port 80 instead of Apache.

    I started running netstat to reveal the listening ports but unfortunately the process information field was empty for this particular process in question. A quick search showed how lsof could also be used to display the name and pid of the listening process on any port number. In my case I typed:

    lsof -i :80

    This displayed a couple of known Python orphaned processes that belonged to the original and defunct httpd process. Once killed Apache was started with no issues.

    After all, nothing dramatic!

  • Console recursive FTP client

    Sometimes data needs moving from server to server without FXP support. For this task there is nothing simpler than good old FTP.

    What about if you have a large number of subdirectories? As the plain FTP client can not fetch the files recursively shell scripting is usually the solution. But in cases where you do not really know neither the depth of the recursion or the naming convention of the file system structure, an alternative method is needed.

    This method is named NcFTP Client. I got to know about it today as I quickly needed to copy several gigabytes of data spread over several subdirectories and NcFTP did its job flawlessly. I did not even have to install it as Fedora 10 already came with it by default.