Skip to content

Commit

Permalink
Improved helper scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
oTTer-Chief committed Nov 4, 2016
1 parent d282991 commit b3905a6
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
6 changes: 2 additions & 4 deletions contrib/check_functions
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ function check_mem {
}

function check_is_not_running {
# ps caux | grep -v $$ | grep $1 > /dev/null
ps caux | grep $1 > /dev/null
ps caux | grep -v $$ | grep $1 > /dev/null
if [ $? -eq 0 ]; then
echo "ERROR: an instance of $1 is already running."
exit 1
Expand All @@ -27,8 +26,7 @@ function check_is_not_running {
}

function check_is_running {
# ps caux | grep -v $$ | grep $1 > /dev/null
ps caux | grep $1 > /dev/null
ps caux | grep -v $$ | grep $1 > /dev/null
if [ $? -eq 0 ]; then
echo -e "INFO: $1 is running."
else
Expand Down
23 changes: 23 additions & 0 deletions contrib/flesnet-check
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
# 2014, Dirk Hutter <hutter@compeng.uni-frankfurt.de>

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $DIR/check_functions

DEVICES=$(find_devices)
echo "FLIBs found in system:" $DEVICES

check_is_not_running flesnet
check_is_not_running tsclient
check_is_not_running mstool
check_is_not_running flib_server
check_is_not_running en_readout

#list_dma_buffers $DEVICES
check_dma_buffers $(list_dma_buffers $DEVICES)

check_shm "flesnet*"
check_shm "flib*"
check_shm "shm*"

# check if etcd is in proper state here

0 comments on commit b3905a6

Please sign in to comment.