crash-reporter: Add diagnostics to help diagnose failures in the wild

We add logging messages that are generated during invocation of core2md, but we also enable sending arbitrary system info based on the configuration file.  In this case we add the list of running processes, meminfo, and dmesg.

Change-Id: Ifdf29b89dd60d56349fa39095d2aa07f6b5e2de2

BUG=chromium-os:6299,chromium-os:9345
TEST=UserCrash, unit tests

Review URL: http://codereview.chromium.org/6297004
diff --git a/crash_reporter/crash_reporter_logs.conf b/crash_reporter/crash_reporter_logs.conf
index 172b9c3..1921983 100644
--- a/crash_reporter/crash_reporter_logs.conf
+++ b/crash_reporter/crash_reporter_logs.conf
@@ -17,6 +17,11 @@
 #
 update_engine:cat $(ls -1tr /var/log/update_engine | tail -5 | sed s.^./var/log/update_engine/.) | tail -c 50000
 
+# The following rule is used for generating additional diagnostics when
+# collection of user crashes fails.  This output should not be too large
+# as it is stored in memory.
+crash_reporter-user-collection:echo "===ps output==="; ps auxw | tail -c 25000; echo "===dmesg output==="; dmesg | tail -c 25000; echo "===meminfo==="; cat /proc/meminfo
+
 # The following rules are only for testing purposes.
 crash_log_test:echo hello world
 crash_log_recursion_test:sleep 1 && /usr/local/autotest/tests/crash_log_recursion_test