The Hunt for a 20 Year Old Video [6 Years Ago…]

Editors note: I wrote this back on 7 February 2015

The 1995-1996 school year I was a freshman at Sweet Home High School[a] and had participated in a trip to Walt Disney World to participate in a Band Performance with my peers (Disney Magic Music Days). This entire event, from the loading of the busses to the trip from Buffalo, New York to our destination and back had been recorded on an 8-hour EP video tape.

I had originally possessed this specific video tape as a teenager. Over the course of time, however, I had lost this amazing heirloom as I’m sure a lot of other have. I’m sure that there is a copy of this somewhere that I can acquire so I can digitize it and be able to enjoy it though the future times.

This iswas my tiny blog on my progress in locating this by working back 20 years in my brain.

Read More

Overwhelming Compassion

In my randomness of youtube videos that play in the background while I mindlessly work I found one that seemed harmless. Little did I know this would be another one of those difficult videos.

https://youtu.be/cwYKD8nCWjo

The first video is about Daniel Villegas who was incarcerated for 25 years, which started from a false confession at 16 years of age.

The second one turned me into tears. It was about the sentencing of Trey Alexander Relford who pled guilty to robbing and murdering Salahuddin Jitmoud, a 22 year old Pizza Delivery Driver. The father, Abdul-Munim, was able to make a statement before sentencing, and that statement is something that every person wants to say but has more trouble finding the justification:

“Trey Alexander Relford. I feel so, so sad for you that you have to be in this situation. I wish I could help you as I helped my son to be a good citizen. If Salahuddin were to be here, if he alive he would forgive you. That’s the way he was, that’s the way he is. I’m not angry at you for being part of hurting my son. I’m angry at the Devil. I blame the Devil (the Devil) who misguided you and misleading you to do such a horrible crime. No I don’t blame you. I’m not angry at you at all. I want you to know that. I forgive you on behalf of Salahuddin and his mother.”

Then Mr. Relford made a statement apologizing, admiring what a father could do and not comprehending the pain of losing his own 4 year old daughter. He thanks him for his forgiveness, and they proceed to openly shake hands, then embrace.

The third one is about James Roeder and his wife Ashley. Ashley was pregnant during the robbery, and the judge placed a no contact order. While they were separate Ashley gave birth, and the Judge allowed, contrary to the no-contact order, a temporary exception for James to meet his son. He was sentences to 4 years, and Ashley got probation.

The fourth and final is about a Justice of the Peace and the marriage of Dean Berkenhoff and Monica Morrison. There was an objection at the end, and it was because of the need to want Colton Berkenhoff present. Colton was their 11 year old son who passed away suddenly in 2012, and his organs were donated. The ceremony revealed the heart recipient, where mom and dad got to hear Colton’s heart again. Simply an overwhelmingly emotional event.

And there is where some of my tears went.

#allthefeels

y2k to 2003

My early 20’s are a bit of a mystery, but an interesting story nonetheless. It is also one of the most difficult points of my life since many events happened with family and friends, and there is little documentation present to support it. Most of these paragraphs will be to-wit, and I will do my best to stitch together things.

Read More

apache process tuning

A long, long time ago I had an opportunity to fine-tune apache processes on a couple hundred hosts. It took one script run on some of the highly-loaded hosts to get specific numbers, and those numbers are what are important.

For shell processing you’ll need bc.

Running the below program on my current host presents the following output:

sudo ./apache_process_tuning.pl
1035:11956224 1036:19152896 1037:16871424 1038:32567296 1039:11386880 1040:13230080 1041:15876096 1042:20291584 2131:14344192 2132:14438400 2133:13373440 10578:15732736 29812:2068480
==========
There are 13 Apache Processes that consume 201,289,728 bytes of RAM
Each process takes an average of 15,483,825 bytes of RAM

You have 2,103,779,328 bytes of RAM, with 1,756,119,040 unused if Apache were not running

You can be ok with a MAX_CLIENTS setting lower than 113

To the gods of perl, I present thee!

#!/usr/bin/perl
use strict;
use warnings
# http://www.perlmonks.org/?node_id=110137
sub commify {
   my $text = reverse $_[0];
   $text =~ s/(\d\d\d)(?=\d)(?!\d*\.)/$1,/g;
   return scalar reverse $text
}
# step 0, make sure we are sudo
die("Need to sudo this command") if ( not defined $ENV{'SUDO_USER'} );
# Step 1, get system memory information
my $free = `/usr/bin/free -mb`;
my ($mem_total, $mem_used, $mem_free);
for (split /^/, $free) {
   if ($_ =~ /Mem:\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/) {
      $mem_total = $1;
      $mem_used = $2;
      $mem_free = $3;
   }
}
die("Cannot get memory statistics") if (not defined $mem_total);
# Step 2, get httpd process
my $processes = `/bin/ps aux`;
my ($process_count, $process_total, $process_mem);
for (split /^/, $processes) {
   if ($_ =~ /(\w+)\s+(\d+)\s+[\d\.]+\s+[\d\.]+\s+\d+\s+\d+\s+[\w\?\/]+\s+[\w\+<]+\s+[\d\w:]+\s+[\d:]+\s+(.+)/) {
      my $proc_owner = $1;
      my $proc_pid = $2;
      my $proc_cmd = $3;
      if ($proc_cmd =~ /httpd$/) {
         # Step 2a, Get some Private_Dirty
         # http://stackoverflow.com/questions/118307/a-way-to-determine-a-processs-real-memory-usage-i-e-private-dirty-rss
         $process_mem = `awk '/Private_Dirty/ {print \$2,\$3}' /proc/${proc_pid}/smaps | sed 's/ tB/*1024 gB/;s/ gB/*1024 mB/;s/ mB/*1024 kB/;s/ kB/*1024/;1!s/^/+/;' | tr -d '\\n' | sed 's/\$/\\n/' | bc`;
         chomp($process_mem);
         $process_count++;
         $process_total+=$process_mem;
         print $proc_pid . ":" . $process_mem . " ";
      }
   }
}
die("Having a problem getting active httpd info") if (not defined $process_count);
# step 3, give some helpful output
my ($process_average, $unused_mem, $max_clients);
print "\n==========\n";
$process_average = sprintf("%d", $process_total / $process_count);
print "There are " . $process_count . " Apache Processes that consume " . commify($process_total) . " bytes of RAM\n";
print "Each process takes an average of " . commify($process_average) . " bytes of RAM\n";
print "\n";
$unused_mem = sprintf("%d", $mem_used - $process_total);
print "You have " . commify($mem_total) . " bytes of RAM, with " . commify($unused_mem) . " unused if Apache were not running\n";
print "\n";
# Math is: "available" RAM with no httpd divided by average process total
$max_clients = sprintf("%d", $unused_mem / $process_average);
print "You can be ok with a MAX_CLIENTS setting lower than " . $max_clients . "\n";
print "\n";