Nagios Exchange Nagios Exchange
  • Home
  • Directory
  • Library
  • Support
  • About

Advanced Search

Build precise queries to find exactly what you need

Search Logic

Select compatible versions

Press ESC to close

Sign In Sign Up
  • Home
  • Directory
  • Library
  • Support
  • About
Plugins4394Themes and Skins11Add-ons745Documentation283Graphics and Logos36View All Categories
LinuxSecuritySNMPFile SystemCloud
New Listings Recently Updated Listings Most Favored Listings Most Popular Listings Most Rated Listings Most Reviewed Listings
Random Project
HP (Compaq) Nagios check to recursively scan via SNMP on HP BladeSystem the Fan and power supplies. In addition also the overall system status is retrieved.
0.0 (0)
98.3K
RSS Feed
Newest Listings Updated Listings
Top Contributors
Julien DESMAREST (6)Yoann LAMY (6)Davide Lemma (4)deskwork_itunes142 (4)Gary T. GIesen (2)
See More
Newest Contributors
juanfertor (1)zsoltaire (1)RavuAlHemio (1)sowoii (1)Nitatemic (1)
See More

Copyright © 2009-2025 Nagios Enterprises, LLC. All rights reserved.

Privacy PolicyTerms of UseTrademarks
Home > lucup
l

lucup

@lucup

User Stats

Member Since: December 20, 2012

Favorites0

Views

Projects0

No Projects Found
Highcharts for Nagios

Installed & used in my Nagios in 5 seconds! ;-)

Really useful! Easy and quick to install! Thanks a lot!

Reviewed 13 years ago

Check cpu, men and pagin space for AIX

Improving The performance of the script:

Hi, good! But just you can improve the performance of the script avoiding the first step where you execute all the systems commands invocation. If you move them to each select cases. Cosider that in the firs option: srfr the (vmstat 1 2) is too slow, so if you want to execute the orther options: numperm|pctused|pgspaceused, is better to avoid the invocation of the (vmstat 1 2), just invoking the vmstat -v that is faster. :-) So here the script modified: ----------------------------------------------------------------------------- #!/bin/sh # #------------------------------------------------------- # Check du taux d'utilisation mmemoie sur AIX - Fabrice Dupre - 11/01/08 # Moving the systems command invocation to each select cases. - LUCUP - Lucas Moreschi - 27/02/2015. #------------------------------------------------------- Syntaxe() { echo " " echo " Command Syntaxe: check_aix_mem.sh [-c val] [-w val] [-t srfr|numperm|pctused|pgspaceused]" echo " " exit 3; } #------------------------------------------------------- if [[ $# == 0 ]] then Syntaxe fi valw=0 valc=0 while [[ $# > 0 ]] do par=$1 case $par in -c) shift valc=$1;; -w) shift valw=$1;; -t) shift type_sortie=$1;; -h) shift Syntaxe exit;; *) shift;; esac done ok=0 str_out="CHARGE MEM:" xcpu=0 total=0 case $type_sortie in srfr) retour_srfr=$(vmstat 1 2 | awk '{ print $8" "$9 }' | tail -1) fr=$(echo $retour_srfr | cut -d " " -f1 ) sr=$(echo $retour_srfr | cut -d " " -f2 ) #echo "sr : $sr - fr : $fr" if [[ $sr -gt 0 ]] && [[ $fr -gt 0 ]] then str_out="$str_out $(expr $sr / $fr)% " if (( $(expr $sr / $fr) > $valw )) then ok=1 fi if (( $(expr $sr / $fr) > $valc )) then ok=2 fi # Sortie au format perfparse echo "$str_out Srfr = $(expr $sr / $fr)%;| Srfr=$(expr $sr / $fr)%;$valw;$valc"; exit $ok # Sortie au format non perfparse #echo "$str_out Srfr = $(expr $sr / $fr)%"; exit $ok else str_out="$str_out 0% " # Sortie au format perfparse echo "$str_out Srfr = 0%;| Srfr=0%;$valw;$valc"; exit $ok # Sortie au format non perfparse #echo "$str_out Srfr = 0%;"; exit $ok fi ;; numperm) retour_numperm=$(vmstat -v | grep numperm | sed 's/ //g' | cut -d " " -f 2) #echo "Numperm : $retour_numperm" str_out="$str_out $retour_numperm% " if (( $retour_numperm > $valw )) then ok=1 fi if (( $retour_numperm > $valc)) then ok=2 fi # Sortie au format perfparse echo "$str_out Numperm = $retour_numperm%;| Numperm=$retour_numperm%;$valw;$valc"; exit $ok ;; pctused) retour_inuse=$(svmon | awk '{ print $3 }' | head -2 | tail -1) retour_memory=$(svmon | awk '{ print $2 }' | head -2 | tail -1) retour_p_used=$(expr 100 * $retour_inuse / $retour_memory) str_out="$str_out $retour_p_used% " if (( $retour_p_used > $valw)) then ok=1 fi if (( $retour_p_used > $valc)) then ok=2 fi # Sortie au format perfparse echo "$str_out MemUsed = $retour_p_used%;| MemUsed=$retour_p_used%;$valw;$valc"; exit $ok ;; pgspaceused) retour_pguse=$(svmon | grep "pg space" | awk '{ print $3 }') retour_memory=$(svmon | awk '{ print $2 }' | head -2 | tail -1) retour_pg_used=$(expr 100 * $retour_pguse / $retour_memory) str_out="$str_out $retour_pg_used% " if (( $retour_pg_used > $valw)) then ok=1 fi if (( $retour_pg_used > $valc)) then ok=2 fi # Sortie au format perfparse echo "$str_out PgSpaceUsed = $retour_pg_used%;| PgSpaceUsed=$retour_pg_used%;$valw;$valc"; exit $ok ;; esac

Reviewed 11 years ago

No Favorites Found

Copyright © 2009-2025 Nagios Enterprises, LLC. All rights reserved.

Privacy PolicyTerms of UseTrademarks
Home Browse Submit Profile