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

Nagios World Conference 2026: Sept. 14-17 in St. Paul, MN | Learn More

  • Home
  • Directory
  • Library
  • Support
  • About
Plugins4400Themes and Skins12Add-ons753Documentation283Graphics 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
Other Tutorials And HOWTOs Setting Up Fully Redundant Failover Nagios Servers
0.0 (0)
72.4K
RSS Feed
Newest Listings Updated Listings
Top Contributors
Yoann LAMY (7)Julien DESMAREST (6)Davide Lemma (4)deskwork_itunes142 (4)Chad Columbus (3)
See More
Newest Contributors
fisherrs (1)juanfertor (1)zsoltaire (1)RavuAlHemio (1)sowoii (1)
See More

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

Privacy PolicyTerms of UseTrademarks
Home > Rudolf
R

Rudolf

@Potucek

User Stats

Member Since: September 18, 2012

Favorites0

Views

Projects0

No Projects Found
check open files

Beware the percentages

This is a nice way of checking against SYSTEM limits but often when you run into the "too many open files" issues you actually have a problem with ulimit and would want to check a fixed file number. Suggested patch: --- check_open_files.pl 2012-09-18 10:54:38.000000000 -0600 +++ check_open_files.pl.orig 2012-09-18 10:42:49.000000000 -0600 @@ -35,19 +35,8 @@ # the first field minus the second one my $realfreehandlers = $nb_openfiles - $nb_freehandlers; -### Use the lowest number to alert on -$warning_threshold=$file_max; -$critical_threshold=$file_max; - -$warning_threshold=$opt_W - if defined($opt_W); -$critical_threshold=$opt_C - if defined($opt_C); - -$warning_threshold=int($file_max * $opt_w /100) - if defined($opt_w) && int($file_max * $opt_w /100) $opt_c, "critical=s" => $opt_c, # critical if above this percentage of system max - "W=s" => $opt_W, "warnabs=s" => $opt_W, # warning if above this number - "C=s" => $opt_C, "critabs=s" => $opt_C, # critical if above this number + "w=s" => $opt_w, "warning=s" => $opt_w, # warning if above this number + "c=s" => $opt_c, "critical=s" => $opt_c, # critical if above this number "t=i" => $opt_t, "timeout=i" => $opt_t, "h" => $opt_h, "help" => $opt_h, "v" => $opt_v, "version" => $opt_v @@ -88,12 +75,12 @@ unless (defined $opt_t){ $opt_t = $utils::TIMEOUT; } - unless ((defined $opt_w && defined $opt_c)||(defined $opt_W && defined $opt_C)){ + unless (defined $opt_w && defined $opt_c){ print_usage(); exit $ERRORS{'UNKNOWN'}; } - if ((defined($opt_w) && ( $opt_w >= $opt_c)) || (defined($opt_w) && ( $opt_W >= $opt_C))) { - print "Warning (-w/W) cannot be greater than Critical (-c/C)!n"; + if ( $opt_w >= $opt_c) { + print "Warning (-w) cannot be greater than Critical (-c)!n"; exit $ERRORS{'UNKNOWN'}; } return $ERRORS{'OK'}; @@ -115,8 +102,6 @@ print " Checks the open files number against the max autorizedn"; print "-w (--warning) = Percentage of opened files to generate warning alertn"; print "-c (--critical) = Percentage of opened files to generate critical( w

Reviewed 13 years ago

No Favorites Found

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

Privacy PolicyTerms of UseTrademarks
Home Browse Submit Profile