Have a long running Linux process open in a SSH terminal window and need to shutdown your computer without killing it? I run into this on a regular basis and never spent the time looking into a solution but this past weekend I actually decided to look and came up with a cool solution called reptyr. The reptyr application allows you to open screen and migrate the process to the screen terminal and away from the terminal connection opened without screen. This allows you to detach from the window without killing the process. Below is a quick overview of installing reptyr and how to use it.
Earlier a client with a fairly complex network setup had a power outage in one of their data centers in Dallas, TX. The power outage caused three servers and a firewall to lose power causing all sorts of other issues on the servers themselves. One of the primary issues was getting the PostgreSQL cluster back in 100% operational.
I have a Linksys WRT54G wireless router running DD-WRT open source firmware. A lot of the work I do requires providing access to clients or coworkers to various devices on my local network. I also view the DD-WRT web interface regularly on the Linksys WRT54G to see what devices it can see on the network via ARP or IP. A lot of the time when I attempt to connect to the web server which is only running HTTPS on port 443 the connection via my browser will just hang or simply won’t make a connection at all. During the times when I am unable to open the DD-WRT web interface I am always still able to connect to the Linksys device via SSH meaning that for some reason the web interface is failing.
When connecting to a Linux device using a serial port there may be times where that connection becomes stuck open and thus will not provide sane output to the TTY port. This issue can be resolved by killing the PID (Process ID) and letting the serial port process restart.
The serial port connection should be configured in inittab which will allow you to specify various configuration options as well as respawning the process. So when you specify respawn the process will automatically restart if it is no longer running as will be the case if you kill the process off. The inittab entry will look similar to one of the two below examples.
Finding out what application is running on a specific port in Windows XP is easy by using two command line utilities. By using netstat with the proper switches you can list out all of the ports that are being used and then use Tasklist to list all of the applications that are running. The combination of the two utilities will allow you to figure out which application us using which port. As an example you can use the below directions to figure out what application is using port 80 for instance.
- Open Command Prompt: Click Start in the lower left hand corner of your PC and then select Run from the pop up. Type command in the Run window and click Enter to open up the command prompt.