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
Plugins4401Themes and Skins13Add-ons756Graphics 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 Nagios Install Script For ClearOS
0.0 (0)
70K
RSS Feed
Newest Listings Updated Listings
Top Contributors
Yoann LAMY (7)Julien DESMAREST (6)Davide Lemma (4)deskwork_itunes142 (4)Sam N (3)
See More
Newest Contributors
signalgrid (1)Sanna Glue (2)fisherrs (1)smolinux (1)juanfertor (1)
See More

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

Privacy PolicyTerms of UseTrademarks
Home > Toby Wahlers
TW

Toby Wahlers

@LaFong

User Stats

Member Since: May 16, 2017

Favorites0

Views

Projects0

No Projects Found
check_proc_age.sh

Find full process

This plugin does not find processes in the format 'interpreter /path/to/script', i.e. 'perl /usr/local/sbin/myscript.pl'. I also wanted to be able to just specify, in this case, 'myscript.pl'. My changes to add those: @@ -70,12 +70,12 @@ fi #calculate number of process -nbproc=$(ps -A -o comm | grep -w $proc | grep -v $0 | wc -l) +nbproc=$(ps -A -o args | grep -w "$proc" | grep -v $0 | grep -v grep | wc -l) if [ $nbproc -gt 0 ] then #calculate age of oldest process - ageproc=$(ps -A -o etime,comm,args | grep $proc | grep -v $0 | gawk '{split($1,t,":");split(t[1],td,"-");if (td[2]) {ta=td[1]*86400; t[1]=td[2]} else {ta=0}; if (t[3]) {$1=(t[1]*60+t[2])*60+t[3]+ta} else {$1=t[1]*60+t[2]};if (NR==1) {maxi=$1;} else {if ($1>maxi){maxi=$1;}}};END {print maxi}') + ageproc=$(ps -A -o etime,comm,args | grep "$proc" | grep -v $0 | grep -v grep | gawk '{split($1,t,":");split(t[1],td,"-");if (td[2]) {ta=td[1]*86400; t[1]=td[2]} else {ta=0}; if (t[3]) {$1=(t[1]*60+t[2])*60+t[3]+ta} else {$1=t[1]*60+t[2]};if (NR==1) {maxi=$1;} else {if ($1>maxi){maxi=$1;}}};END {print maxi}') case $ageproc in ?|[0-5]? ) maxage=$ageproc" Seconds";;

Reviewed 9 years ago

No Favorites Found

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

Privacy PolicyTerms of UseTrademarks
Home Browse Submit Profile