Friday, January 30, 2015

Magento Error

Tuesday, January 13, 2015

Chuck Lorre Productions #482

CHUCK LORRE PRODUCTIONS, #482

http://www.chucklorre.com/index-bbt.php?p=482

The things I have spent my life depending on are undependable. Because they are things. And things are, by their very nature, subject to change. This applies to people as well. People change. People leave. Inevitably we all leave. The world, therefore, is essentially an unstable, uncertain environment. That's why I choose to believe in, and depend on, an unchanging, eternal, omnipresent non-thing. I prefer not to call it God, because the very word tends to thing things up. So I try not to call it. I try to experience it. Easy to do looking out at the ocean. Hard to do looking up at the ocean. Easy to do when you look at a baby. Hard to do if the baby is next to you on a long plane flight. Easy to do when you look at a pretty girl. Hard to do if you were once married to her. Clearly what blocks me from transcendence is judgment. If I were able to suspend having an opinion on drowning, other peoples' baby's vomit, and alimony, if I could simply see these things as they are - actions devoid of meaning until I give them meaning - I could experience some semblance of union with the infinite sublime. I'd instantaneously transition from neurotic sitcom writer to one seriously badass guru dude. People would travel great distances to ask me for guidance with their personal problems. I'd wisely tell them "It is what it is." They'd judge this as being ridiculously inadequate advice and punch me. But I'd be okay with it because I'm, you know, exalted.

Monitor Incoming Connections (Php, Linux)

I posted this on Spiceworks....

Description

Monitor connections on machine.
this is set to monitor eth3, with destination of 192.168.0.100, just adjust the tcpdump settings to broaden the scope.

Source Code

#!/usr/local/bin/php
<?php
$file = 'source.ips.log';

$cmd = <<<EOF
sudo tcpdump -i eth3 -n -q -e "dst host 192.168.0.100"|awk -F, '{print $3}'|awk -F" " '{print $3 "." $5 "." $6}'|awk -F. '{print $1 "." $2 "." $3 "." $4 " " $5 ">" $10}'
EOF;

$cmd = trim($cmd);

$handle = popen("$cmd", 'r');
$foundIPs = array();
while(!feof($handle)) {
    $buffer = trim(fgets($handle));
    $data = explode(" ",$buffer);
    if(count($data)==2){
        // leave just text?
        $port = preg_replace("/[0-9 ]+/", "", $data[1]);
        if( empty($foundIPs[$data[0]][$data[1]]) ){
            $foundIPs[$data[0]][$port]=1;
            file_put_contents($file,"source port>{destination port}\n".var_export($foundIPs,true));
        } else {
            $foundIPs[$data[0]][$port]++;
        }
    }
    flush();
}
pclose($handle);
file_put_contents($file,"source port>{destination port}\n".var_export($foundIPs,true));

var_dump($foundIPs);

Monday, January 12, 2015

Get SMDR information from a Mitel 5000 CP

I posted this on spiceworks....

SMDR monitoring example can be found here.
Station Message Detail Recording (SMDR) captures detailed information about incoming and outgoing voice and data calls.
This is extremely simple and will still need to parse out the message.
Need to us Mitel DB Programming to ensure everything is setup properly.
Contact Mitel for the the "Features and Programming Guide" which provides details on the message format.
1.

Setup Mitel - DB Programming

In System/Maintenance/SMDR
Change SMDR Output to YES
make sure "SMDR Output Active" is YES
2.

SMDR Password - DB Programming

In System/Sockets
right click on SMDR and set password.
3.

Find Mitel 5000 IP

Check the IP!
===> System/IP Settings/Current Processor Module IP Address
4.

Check Port (Unsecured)

In System/IP Settings
Check "Listening Port (Unsecured)" is 4000
and
Check "Listening Port (Unsecured) Enabled" is YES
5.

Monitor your SMDR messages...

6.

Parse the message and save/log it somewhere?

Contact Mitel for the the "Features and Programming Guide" which provides details on the message format.
Or Google is your friend.

Conclusion

This will allow you to setup some simple analytics for calls, if you need a full blown call costing and such it will likely be cheaper to buy a solution!!


References