LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices



Old

SELinux and Apache ProxyPass

Posted 12-07-2011 at 01:39 PM by sag47
Updated 08-05-2012 at 01:58 AM by sag47

Today I was having trouble getting a httpd ProxyPass and ProxyPassReverse to work. As a background I'm working in RedHat Enterprise Linux 6.1. It took me a while to figure out what was wrong (longer than it should have) and as it turns out it worked after I disabled SELinux. So my configs were correct in /etc/httpd/conf.d/* and it passed all config tests. I'm sure you don't want to read a whole post of talking so I'll just get right into the grit of the commands. For the rest of the explanation...
Senior Member
Views 2701 Comments 0 sag47 is offline
Old

Stress testing a new hard drive...

Posted 11-20-2011 at 11:38 PM by sag47
Updated 11-20-2011 at 11:40 PM by sag47
Tags hardware

You should always stress test a new harddrive when you buy it.

Some people say, "Just hook it up for a few months and keep unimportant data on it. If it breaks in that 1-3 month time then it will be good for 3 or 4 years."

While that metric is okay at best I prefer to take a more systematic approach to it. I want to fill the whole hard drive with random 1 and 0 over a constant and long period of time. I do that because you are stressing the hard drive out...
Senior Member
Posted in Uncategorized
Views 7446 Comments 0 sag47 is offline
Old

Limiting and blocking connections dynamically.

Posted 10-31-2011 at 04:46 PM by sag47
Updated 01-29-2014 at 12:14 PM by sag47

Today I feel like talking about limiting connections which get made to a server. There are a few ways to do it; some cooler than others. I'd like to feature some open source software while I'm at it.

Today I happened upon this thread which hilariously got closed for good reason. Once you wade through all the crap you'll see some pretty cool posts which explain how to limit incoming connections within a certain time period and other suggestions. I'll point out the most useful related...
Senior Member
Posted in Uncategorized
Views 795 Comments 0 sag47 is offline
Old

Server latency

Posted 10-27-2011 at 09:26 AM by sag47

I wanted a quick and dirty way to determine server latency on my Kubuntu machine. This just parses simple output from ping and provides only the time values.

Code:
for x in drexel.edu google.com;do echo -n "[$x]: "; ping -c 1 $x | head -n 2 | tail -n 1 | awk '{split($8,arr,"=")} END{print arr[2],$9}';done
Output
Code:
[drexel.edu]: 0.576 ms
[google.com]: 6.23 ms
You can put as many servers or IPs as you want in the for loop to get a comparison....
Senior Member
Posted in Uncategorized
Views 520 Comments 0 sag47 is offline
Old

Network usage on a single device and log diving

Posted 09-27-2011 at 03:57 PM by sag47
Updated 09-29-2011 at 09:30 AM by sag47
Tags networking

I wanted to know the received network usage on a device in kB so this one liner was produced for the desired result.
Code:
while true; do y=`ifconfig eth0 | grep RX\ bytes| sed -e 's/.*bytes\://' -e 's/\ .*//'`; sleep 1; x=`ifconfig eth0 | grep RX\ bytes| sed -e 's/.*bytes\://' -e 's/\ .*//'`; echo $(((x-y)/1024)); done
Press Ctrl+C to stop analyzing the network traffic on that device.

Here's another one liner of me looking through multiple log locations.
...
Senior Member
Posted in Uncategorized
Views 597 Comments 0 sag47 is offline

  



All times are GMT -5. The time now is 12:45 PM.

Main Menu
Advertisement

Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration