loolwsd/loolstat | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)
New commits: commit 41355096dc4b36aecfe9ef63fe96007f66c6682a Author: Henry Castro <hcas...@collabora.com> Date: Sat Aug 8 08:09:22 2015 -0400 loolwsd: update loolstat, socket client and ... prisioner diff --git a/loolwsd/loolstat b/loolwsd/loolstat index 09e937b..57d2ba0 100755 --- a/loolwsd/loolstat +++ b/loolwsd/loolstat @@ -50,7 +50,7 @@ if ! $PS --version >/dev/null 2>&1; then fi # checking ... display Linux processes utility. -if ! $TOP --v >/dev/null 2>&1; then +if ! $TOP -v >/dev/null 2>&1; then log_failure_msg "$0: error: $TOP utility not found." fi @@ -73,13 +73,19 @@ fi $PSTREE -a -c -h -A -p $LOOLWSD_PID; # get the number of running processes. -PROCESS=$($PSTREE -a -h -A -p $LOOLWSD_PID | $SED -e "s/\`//g" | $TR -d ' |-' | $GREP -o '^loolwsd,' | $WC -l); +PROCESS=$($PSTREE -a -h -A -p $LOOLWSD_PID | $SED -e "s/\`//g" | $TR -d ' |-' | $GREP -E '^loolwsd|^loolbroker|^libreofficekit' | $WC -l); # get the number of running threads. -THREADS=$($PSTREE -a -h -A -p $LOOLWSD_PID | $SED -e "s/\`//g" | $TR -d ' |-' | $GREP -o '{loolwsd}' | $WC -l); +THREADS=$($PSTREE -a -h -A -p $LOOLWSD_PID | $GREP -o '{.*}' | $WC -l); + +# get the number of running client socket. +LOOLWSD_CLIENT=$($PSTREE -a -h -A -p $LOOLWSD_PID | $GREP -o '{client_socket}' | $WC -l); + +# get the number of running prision socket. +LOOLWSD_PRISIONER=$($PSTREE -a -h -A -p $LOOLWSD_PID | $GREP -o '{prision_socket}' | $WC -l); # get the number of processes swapped out. -SWAPPEDOUT=$($PSTREE -a -h -A -p $LOOLWSD_PID | $SED -e "s/\`//g" | $TR -d ' |-' | $GREP -o '(loolwsd,' | $WC -l); +SWAPPEDOUT=$($PSTREE -a -h -A -p $LOOLWSD_PID | $GREP -o '(.*)' | $WC -l); # display report stats printf "\n %-10s\n" "LOOLWSD STATS"; @@ -87,5 +93,7 @@ printf "==========================\n"; printf " %-10s %d\n" "Running process:" "$PROCESS"; printf " %-10s %d\n" "Running threads:" "$THREADS"; printf " %-10s %d\n" "Process swapped out:" "$SWAPPEDOUT"; +printf " %-10s %d\n" "Socket Client threads:" "$LOOLWSD_CLIENT"; +printf " %-10s %d\n" "Socket Prision threads:" "$LOOLWSD_PRISIONER"; $TOP -bn 1 | $GREP -E 'loolwsd|COMMAND' _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits