Results 1 to 10 of 11
When trying to find a service status, I issued the following command:
<service xxx status>
However the answer was <Usage: xxx {start|stop}>
How do I know its current state, or ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-07-2009 #1Just Joined!
- Join Date
- Dec 2009
- Posts
- 5
How to change service status
When trying to find a service status, I issued the following command:
<service xxx status>
However the answer was <Usage: xxx {start|stop}>
How do I know its current state, or how do I change it in order for me to know its current state?
- 12-07-2009 #2
For suse, use Yast -> System Services (runlevel) to see and configure system services.
- 12-07-2009 #3
Service is just a script that lives in /sbin so you can see totally how it is done. The option to list status is only provided for all service ie the output is a list of the status of all services.
service -s
or
service --status-all
to check ona a given service samba for example
service smb status
note you need to be root to do this
- 12-08-2009 #4Just Joined!
- Join Date
- Dec 2009
- Posts
- 5
Hi All.
Thanks for your response.
However, as you can see from my primary thread, the response i get is:
<Usage: xxx {start|stop}>
meaning i don't understand in which state this service is.
How do i change it, so i will be replied (i.e. <Usage: xxx start> or <Usage: xxx stop>.
- 12-08-2009 #5
It's intended to be a helpful message offering you options for this command.
In other words, the following are valid commands
To start, stop, and restart the service, respectively. It is not telling you whether the service is already running.Code:service myservice start service myservice stop service myservice restart
- 12-08-2009 #6Just Joined!
- Join Date
- Dec 2009
- Posts
- 5
You mean that only <service --system-All>, will display the service state?
- 12-08-2009 #7Linux Newbie
- Join Date
- Mar 2007
- Posts
- 138
service -s or service --status-all will display all services and their status.
service servicename start will start the service and so forth.
service -h or service --help displays the usage (syntax).
service servicename status
:is only available for some services.
service servicename
:displays the options, or if status is available.
If you get only start|stop it is not available for that service.
- 12-09-2009 #8Just Joined!
- Join Date
- Dec 2009
- Posts
- 5
Can i add a script to init.d, where it will show this service status?
- 12-09-2009 #9
If the service does not report it's status no. I'd guess that all the services that can report their status already have a script that will do that. Exactly which service do you want to know the status?
- 12-09-2009 #10Just Joined!
- Join Date
- Dec 2009
- Posts
- 5
This is a private monitoring sysytem.
Not an integrated built-in system (i.e. java, oracle etc.).


Reply With Quote
