OpenText product name changes coming to the community soon! Learn more.

Wikis - Page

NDSD Process Monitor

0 Likes
NDSD Process Monitor is an automated tool to collect the NDSD process statistics like the number of connections on ports (389, 636, 524), Total Memory, Virtual Memory, Thread and CPU Usage by NDSD process on a Novell eDirectory Server. This is a Cross-Platform (Linux, AIX, SunOS) tool based on BASH Scripting.

Steps to run the tool.


  1. Just download the "NDSD_PROCESS_Monitor.tar.gz"

  • Extract it (#tar -zxvf NDSD_PROCESS_Monitor.tar.gz)

  • Just Do!




# ./NDSD_PROCESS_Monitor

usage: ./NDSD_PROCESS_Monitor options

This script will get defined process statistics.

Mandatory OPTIONS:

-o Os Name or Platform :: Linux / SunOS / AIX :: Default: Mandatory from out of three
-H IP of the HOST :: Default: Mandatory
-m e-Mail ID for sending alert massages

OPTIONS:
-f Log file name with path :: Default: /var/tmp/YYYYMMDD_HHMM.log
-h To show this message
-i Interval between two different stat of Process :: Must be in Second :: Default: 30
-c Check for ndsd core at every given interval on given location :: default: /var/opt/novell/eDirectory/data/dib

Examples:

./NDSD_PROCESS_Monitor -h

To show this message

$0 -o Linux -H XXX.XXX.XXX.XXX -m your@email.com

To get "ndsd" pocess statistics

$0 -o AIX -H XXX.XXX.XXX.XXX -m your@email.com -i 60 -f /root/tmp/ndsd_process_stat.log
.
To get "ndsd" process statistics on AIX platform for every 60 seconds

#



Note: Tool has been tested with all SLES version, Solaris 10, AIX 5.3. Please comment for any Support / BUG related to tool.


 
 
 

Labels:

Collateral
Comment List
Parents
  • Bug 1)
    PATH is not set. If /usr/sbin is not in the path of the caller, the script does not work.
    Bug 2)
    IP address should be compared. Resolve IP from name using getent e.g.:
    if [ "$IP" != `getent hosts "$ACT_HOSTNAME" | awk '{print $1}'` ]
    Bug 3)
    non printable characters in getopts. I guess this is a sideeffect from the wish to use a question mark in the options. The correct way to do this is to quote the options argument of getopts e.g.:
    while getopts 'hf:i:o:p:t:H:c:m:?' OPTION
    Bug 4)
    possibly empty variables are not quoted.
    Line 451 reads
    if [ -z $OS ] || [ -z $HOST_IP ] || [ -z $EMAIL_ID ]
    what on Solaris leads to error message, when called like shown above. Should be e.g.
    if [ -z "$OS" -o -z "$HOST_IP" -o -z "$EMAIL_ID" ]
    Bug 5)
    Program uses top . top is normally not present on vanilla Solaris.
    Bug 6)
    Program gives no notable output (while i wonder, what is useful in the output of this program at all), if the TCP ports have been changed. In the script 389 and 636 are hardcoded.
    Insufficiency 1)
    The implemented hardcoded escape sequences work only in terminals of certain type and break normal editors when inspecting the produced logfile using vi or whatever. Better don't use fancy coloury escape sequences at all.
    Insufficiency 2)
    Program could trivially made working with sh. Just leave off "function",
    so bash is not needed. bash is not necessarily present on Solaris.
    Strangeness 1)
    Download is a .tar.gz and there is only 1 file inside. So why tar ?
    Strangeness 2)
    Why must the platform and IP-address be given, if it is determined automatically
    anyway and compared ?

    Overall opinion: The benefit of the program is ridiculous compared to the effort to make it work. Most stuff could better be determined using ps -o ... , lsof instead of looking into /proc/.... Thus being root would be mostly avoidable.
    The program has probably been tested on Solaris, but obviously with a Solaris installation, that has been extended by programs, that do not come with the normal image.
Comment
  • Bug 1)
    PATH is not set. If /usr/sbin is not in the path of the caller, the script does not work.
    Bug 2)
    IP address should be compared. Resolve IP from name using getent e.g.:
    if [ "$IP" != `getent hosts "$ACT_HOSTNAME" | awk '{print $1}'` ]
    Bug 3)
    non printable characters in getopts. I guess this is a sideeffect from the wish to use a question mark in the options. The correct way to do this is to quote the options argument of getopts e.g.:
    while getopts 'hf:i:o:p:t:H:c:m:?' OPTION
    Bug 4)
    possibly empty variables are not quoted.
    Line 451 reads
    if [ -z $OS ] || [ -z $HOST_IP ] || [ -z $EMAIL_ID ]
    what on Solaris leads to error message, when called like shown above. Should be e.g.
    if [ -z "$OS" -o -z "$HOST_IP" -o -z "$EMAIL_ID" ]
    Bug 5)
    Program uses top . top is normally not present on vanilla Solaris.
    Bug 6)
    Program gives no notable output (while i wonder, what is useful in the output of this program at all), if the TCP ports have been changed. In the script 389 and 636 are hardcoded.
    Insufficiency 1)
    The implemented hardcoded escape sequences work only in terminals of certain type and break normal editors when inspecting the produced logfile using vi or whatever. Better don't use fancy coloury escape sequences at all.
    Insufficiency 2)
    Program could trivially made working with sh. Just leave off "function",
    so bash is not needed. bash is not necessarily present on Solaris.
    Strangeness 1)
    Download is a .tar.gz and there is only 1 file inside. So why tar ?
    Strangeness 2)
    Why must the platform and IP-address be given, if it is determined automatically
    anyway and compared ?

    Overall opinion: The benefit of the program is ridiculous compared to the effort to make it work. Most stuff could better be determined using ps -o ... , lsof instead of looking into /proc/.... Thus being root would be mostly avoidable.
    The program has probably been tested on Solaris, but obviously with a Solaris installation, that has been extended by programs, that do not come with the normal image.
Children
No Data
Related
Recommended