Script to stop and start lcache on Linux and Solaris

  • 3115818
  • 10-Apr-2007
  • 26-Apr-2012

Environment


Novell Audit 1.0.3
Novell Audit 2.0.0
Novell Audit 2.0.1
Novell Audit 2.0.2

Situation

Need a way to stop and start lcache on Linux and Solaris.
Lcache script to stop and start the lcache process on Linux and Solaris.
Is there a way to automate the stopping and starting of lcache on Linux or Solaris?

Resolution

The lcache.so module starts automatically by logevent.so. However, there are instances where there is a long delay in starting the lcache.so module. This delay can cause slowness issues on your Linux and Unix servers. Below are some sample scripts that can be used to start lcache.so prior to being started by logevent.so. Additionally, it is alright for lcache to run on its own as there may be several applications (eDir, SecretStore, DirXML/IDM, NMAS, PMF, iManager, etc.,) that rely upon lcache's presence in case the Secure Logging Server (SLS) is down. So it is not necessary for lcache to stop if the underlying applications are not running.

The following scripts are provided "As Is". Novell does not make any claims to their suitability or useability for the Novell Audit product. They are provided as a convenience for Novell Audit customers. The scripts may need to be tweaked for your Novell Audit installation. Novell assumes that you know scripting and recommends that you review the following scripts prior to installation and implementation of the scripts in your production environment. This script is not necessary in most normal Novell Audit implementations. Only if there are delays during a server startup may be cause for this script to be necessary. The actual scripts will be provided in the"Additional Notes" section of this TID.

STEPS TO TAKE TO CREATE LCACHE SCRIPT:

1.) Copy the appropriate script for your OS (Linux or Solaris) from below.
2.) Login or su/sudo as root.
3.) Go to the /etc/init.d/ directory and create a file called novell-lcache .
4.) Copy the contents of the script below into the novell-lcache file. Save the file.
5.) Change the file settings so the script is executable (chmod 755 novell-lcache).
6.) If you want this script to execute during startup and shutdown, then you will need to give it a start and kill number. If the script is being installed on an IDM server, you may want to run the script prior to IDM starting on your server. Additionally, you will want to stop lcache after IDM has shut down.

Additional Information

Novell Audit lcache script for Linux
=========================================
#! /bin/sh
# Copyright (c) 1995-2005 Novell, Inc.
# All rights reserved.
#
# novell-lcache: Starts the Novell Nsure Audit local cache engine
#
# Version 1.0.2
#
#
### BEGIN INIT INFO
# Provides: lcache
# Required-Start: $syslog $remote_fs $network
# Required-Stop:
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: Nsure Audit lcache
# Description: Nsure Audit local cache daemon
### END INIT INFO

# See how we were called
case "$1" in
start)
echo -n "Starting lcache "
echo
/opt/novell/naudit/lcache>>/dev/null&
echo
exit 0
;;

stop)
echo -n "Shutting down lcache "
killall -15 -e -w lcache

echo
exit 0
;;
restart)
## Stop the service and regardless of whether it was
## running or not, start it again.
/etc/init.d/novell-lcache stop > /dev/null
/etc/init.d/novell-lcache start $2
exit $?
;;
startverbose)
echo -n "Starting lcache "
echo
/opt/novell/naudit/lcache&
echo
exit 0
;;
*)
echo "Usage: $0 {start|stop|restart|startverbose}"
exit 2
;;
esac
exit 1

=========================================


Novell Audit lcache script for Solaris
=========================================
#! /bin/sh
# Copyright (c) 1995-2005 Novell, Inc.
# All rights reserved.
#
# novell-lcache: Starts the Novell Nsure Audit local cache engine
#
# Version 1.0.2
#
#


# See how we were called
case "$1" in
start)
echo -n "Starting lcache "
echo
/opt/NOVLnaudit/lcache>>/dev/null&
echo
exit 0
;;

stop)
echo -n "Shutting down lcache "
pkill -15 lcache

echo
exit 0
;;
restart)
## Stop the service and regardless of whether it was
## running or not, start it again.
/etc/init.d/novell-lcache stop > /dev/null
/etc/init.d/novell-lcache start $2
exit $?
;;
startverbose)
echo -n "Starting lcache "
echo
/opt/NOVLnaudit/lcache &
echo
exit 0
;;
*)
echo "Usage: $0 {start|stop|restart|startverbose}"
exit 2
;;
esac
exit 1

=========================================

Feedback service temporarily unavailable. For content questions or problems, please contact Support.