crash-reporter: Don't send ps command lines with crash reporter
When unable to generate a crash, don't show the commands' arguments with
'ps' because they may contain PII.
Change-Id: I1e2f40e59535f4de08f43012727ab8e92bad8a0d
BUG=chromium-os:13206
TEST=unit tests, logging_UserCrash autotest
Review URL: http://codereview.chromium.org/6722017
diff --git a/crash_reporter/crash_reporter_logs.conf b/crash_reporter/crash_reporter_logs.conf
index 1921983..62c6216 100644
--- a/crash_reporter/crash_reporter_logs.conf
+++ b/crash_reporter/crash_reporter_logs.conf
@@ -19,8 +19,10 @@
# 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
+# as it is stored in memory. The output format specified for 'ps' is the
+# same as with the "u" ("user-oriented") option, except it doesn't show
+# the commands' arguments (i.e. "comm" instead of "command").
+crash_reporter-user-collection:echo "===ps output==="; ps axw -o user,pid,%cpu,%mem,vsz,rss,tname,stat,start_time,bsdtime,comm | 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