From: Timo Sirainen Date: Mon, 16 May 2022 09:04:10 +0000 (+0200) Subject: util: dovecot-sysreport - Add timestamps before/after "ps" output X-Git-Tag: 2.3.20~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7accb09647c113f07a1f08e7fdf3dd3dbad8122b;p=thirdparty%2Fdovecot%2Fcore.git util: dovecot-sysreport - Add timestamps before/after "ps" output Sometimes running "ps" can take a while, so make it clear in the output if this has happened. --- diff --git a/src/util/dovecot-sysreport b/src/util/dovecot-sysreport index 23defa09c1..59afcb9264 100755 --- a/src/util/dovecot-sysreport +++ b/src/util/dovecot-sysreport @@ -177,7 +177,9 @@ unwrap_and_hide_pass $SRTEMP/conf/dovecot.conf echo "Gathering system informations ..." doveadm $conf_flag log errors > $SRTEMP/log_errors || : -ps auxwww | grep '[d]ovecot' > $SRTEMP/ps_output +(printf "# Start: "; date) >$SRTEMP/ps_output +ps auxwww | grep '[d]ovecot' >> $SRTEMP/ps_output +(printf "# End: "; date) >>$SRTEMP/ps_output doveadm $conf_flag service status > $SRTEMP/service_status || : doveadm $conf_flag process status > $SRTEMP/process_status || : uptime > $SRTEMP/uptime_output @@ -186,7 +188,9 @@ sleep 3 echo -e "\n\n###################### AFTER 3 SECONDS ######################\n\n" | \ tee -a $SRTEMP/ps_output $SRTEMP/service_status $SRTEMP/process_status \ $SRTEMP/uptime_output $SRTEMP/stats_dump > /dev/null +(printf "# Start: "; date) >>$SRTEMP/ps_output ps auxwww | grep '[d]ovecot' >> $SRTEMP/ps_output +(printf "# End: "; date) >>$SRTEMP/ps_output doveadm $conf_flag service status >> $SRTEMP/service_status || : doveadm $conf_flag process status >> $SRTEMP/process_status || : uptime >> $SRTEMP/uptime_output