LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-29-2010, 01:29 PM   #1
lamou23
Member
 
Registered: Jun 2010
Posts: 54

Rep: Reputation: 15
shell script


hello,

have any one some shell scripts which allow me to manage services like:http,pop3,smtp... and display "ok" if it works good, warning if the execution of the service is slow, and critical if the service is stopped.

help please
thanks
 
Old 06-29-2010, 01:35 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,613

Rep: Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962
Quote:
Originally Posted by lamou23 View Post
hello,

have any one some shell scripts which allow me to manage services like:http,pop3,smtp... and display "ok" if it works good, warning if the execution of the service is slow, and critical if the service is stopped.

help please
thanks
We'll be glad to help you with scripts, but not going to write them for you. Post what you've written, and where you're stuck, and we can help. Otherwise, there are many bash scripting tutorials on the web.

Also, there are several process monitoring tools you can Google for.
http://www.yolinux.com/HOWTO/Process-Monitor-HOWTO.html
 
Old 06-29-2010, 01:37 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
lamou*;
This is starting to look like a series of homework questions....Please tell us more about what you are doing. For example, taking a class, following a tutorial, etc.

Also, please be sure to follow up in your previous threads---Including the one I just posted to a few minutes ago.
 
Old 06-29-2010, 01:47 PM   #4
lamou23
Member
 
Registered: Jun 2010
Posts: 54

Original Poster
Rep: Reputation: 15
shell script

hello

I have this script, but it doesn't give me all information about the bind9 service

*****************************
#!/bin/bash

RPORTS=$(netstat -tulpn | grep -vE '^Active|Proto' | grep 'LISTEN' | awk '{ print $4}' | cut -d: -f2 | sed '/^$/d' | sort -u)
for r in $RPORTS
do
if [ $r -eq 53 ]
then
echo "YES"
sendmail=1
exit 0

fi
done
echo "NO"



thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Executing a Shell script with 654 permissions inside another shell script. changusee2k Linux - Newbie 2 06-07-2011 07:58 PM
pass variable from one shell script into another shell script xskycamefalling Programming 9 10-03-2009 01:45 AM
help with execute mulitple shell script within shell script ufmale Programming 6 09-13-2008 12:21 AM
shell script problem, want to use shell script auto update IP~! singying304 Programming 4 11-29-2005 05:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration