{"id":30,"date":"2011-09-11T23:25:21","date_gmt":"2011-09-11T23:25:21","guid":{"rendered":"http:\/\/41j.com\/blog\/?p=30"},"modified":"2011-09-28T16:03:17","modified_gmt":"2011-09-28T16:03:17","slug":"september-11-pager-message-analysis","status":"publish","type":"post","link":"https:\/\/41j.com\/blog\/2011\/09\/september-11-pager-message-analysis\/","title":{"rendered":"September 11 Pager Message Analysis"},"content":{"rendered":"<p>I wanted to do some basic analysis on the September 11 Pager Message dump from wikileaks. The data is about 2 years old now, and I&#8217;m sure it&#8217;s already been analysed to death but I wanted to have a play anyway.<\/p>\n<p>First I binned the messages in to 5min chunks and looks for occurrences of the word &#8220;plane&#8221;. You can see the results in the graph below:<\/p>\n<p><a href=\"http:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/09\/plane.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/09\/plane-1024x358.png\" alt=\"\" title=\"plane\" width=\"630\" height=\"220\" class=\"aligncenter size-large wp-image-38\" srcset=\"https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/09\/plane-1024x358.png 1024w, https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/09\/plane-300x105.png 300w, https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/09\/plane-500x175.png 500w, https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/09\/plane.png 1500w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/a><\/p>\n<p>There&#8217;s an unexpected blip at around 7am, this is due to messages about a US spy drone which was shot down over Iraq before the WTC planes hit.<\/p>\n<p>A lot of people initially thought it was a bomb, here are the occurrences of &#8220;bomb&#8221; in text messages:<\/p>\n<p><a href=\"http:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/09\/bomb.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/09\/bomb-1024x358.png\" alt=\"\" title=\"bomb\" width=\"630\" height=\"220\" class=\"aligncenter size-large wp-image-39\" srcset=\"https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/09\/bomb-1024x358.png 1024w, https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/09\/bomb-300x105.png 300w, https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/09\/bomb-500x175.png 500w, https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/09\/bomb.png 1500w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/a><\/p>\n<p>The peak at 3pm seems to represent reports of a &#8220;Car bomb explodes outside State Department, senior law enforceement officials say&#8221; mostly from yahoo news alerts.<\/p>\n<p>Next I wanted to look for server issues so I search for any message containing: offline, timeout, error (but not terror) or &#8220;not responding&#8221;:<\/p>\n<p><a href=\"http:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/09\/serverproblems.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/09\/serverproblems-1024x358.png\" alt=\"\" title=\"serverproblems\" width=\"630\" height=\"220\" class=\"aligncenter size-large wp-image-44\" srcset=\"https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/09\/serverproblems-1024x358.png 1024w, https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/09\/serverproblems-300x105.png 300w, https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/09\/serverproblems-500x175.png 500w, https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/09\/serverproblems.png 1500w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/a><\/p>\n<p>Not sure what the peak at 5am is, there are a lot of: &#8221; adhocdb TEXT: adhocdb unix: WARNING: vxvm:vxio: Subdisk disk02-01 block 240384: Uncorrectable write error&#8221; and &#8220;fusasitescope@wingspan.com||elgweb8 login content match error on step 2&#8221;. It appears to be mostly the later. But you can certainly see the rate of errors pick up from about 8:00 onward. To know how much of this was due to the attacks I&#8217;d need more of a baseline. Some of the more interesting ones:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n2001-09-11 09:05:20 Arch &#x5B;0912377] C  ALPHA  8628**Customer reported outage* Internet is unavailable. Impact:User unable to connect to internet.  Multiple users state either extremely slow connection or connection timed out error. Occurred:08:55\r\n2001-09-11 09:05:31 Skytel &#x5B;003920778] C  ALPHA  SEV1 DesMoines as PICS  H0864464 SLI=Y ETA=Na 7:44  I:Pics is down, unable to access orders - error 202 no records found.  E:PICS Helpdesk  Janie ATCHelpdesk 512-248-4967-ATC Helpdesk\r\n2001-09-11 09:15:46 Skytel &#x5B;007607560] C  ALPHA  liacm@us.ibm.com||NSSW3\/General Tire\/T3149925\/1-888-212-5447\/Continental GT users in Charlotte are unable to connect to IBM IIN. NSCOMSOFT seeing errors. Please call ADVNETO.\r\n<\/pre>\n<h2>Notes<\/h2>\n<p>I downloaded the wikileaks 911 pager torrent from: http:\/\/file.wikileaks.org\/torrent\/9-11_all_messages.7z.torrent.\u00a0The pager messages are broken down by minute but for my analysis I wanted them all in a single file. So I started by concatenating them all.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ncat 2001* &gt; all_messages\r\n<\/pre>\n<p>The file contains lines that look like:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n2001-09-11 03:00:00 Metrocall &#x5B;1060278] B ALPHA 09\/12@03:03:50 BETA13:Service (Oracle Web Lsnr 4.0(admin -DEFAULT_HOME,Intranet)) is not responding. Stopped. 1\r\n2001-09-11 03:00:00 Metrocall &#x5B;1421210] C ALPHA LAKEJob exceeded 4 hours on Lake\r\n2001-09-11 03:00:00 Metrocall &#x5B;1421210] C ALPHA LAKEJob 378304\/VSIOWNER\/OMSJRNMGR has MSGW status.\r\n2001-09-11 03:00:00 Metrocall &#x5B;0007690] C ALPHA THIS IS A TEST PERIODIC PAGE SEQUENTIAL NUMBER 4719\r\n2001-09-11 03:00:01 Arch &#x5B;0485957] B ALPHA (24)WhatsUp@mail.spr|10.134.192.34 VARESAAPP03 is UP at 01:59:12\r\n2001-09-11 03:00:01 Arch &#x5B;0987275] C ALPHA s0191: 09\/11 12:28:34 Reboot NT machine gblnetnt05 in cabinet 311R at 13\/1CMP:CRITICAL:Sep 11 12:28:34\r\n2001-09-11 03:00:01 Arch &#x5B;1425048] C ALPHA 300~MPfetchData:openConnectionToManager:ERROR CONNECTING:192.168.35.97 : www36 connectToServerPort:socket\/socket timed out at \/home\/crdtdrv\/creditderivatives\/script\/MPfetchData.pl line 342, &lt;SOCK_192.168.35.19&gt; chunk 193021.\r\n<\/pre>\n<p>I then wrote some C++ code to analyse the data, here&#8217;s the &#8220;bomb&#8221; count in 5min bins across the time period:<\/p>\n<p>stringify.h header:<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\n#include &lt;sstream&gt;\r\n#include &lt;iostream&gt;\r\n#include &lt;string&gt;\r\n#include &lt;stdexcept&gt;\r\n\r\n#ifndef STRINGIFY_H\r\n#define STRINGIFY_H\r\n\r\nclass BadConversion : public std::runtime_error {\r\npublic:\r\n BadConversion(const std::string&amp;amp;amp;amp;amp;amp; s)\r\n      : std::runtime_error(s) {}\r\n};\r\n\r\ntemplate&lt;class _type&gt;\r\ninline std::string stringify(_type x)\r\n{\r\n  std::ostringstream o;\r\n  if (!(o &lt;&lt; std::fixed &lt;&lt; x))\r\n    throw BadConversion(&quot;stringify()&quot;);\r\n  return o.str();\r\n}\r\n\r\ntemplate&lt;class _type&gt;\r\ninline _type convertTo(const std::string&amp;amp;amp;amp;amp;amp; s)\r\n{\r\n  std::istringstream i(s);\r\n  _type x;\r\n  if (!(i &gt;&gt; x))\r\n    throw BadConversion(&quot;convertTo(\\&quot;&quot; + s + &quot;\\&quot;)&quot;);\r\n  return x;\r\n}\r\n\r\n#endif\r\n\r\n<\/pre>\n<p>Analysis code:<\/p>\n<p>#include <fstream><br \/>\n#include <iostream><br \/>\n#include <sstream><br \/>\n#include <vector><br \/>\n#include &#8220;stringify.h&#8221;<br \/>\n#include <algorithm><br \/>\n#include <string><\/p>\n<p>using namespace std;<\/p>\n<p>\/\/ Example line: 2001-09-11 03:00:00 Metrocall [1060278] B  ALPHA  09\/12@03:03:50 BETA13:Service (Oracle Web Lsnr 4.0(admin -DEFAULT_HOME,Intranet)) is not responding. Stopped. 1<\/p>\n<p>int time_to_int(string date,string time) {<\/p>\n<p>  int seconds_per_day  = 86400;<br \/>\n  int seconds_per_hour = 3600;<br \/>\n  int seconds_per_min  = 60;<\/p>\n<p>  int day   = convertTo<int>(date.substr(8,2));<br \/>\n  int hour  = convertTo<int>(time.substr(0,2));<br \/>\n  int min   = convertTo<int>(time.substr(3,2));<br \/>\n  int sec   = convertTo<int>(time.substr(6,2));<\/p>\n<p>  int itime = 0;<br \/>\n  if(day == 12) itime += seconds_per_day;<br \/>\n  itime += hour * seconds_per_hour;<br \/>\n  itime += min  * seconds_per_min;<br \/>\n  itime += sec;<\/p>\n<p>  return itime;<br \/>\n}<\/p>\n<p>int main() {<\/p>\n<p>  vector<vector<string> > message_bins;<\/p>\n<p>  int bin_size = 5; \/\/ mins<\/p>\n<p>  ifstream data_file(&#8220;all_messages&#8221;);<\/p>\n<p>  int start_time;<br \/>\n  int next_time;<\/p>\n<p>  bool first=true;<br \/>\n  vector<string> current_bin;<br \/>\n  for(;!data_file.eof();) {<br \/>\n    char in_line[10000];<br \/>\n    data_file.getline(in_line,10000);<\/p>\n<p>    if(data_file.eof()) break;<\/p>\n<p>    string line(in_line);<\/p>\n<p>    istringstream ss(line);<\/p>\n<p>    string date;<br \/>\n    string time;<br \/>\n    ss >> date;<br \/>\n    ss >> time;<\/p>\n<p>    int i_time = time_to_int(date,time);<\/p>\n<p>    if(first) { start_time = i_time; next_time = start_time + 60*bin_size; first=false;}<\/p>\n<p>    if(i_time >= next_time) {<br \/>\n      message_bins.push_back(current_bin);<br \/>\n      current_bin.clear();<br \/>\n      next_time += 60*bin_size;<br \/>\n    }<\/p>\n<p>    std::transform(line.begin(), line.end(), line.begin(), ::tolower);<br \/>\n    current_bin.push_back(line);<br \/>\n  }<\/p>\n<p>  for(size_t n=0;n<message_bins.size();n++) {\n\n    int count = 0;\n    for(size_t i=0;i<message_bins[n].size();i++) {\n      size_t p = message_bins[n][i].find(\"bomb\");\n      if(p!=string::npos) count++;\n    }\n    cout << message_bins[n][0].substr(0,10);\n    cout << \":\";\n    cout << message_bins[n][0].substr(11,8);\n    cout << \" \" << n << \" \" << count << endl;\n\n  }\n}\n[\/sourcecode]\n\nThe analysis program outputs lines which look like:\n\n[sourcecode language=\"bash\"]\n2001-09-11:03:00:00 0 0\n2001-09-11:03:05:00 1 0\n2001-09-11:03:10:00 2 0\n2001-09-11:03:15:01 3 0\n2001-09-11:03:20:00 4 0\n2001-09-11:03:25:00 5 0\n[\/sourcecode]\n\nThe following gnuplot code plots the data:\n\n[sourcecode language=\"cpp\"]\nset size 2,1\n\nset ylabel \"Count\"\nset xlabel \"Time\"\n\nset xtics nomirror rotate by -45 scale 0\n\nset xdata time\nset timefmt \"%Y-%m-%d:%H:%M:%S\"\n#set format x \"%Y-%m-%d:%H:%M:%S\"\n\nset xtics 3600\n\nset terminal postscript eps color\nset output \"res.eps\"\nplot \"res\" using 1:3 with lines title \"Bomb\"\n[\/sourcecode]\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I wanted to do some basic analysis on the September 11 Pager Message dump from wikileaks. The data is about 2 years old now, and I&#8217;m sure it&#8217;s already been analysed to death but I wanted to have a play anyway. First I binned the messages in to 5min chunks and looks for occurrences of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[3,4],"class_list":["post-30","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-11-sept","tag-september-11"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1RRoU-u","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts\/30","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/comments?post=30"}],"version-history":[{"count":16,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts\/30\/revisions"}],"predecessor-version":[{"id":210,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts\/30\/revisions\/210"}],"wp:attachment":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/media?parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/categories?post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/tags?post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}