loolstat | 90 --------------------------------------------------------------- 1 file changed, 90 deletions(-)
New commits: commit e157439b4e0669590a89ab09b27740fc9ea9550d Author: Andras Timar <andras.ti...@collabora.com> AuthorDate: Sun Apr 26 23:15:32 2020 +0200 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Sun Apr 26 23:30:16 2020 +0200 This loolstat tool is obsolete (and it does not work) Change-Id: I2f3d41e416321a31be139d0acac3997795a6614e Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92954 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loolstat b/loolstat deleted file mode 100755 index d86e73fa1..000000000 --- a/loolstat +++ /dev/null @@ -1,90 +0,0 @@ -#!/bin/bash - -# utilities -TR='tr' -WC='wc' -PS='ps' -SED='sed' -TOP='top' -GREP='grep' -PSTREE='pstree' - -# print error message -log_failure_msg () { - if [ -n "${1:-}" ]; then - /bin/echo "$@" || true - fi -} - -# checking ... print lines matching a pattern utility -if ! echo a | $GREP -E '(a|b)' >/dev/null 2>&1; then - log_failure_msg "$0: error: $GREP utility not found." -fi - -# checking ... word count utility -if ! $WC --version >/dev/null 2>&1; then - log_failure_msg "$0: error: $WC utility not found." -fi - -# checking ... stream editor utility -if ! $SED --version >/dev/null 2>&1; then - log_failure_msg "$0: error: $SED utility not found." -fi - -# checking ... delete characters utility -if ! $TR --version >/dev/null 2>&1; then - log_failure_msg "$0: error: $TR utility not found." -fi - -# checking ... display a tree of processes utility -if ! $PSTREE --version >/dev/null 2>&1; then - log_failure_msg "$0: error: $PSTREE utility not found." -fi - -# checking ... report a snapshot of the current processes utility. -if ! $PS --version >/dev/null 2>&1; then - log_failure_msg "$0: error: $PS utility not found." -fi - -# checking ... display Linux processes utility. -if ! $TOP -v >/dev/null 2>&1; then - log_failure_msg "$0: error: $TOP utility not found." -fi - -# get the loolwsd process id. -LOOLWSD_PID=`pgrep loolwsd$`; - -# checking if loolwsd is running. -if ! $PS -p $LOOLWSD_PID > /dev/null; then - log_failure_msg "$0: error: loolwsd is not running." - exit 1; -fi - -# display a tree of processes. -$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 -E '^loolwsd|^loolforkit|^loolkit' | $WC -l); - -# get the number of running threads. -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 prison socket. -LOOLWSD_PRISONER=$($PSTREE -a -h -A -p $LOOLWSD_PID | $GREP -o '{prison_socket}' | $WC -l); - -# get the number of processes swapped out. -SWAPPEDOUT=$($PSTREE -a -h -A -p $LOOLWSD_PID | $GREP -o '(.*)' | $WC -l); - -# display report stats -printf "\n %-10s\n" "LOOLWSD STATS"; -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 Prison threads:" "$LOOLWSD_PRISONER"; -$TOP -bn 1 | $GREP -E 'loolwsd|COMMAND' - _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits