Linux - SoftwareThis 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.