How to find zombie processes on linux

CentOS, Linux, Tips and Tricks, Ubuntu
My NAGIOS monitor alerted me that of my dedicated server has 10 Zombie processes, how to find Zombie processes via command line on Linux especially CentOS? So it returns state (Z = Zombie) and the process id (PID) Technically, you cannot kill a zombie process since its already dead but the entry in the process table is not removed because the parent will access the result via the PID in the process table.
Read More

Routing a root domain / zone apex / naked domain to Amazon S3

Reviews, Tips and Tricks
Even though the sound of hosting a static website entirely out of Amazon s3, it has a catch. You can only host subdomains there (including www.example.com, cdn.example.com, images.example.com etc assuming your primary domain name is example.com) but not "apex domain" like example.com I had an idea of redirecting the example.com traffic to one of my VPSes and then redirecting via .htaccess or PHP to www.example.com at which point www is already hosted on s3 Just to double check, I posted the question online and got a reply from D. Svanlund who pointed me out to an awesome time-saver service still in beta called ARecord.net. They are right when they say Zone Apex issue on Cloud.
Read More

How to find specific files and send alerts

CentOS, How to, Linux, Tips and Tricks, Ubuntu
Maintaining a shared hosting server is a full time job but tools and proper checks and balances can help make this burden lot less. I manage a shared hosting server for one of my friends and numerous times the scripts that people have installed over on their websites have vulnerabilities and hackers exploit it to upload stuff that mass-email or do other nasty stuff. Luckily, most of these exploits have common patterns like files names or other signatures that make them traceable (most of the time the so called hackers are just kiddy scripts) Create a file and put this in it This is a small script that finds specific named scripts in the /home directory (mostly cPanel servers). You can put this in the crontab to do a scan…
Read More

vzfree utility to check memory usage in OpenVZ VPS

How to, Linux, OpenSource, Resources, Tips and Tricks, Tutorials, Ubuntu, Virtual Private Server
From the official blog post Gee. It has been a while since I’ve last written here, and it will be a while again for my next post as I will be on holidays from next Monday (visiting families in Hong Kong and Taiwan). Let me share one small utility program that I wrote quite a while ago. We all know that the Linux command free(1) is pretty useless inside an OpenVZ VE, even those with meminfo virtualised. So I basically wrote this little util to grab the data from the dreadful user_beancounters and format them into something useful. It’s written in C and only depends on libc so it’s pretty light weight. It also does a little bit of analysis instead of just dumping the data, which I will explain…
Read More