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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-02-2009, 12:05 AM
|
#1
|
Member
Registered: Dec 2008
Posts: 41
Rep:
|
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
|
|
|
04-02-2009, 12:34 AM
|
#2
|
Member
Registered: Dec 2008
Posts: 41
Original Poster
Rep:
|
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
|
|
|
04-02-2009, 12:48 AM
|
#3
|
LQ Newbie
Registered: Mar 2009
Posts: 5
Rep:
|
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
Hi all,
How to take the linux service status information, through 'C' application , if anybody knows please tell me.
Thanks,
Barani
|
|
|
|
04-02-2009, 03:55 AM
|
#4
|
Member
Registered: Dec 2008
Posts: 41
Original Poster
Rep:
|
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
|
|
|
04-02-2009, 08:09 AM
|
#5
|
Member
Registered: Dec 2008
Posts: 41
Original Poster
Rep:
|
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
|
|
|
04-02-2009, 08:50 AM
|
#6
|
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 11,265
|
I don't really understand the question. Can you rephrase it?
|
|
|
04-02-2009, 09:25 AM
|
#7
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,721
|
Quote:
Originally Posted by kbarani
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.
|
|
|
04-02-2009, 07:23 PM
|
#8
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,721
|
Quote:
Originally Posted by kbarani
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.
|
|
|
04-03-2009, 12:38 AM
|
#9
|
Member
Registered: Dec 2008
Posts: 41
Original Poster
Rep:
|
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
|
|
|
04-03-2009, 05:41 AM
|
#10
|
LQ 5k Club
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,311
Rep: 
|
How many more threads are you going to start on the same subject?
|
|
|
04-03-2009, 05:53 AM
|
#11
|
Member
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Rep:
|
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.
|
|
|
04-03-2009, 08:08 AM
|
#12
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,721
|
Quote:
Originally Posted by kbarani
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....
|
|
|
04-03-2009, 08:11 AM
|
#13
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,721
|
Quote:
Originally Posted by kbarani
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.
|
|
|
04-03-2009, 09:26 AM
|
#14
|
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 11,265
|
Start by reading man inittab.
It all begins there... Continue until you can answer all of these questions without assistance: - What does the "/etc/inittab" file do?
- What does the "init" process do?
- What happens when a process dies?
- 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.
|
|
|
04-04-2009, 11:34 AM
|
#15
|
Senior Member
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 03:47 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|