Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Commit

Permalink
add additional protection for nmon external
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhemmarchand committed Mar 29, 2017
1 parent 4cbf777 commit 8fba9ad
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
8 changes: 8 additions & 0 deletions bin/nmon_external_cmd/nmon_external_snap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@
# - nmon_external: manage any number of fields without transposition
# - nmon_external_transposed: manage any number of fields with a notion of device / value

# Do no try to do anything unless the NMON_EXTERNAL_DIR variable has been correctly set
# we exit without any error code, the situation is not expected but we do not want to generate bad data in nmon data

if [ "$NMON_EXTERNAL_DIR" = "" ]
then
exit 0
fi

# CAUTION: ensure your custom command does not output any comma within the field name and value

# Number of running processes
Expand Down
11 changes: 10 additions & 1 deletion bin/nmon_external_cmd/nmon_external_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
# Disclaimer: this provided "as is".
# Date - March 2017
# Guilhem Marchand 2017/03/18, initial version
# Guilhem Marchand 2017/03/29, protect against unexpecting failure in NMON_EXTERNAL_DIR getting value

# Version 1.0.0
# Version 1.0.01

# For AIX / Linux / Solaris

Expand All @@ -22,6 +23,14 @@
# - nmon_external: manage any number of fields without transposition
# - nmon_external_transposed: manage any number of fields with a notion of device / value

# Do no try to do anything unless the NMON_EXTERNAL_DIR variable has been correctly set
# we exit without any error code, the situation is not expected but we do not want to generate bad data in nmon data

if [ "$NMON_EXTERNAL_DIR" = "" ]
then
exit 0
fi

# CAUTION: ensure your custom command does not output any comma within the field name and value

# number of running processes
Expand Down
2 changes: 1 addition & 1 deletion default/app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ label = TA-nmon
[launcher]
author = Guilhem Marchand
description = Technical Addon for Nmon Performance Monitor
version = 1.3.06
version = 1.3.07

0 comments on commit 8fba9ad

Please sign in to comment.