LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-02-2009, 12:05 AM   #1
kbarani
Member
 
Registered: Dec 2008
Posts: 41

Rep: Reputation: 15
How system-config-services working


Hi all,
Please tell me How the linux fedora system-config-services taking the service status information, if any-one have the system-config-services 'c' code send to me.

Thanks,
Barani
 
Old 04-02-2009, 12:34 AM   #2
kbarani
Member
 
Registered: Dec 2008
Posts: 41

Original Poster
Rep: Reputation: 15
linux service status information

Hi all,
How to take the linux service status information, through 'C' application , if anybody knows please tell me.

Thanks,
Barani
 
Old 04-02-2009, 12:48 AM   #3
suresh.bonda
LQ Newbie
 
Registered: Mar 2009
Posts: 5

Rep: Reputation: 0
Hi Barani,

It would be better if you can put more details by giving an example.

Is it that an C application to check if a particular service on a remote linux box is running or not?
how abt access permissions to connect to the linx?

I donot have an answer straight away, but can be tried.

-Suresh

Quote:
Originally Posted by kbarani View Post
Hi all,
How to take the linux service status information, through 'C' application , if anybody knows please tell me.

Thanks,
Barani
 
Old 04-02-2009, 03:55 AM   #4
kbarani
Member
 
Registered: Dec 2008
Posts: 41

Original Poster
Rep: Reputation: 15
how to get services status by another application?

Hi all,

I want to get all service status in my own application that run on linux.
Is there any function or system call?

Thanks,
Barani
 
Old 04-02-2009, 08:09 AM   #5
kbarani
Member
 
Registered: Dec 2008
Posts: 41

Original Poster
Rep: Reputation: 15
What is the logic behind taking the process status???

Hi all,

Please any-one explain me what is the logic behind the taking linux services staus , through my application.

Thanks,
Barani
 
Old 04-02-2009, 08:50 AM   #6
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,610
Blog Entries: 4

Rep: Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905
I don't really understand the question. Can you rephrase it?
 
Old 04-02-2009, 09:25 AM   #7
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by kbarani View Post
Hi all,

I want to get all service status in my own application that run on linux.
Is there any function or system call?

Thanks,
Barani
There might be, but you don't say anything about what version/distro of Linux, what your application does, or what language its written in. Hard to give you an answer, when we don't know details.

A "ps -aef" at the command line will return the process table. Perl and other languages have hooks to read the process table.
 
Old 04-02-2009, 07:23 PM   #8
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by kbarani View Post
Hi all,
Please tell me How the linux fedora system-config-services taking the service status information, if any-one have the system-config-services 'c' code send to me.
Please write clearly...your question is hard to understand. Are you asking HOW the system-config-services program gets information from the user? Process Table? What??

And the "C" code for it can be found either on your distro's repository, or on the install media. I doubt anyone is going to email you programs.
 
Old 04-03-2009, 12:38 AM   #9
kbarani
Member
 
Registered: Dec 2008
Posts: 41

Original Poster
Rep: Reputation: 15
linux service status information

Hi all,
Operating System = Linux Fedora core 8
Language = "C"

I am trying to take the localhost services (not process) status through my "c" application.
Example:
snmpd stopped...
sshd running...

For that how to go about this , any function gives this , which logic i go for taking those information.

Thanks,
Barani

Hi Suresh,
Operating System = Linux Fedora core 8
Language = "C"

I am trying to take the localhost services (not process) status through my "c" application.
Example:
snmpd stopped...
sshd running...

For that how to go about this , any function gives this , which logic i go for taking those information.

Thanks,
Barani

Hi all,
Operating System = Linux Fedora core 8
Language = "C"

I am trying to take the localhost services (not process) status through my "c" application.
Example:
snmpd stopped...
sshd running...

For that how to go about this , any function gives this , which logic i go for taking those information.

Thanks,
Barani

Hi all,
Operating System = Linux Fedora core 8
Language = "C"

I am trying to take the localhost services (not process) status through my "c" application.
Example:
snmpd stopped...
sshd running...

For that how to go about this , any function gives this , which logic i go for taking those information.

Thanks,
Barani

Hi,
Operating System = Linux Fedora core 8
Language = "C"

I am trying to take the localhost services (not process) status through my "c" application.
Example:
snmpd stopped...
sshd running...

For that how to go about this , any function gives this , which logic i go for taking those information.

Thanks,
Barani

Last edited by jtshaw; 04-04-2009 at 11:31 AM. Reason: mass duplicates
 
Old 04-03-2009, 05:41 AM   #10
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; Slackware64-current (VM); Debian 12 (VM)
Posts: 8,290
Blog Entries: 61

Rep: Reputation: Disabled
How many more threads are you going to start on the same subject?
 
Old 04-03-2009, 05:53 AM   #11
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
There might be a lower level method to answer your question, but if you follow the logic in the service script, it calls the service script in init.d which, in turn, checks for the existance of a 'status' zero byte file in /var/lock/subsys/. Check the service's init.d script for the other methods it uses to determine the service's status.
 
Old 04-03-2009, 08:08 AM   #12
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by kbarani View Post
Hi all,
Operating System = Linux Fedora core 8
Language = "C"

I am trying to take the localhost services (not process) status through my "c" application.
Example:
snmpd stopped...
sshd running...

For that how to go about this , any function gives this , which logic i go for taking those information.

Thanks,
Barani
This is the same question you've asked in another thread....
 
Old 04-03-2009, 08:11 AM   #13
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by kbarani View Post
Hi,
Operating System = Linux Fedora core 8
Language = "C"

I am trying to take the localhost services (not process) status through my "c" application.
Example:
snmpd stopped...
sshd running...

For that how to go about this , any function gives this , which logic i go for taking those information.
Without knowing anything about your application, you could have it run through the services in /etc/init.d, and request a status, and process it accordingly.

You can look at the scripts in /etc/init.d, or the rc.status script.
 
Old 04-03-2009, 09:26 AM   #14
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,610
Blog Entries: 4

Rep: Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905
Start by reading man inittab.

It all begins there... Continue until you can answer all of these questions without assistance:
  1. What does the "/etc/inittab" file do?
  2. What does the "init" process do?
  3. What happens when a process dies?
  4. What does the "cron" utility and the "/etc/crontab" file do?
It is not my intention that these questions be answered here. These are some of the basic concepts that you need to research, on your own, to determine what you need to know to do what you want to do.

Last edited by sundialsvcs; 04-03-2009 at 09:28 AM.
 
Old 04-04-2009, 11:34 AM   #15
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
I've merged all your threads in software together.

It is absolutely unnecessary to create more then one thread on a given topic. If you create a thread and feel like it is in the wrong forum please report it to the moderators and we will happily move it for you. Thank you.
 
  


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
system-config-services c-source code kbarani Linux - Networking 3 03-29-2009 01:18 PM
DBus problem whit system-config-services bluesmanu Linux - Software 1 12-16-2008 11:17 AM
why system-config-logviewer is not working? 2007fld Linux - Software 3 04-09-2007 10:11 AM
how does system-config-services know the correct order for service startup ? jtmoon Linux - Software 2 06-17-2006 01:16 AM
Services Config tool not working - FC3 cheesekeeper Linux - Software 4 02-12-2005 10:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:56 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
Open Source Consulting | Domain Registration