Author: Josh

  • Copy and Paste (clipboard) Fedora 14 to Windows 7 rdesktop Session

    EDIT: It turns out that this was a mistake – I had long ago acquired the habit of stopping the rdpclip.exe process on any Windows client that I was using rdesktop to work on whenever copy/paste stopped working and re-connect to solve the problem. I had done this at the same time where I changed […]

  • Using strace to attach to a multi-threaded process (like a JVM/Java)…

    When using strace to attach to a process that is running many threads, use the following format for a system call summary: strace -f -c -p PID -o /tmp/outfile.strace To run a trace without a summary, which will result in voluminous amounts of space, omit the ‘-c’: strace -f -p PID -o /tmp/outfile.strace This will […]

  • Tomcat troubleshooting – Thread Stack Trace

    One of the best troubleshooting tools when using tomcat is to cause the JVM to print a thread stack trace for each current thread. This will provide insight into what all threads are currently doing. Note that if you wait until there is a problem to take the first stack trace, it will be very […]

  • Windows Server Uptime

    One valuable piece of information when troubleshooting any server issue is how long has the server been up. This is something that is not as easy to find on Windows as Linux, but I needed this today. To see the uptime of a Windows Server 2003 server, use the following command: net statistics server The […]

  • Bind-DLZ with MySQL

    DNS management with Bind has traditionally been flat files and slave/master configurations. Bind also has a feature/extension called DLZ — dynamically loaded zones. This feature can be very useful when designing applications that use databases or directories for storage rather than having to design your application to address a filesystem to create resource records or […]

  • Bash Tip! for loop on directory listing

    One very common task when scripting with bash is to use a for loop to iterate over the contents of a directory or directory tree. There are two primary methods of accomplishing this task; using ls and using find. We’ll not consider the manual method as that would be completely unworthy of our attention. I […]

  • CIFS over SSH – Extending the network

    I recently had an issue where a file copy from a celerra NAS to a server outside the network was failing and I couldn’t figure out why. The file copy was a pull from the outside server which needed access inside the network. The BGP route had somehow changed to go over Integra’s network rather […]

  • Awstats with Apache and mod_rewrite

    I recently setup a new Awstats install and used mod_rewrite to make it easier to view web stats. Using the following configuration within a virtual host declaration, you can simply make requests in the following format: http://awstats/$CONFIG/$YEAR/$MONTH/$DAY/ This is assuming that you run daily rollups. ServerAlias awstats RewriteCond %{REQUEST_URI} !^/awstats/awstats.pl [NC] RewriteCond %{REQUEST_URI} !^/icon [NC] […]

  • Bash tip: Print begin and end timestamp on apache logs…

    This morning I needed to audit some log files that I had recently processed through AWstats and received a report that there was a discrepancy in the data. The complaint was that one day was missing. I used the following bash script to print out the start and end timestamp of each log file: for […]

  • System Administrator Technical Interviews

    I have had the opportunity to interview many candidates over the past few months and have a few tips: When indicating that you have VMware experience, clearly indicate which features you have experience with. I have interviewed many candidates who claim to be experts on VI3/vSphere and yet have never used clustering or shared storage. […]