LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-18-2009, 03:53 AM   #1
struggled_newbie
Member
 
Registered: Sep 2009
Posts: 125

Rep: Reputation: 15
How to check running sevices


Hello there Unix & Linux Guru's and Gifted ones,

Can anyone help me on how to check present running services in Redhat Linux 9.0(Shrike)
This sounds to be silly but really I'm new to linux.
Thank you and God Bless.

Lomeng (struggled_newbie)
 
Old 09-18-2009, 04:03 AM   #2
kdelover
Member
 
Registered: Aug 2009
Posts: 311

Rep: Reputation: 36
It does matter if your question is silly ,you can still ask

do a chkconfig --list or /etc/init.d <servicename> status

Last edited by kdelover; 09-18-2009 at 04:04 AM.
 
Old 09-18-2009, 04:56 AM   #3
struggled_newbie
Member
 
Registered: Sep 2009
Posts: 125

Original Poster
Rep: Reputation: 15
check running services

Hello,

thanks and I really appreciate your help

one more thing,,,,

how can I check if fetchmail, qmail, samba and squid is actively running?
 
Old 09-18-2009, 06:54 AM   #4
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by struggled_newbie View Post
Hello,

thanks and I really appreciate your help

one more thing,,,,

how can I check if fetchmail, qmail, samba and squid is actively running?
try this:

Code:
test_service() {
   echo -n "Service $1 is "
   service $1 status > /dev/null 2>&1 && echo "OK" || echo "not running."
}

for service in "$@"
do
   test_service $service
done
Example session:

Code:
$ script-name.sh fetchmail qmail samba squid
This assumes these are the correct service names, which I don't actually know.
 
Old 09-19-2009, 03:25 AM   #5
unev_21
Member
 
Registered: Mar 2009
Distribution: Ubuntu
Posts: 51

Rep: Reputation: 16
u can try
Code:
ps xau | grep servicename
or just
Code:
top
 
  


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
some sevices dont start when rebooting the server abakkali Linux - Newbie 4 06-25-2009 08:09 AM
Stopping Sevices carlosinfl Linux - General 8 03-09-2006 07:40 AM
Check if program is running Conjurer Programming 8 11-17-2005 02:37 PM
Requisite for starting sevices in rh9 tuxfood Red Hat 2 05-19-2005 02:52 AM
/etc/services --> Can I comment a bunch of these sevices out ForumKid Linux - Security 1 12-27-2001 03:36 AM


All times are GMT -5. The time now is 02:24 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration