Quick how to for finding out the list of processes, including threads spawned by these processes
[code] ps -eLf | grep USERNAME [/code]
Explanation of the options
- e : Select all processes
- L : Show threads
- f : Extra full format
Quick how to for finding out the list of processes, including threads spawned by these processes
[code] ps -eLf | grep USERNAME [/code]
Explanation of the options
For my own notes.. very nice post on perishablepress.com regarding using the different capabilities of mod_rewrite to secure your website (application)
http://perishablepress.com/eight-ways-to-blacklist-with-apaches-mod_rewrite/
When I was ~9 years old, my dad bought home a Commodore 64K. It was slow.. it was terrible graphics and it took for ever to load a program using it’s “tape” drive. But boy was it fascinating to load up basic and write your own programs!!. I can’t say how many summer hours were spent staring at the screen and trying to get things to work.
Looking back, I can say that I probably wouldn’t have been in the technology field, if not for that first taste of computing.
Thank you Mr.Tramiel. RIP.
Apache configuration to redirect traffic to a particular URL based on the pattern in the URL (AKA URI). In this particular example, I want to redirect any traffic that does not have the URL starting with /application or /content to redirect to https://domain_name/application
Explanation of the rule
Instead of posting individual posts every day to track my progress (or lack of) in the 60 day challenge, I created this page (https://kudithipudi.org/2012-60-day-resolution/) for the daily entries..
Wish me luck :).
I have a confession to make.. I like Big Macs and Krispy Kreme Donuts :). And they have contributed heavily to the increase in my .. hmm.. how do I say this.. mid section :). Plus, it doesn’t help that there is a Krispy Kreme factory and a McDonald’s right on my way to work. And add on to the fact that I haven’t been running for the last year or so, I am proud to say that I have joined the >65% of Americans that are obese.
On my way to work yesterday, I was thinking about what shape (physically) I would be in when Virat grows up. I am sure he doesn’t want to have a dad that can’t play some hoops with him :).
So here’s my 2 month resolution. I am starting with a couple of months because there is a good chance that it might become a habit and then go from there :).
For every pledge I break, I am going to leave work at 5:00 PM for a week. Believe me when I say that is a tough punishment :). You see.. I love what I do :).
Viva La Resistance!!!
Inspired from this blog post by Vaidas Jablonskis. This tip has been tested on Redhat and Centos distributions.
If you ever wanted to log all the commands issued by users on a server, you can edit the default profile configuration to enable this
Jboss uses the log4j framework for providing logging services. log4j is a very flexible framework and can do a lot of things. One of the features provided by log4j is to send log messages to multiple destinations. Here is a quick how to on configuring Jboss to send log messages using the syslog protocol to a syslog server. This is pretty useful, when you are trying to consolidate logs from multiple sources into a central location.
First, some background about how log4j is configured in Jboss
The log4j configuration in Jboss is managed by the file jboss-log4j.xml located at $JBOSS_HOME/server/$JBOSS_PROFILE/conf.
There are three parts to this configuration file
So pictorially, it would look like this 
Getting back to the reason for this post, here is how you would enable the syslog appender and then configure a category to use this appender. For this example, we will use a class names org.kudithipudi
Couple of notes..
When troubleshooting performance issues..never take anything for granted..yes, even if something was not touched or restarted, chances are something touching it has been and might have affected it.
This goes esp for the network (IP and fiber) which don’t change as often as the rest of the environment.
A very timely post on Hacker News by Ewan Leith about configuring a low end server to take ~11million hits/per month gave me some more ideas on optimizing the performance of this website. Ewan used a combination of nginx and varnish to get the server to respond to such traffic.
From my earlier post, you might recall, that I planned on checking out nginx as the web server, but then ended up using Apache. My earlier stack looked like this
Based on the recommendations from Ewan’s article, I decided to add Varnish to the picture. So here is how the stack looks currently
And boy, did the performance improve or what. Here are some before and after performance charts based on a test run from blitz.io. The test lasted for 60 seconds and was for 250 simultaneous connections.
BEFORE


AFTER


What a difference!!.. The server in fact stopped responding after the first test and had to be hard rebooted. So how did I achieve it? By mostly copying the ideas from Ewan :). The final configuration for serving the web pages looks like this on the server end
Varnish (listens on TCP 80) –> Apache (listens on TCP 8080)
NOTE : All the configuration guides (as with the previous entries of the posts in this series) are specific to Ubuntu.
and you are ready to rock and roll.
There are some issues with this setup in terms of logging. Unlike your typical web server logs, where every request is logged, I noticed that not all the requests were being logged. I guess, that is because varnish is serving the content from cache. I have to figure out how to get that working. But that is for another post :).