summaryrefslogtreecommitdiff
path: root/testscripts
diff options
context:
space:
mode:
authorChristian Muck <christian.muck@bmw.de>2011-04-11 15:41:05 +0200
committerChristian Muck <christian.muck@bmw.de>2011-04-11 15:41:05 +0200
commit760fb8a4daba3e403376099ce38aca8f88d695d3 (patch)
tree36b6f428cee8ba0af0fd50b3e44a3d4da9083a44 /testscripts
parent5394c6fa5bf40d9bc8619026cbc4c306211a8499 (diff)
downloadDLT-daemon-760fb8a4daba3e403376099ce38aca8f88d695d3.tar.gz
Init of dlt daemon
Diffstat (limited to 'testscripts')
-rwxr-xr-xtestscripts/CMakeLists.txt40
-rwxr-xr-xtestscripts/dltdaemon64
-rwxr-xr-xtestscripts/dltinfo.sh24
3 files changed, 128 insertions, 0 deletions
diff --git a/testscripts/CMakeLists.txt b/testscripts/CMakeLists.txt
new file mode 100755
index 0000000..28e75f7
--- /dev/null
+++ b/testscripts/CMakeLists.txt
@@ -0,0 +1,40 @@
+#######
+# Dlt - Diagnostic Log and Trace
+# @licence make begin@
+ #
+ # Copyright (C) 2011, BMW AG - Alexander Wenzel <alexander.wenzel@bmw.de>
+ #
+ # This program is free software; you can redistribute it and/or modify it under the terms of the
+ # GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
+ # This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
+ # Public License, version 2.1, for more details.
+ #
+ # You should have received a copy of the GNU Lesser General Public License, version 2.1, along
+ # with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
+ #
+ # Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may
+ # also be applicable to programs even in cases in which the program is not a library in the technical sense.
+ #
+ # Linking DLT statically or dynamically with other modules is making a combined work based on DLT. You may
+ # license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to
+ # license your linked modules under the GNU Lesser General Public License, version 2.1, you
+ # may use the program under the following exception.
+ #
+ # As a special exception, the copyright holders of DLT give you permission to combine DLT
+ # with software programs or libraries that are released under any license unless such a combination is not
+ # permitted by the license of such a software program or library. You may copy and distribute such a
+ # system following the terms of the GNU Lesser General Public License, version 2.1, including this
+ # special exception, for DLT and the licenses of the other code concerned.
+ #
+ # Note that people who make modified versions of DLT are not obligated to grant this special exception
+ # for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License,
+ # version 2.1, gives permission to release a modified version without this exception; this exception
+ # also makes it possible to release a modified version which carries forward this exception.
+ #
+ # @licence end@
+########
+
+install(PROGRAMS dltdaemon dltinfo.sh
+ DESTINATION bin
+ COMPONENT base)
diff --git a/testscripts/dltdaemon b/testscripts/dltdaemon
new file mode 100755
index 0000000..baf3b8e
--- /dev/null
+++ b/testscripts/dltdaemon
@@ -0,0 +1,64 @@
+#!/bin/sh
+#
+# Starts the DLT Daemon
+#
+# chkconfig: 2345 21 87
+# description: Provides DLT Debug Logging & Trace functionality
+# processname: dlt-daemon
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+
+processname=dlt-daemon
+processpath=/usr/bin
+servicename=dlt-daemon
+
+
+[ -x $processpath ] || exit 0
+
+start() {
+ echo -n $"Starting $processname daemon: "
+ /usr/bin/dlt-daemon -d
+}
+
+stop() {
+ echo -n $"Stopping $processname daemon: "
+ killproc $servicename -TERM
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$servicename
+}
+
+RETVAL=0
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ start
+ ;;
+ condrestart)
+ if [ -f /var/lock/subsys/$servicename ]; then
+ stop
+ start
+ fi
+ ;;
+ reload)
+ restart
+ ;;
+ status)
+ status $processname
+ RETVAL=$?
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
+ ;;
+esac
+
+exit $RETVAL
diff --git a/testscripts/dltinfo.sh b/testscripts/dltinfo.sh
new file mode 100755
index 0000000..3e70ab5
--- /dev/null
+++ b/testscripts/dltinfo.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+clear
+processname="dlt-daemon"
+pidofdlt=`pidof $processname`
+
+if [ $pidofdlt ]
+ then
+ echo "DLT Deamon is running with PID:$pidofdlt"
+ else
+ echo "DLT Daemon is NOT running"
+fi
+
+if [ -f /var/log/messages ]
+ then
+echo "------- messages ----------------"
+cat /var/log/messages | grep -a DLT | tail
+fi
+
+if [ -f /var/log/syslog ]
+ then
+ echo "------- SYSLOG -------------------"
+ cat /var/log/syslog | grep -a DLT | tail
+fi
+