Technology Insights

How to Get Information About A Stuck Process with strace

Sometimes a process will get stuck in a loop on a server either because it has run out of memory, buggy code has been pushed live, or any other number of reasons. One of the first steps in this situation before killing (kill -9) the process should be to try to figure out why the process is looping. This can be done with strace. Use the below command to gain more information about the PID (Process ID).

To output the information to your shell.

bash

  1. [root@server ~]#strace -p <pid>
Details
Technology Insights

How to Customize Taragana Translator Plugin Pro, English Flag Has Incorrect Link

The Taragana Translator Plugin is the best translation software I have found for WordPress . Not only is it easily customizable but for only $30 you can have your entire blog translated into 13 languages in less than 15 minutes. It is however beneficial to customize some of the settings and especially to add a bit to the design. I prefer having the flags appe ar at the top of the center column of a three column WordPress layout. Below I have listed some tips on how to easily customize the display of the flags.

The first thing to do is have display the actual flags. The major holdup I had was the home flag, in my case the English or US flag, was not displaying the correct link. No matter what I did it would display the URL of the translation I was currently using. So if I was viewing a German translation page then the US flag would display / de . I finally figured out that you have to wrap your flag display with text to not translate a section of co de . The text to use for not translating is shown below in an example.

Details
Technology Errors

pg_ctl: Server Does Not Shut Down – Force Postgres to Shutdown

You might see the following when issuing the normal stop command to postgres via pg_ctl.

-bash-3.1$ pg_ctl stop
waiting for server to shut down……………………………………………………… failed
pg_ctl: server does not shut down

Sometimes postgres does not want to shutdown by just issuing a pg_ctl stop as the postgres user. User might feel the need to “kill -9” the postgres processes however this could be dangerous for PostgreSQL. Instead of trying to kill the PID follow the directions below in an attempt to stop postgres in an organized fashion.

Details
Technology Insights

How to List Crontabs For All Users in Linux

In Linux you can list the contents of a users crontab from root by issuing the below command:

[root@server ~]#crontab -u username -l

How do you list crontabs for all of the users on your Linux server? The easiest way is to list the contents of /var/spool/cron which will provide you a list of all of the users that have cron entries. Then if you need the specific details of a users cron entries you can use the command above and replace username with the username in question to see the details.

Details