running services
vipin sagar
sagar.vipin at gmail.com
Wed Apr 26 12:27:51 UTC 2006
I prefer by issueing...
[root at mongoose ~]# chkconfig --list | grep on
[root at mongoose ~]# chkconfig --list | grep 5:on /* or grep for 3:on
according to the run level*/
+++++ just gotta free time in between my training session....got to go.... ++++
http://garudaindia.in/
On 4/26/06, Matthijs.Sneijders at corusgroup.com
<Matthijs.Sneijders at corusgroup.com> wrote:
> Hmm,
>
> try something like
>
> service --status-all |grep " is " |while read a b c d
> do
> if [ $c = "stopped" ]
> then
> echo "$a off"
> fi
> if [ $b = "(pid" ]
> then
> echo "$a on"
> fi
> done
>
> but as you are a C++ programmer you might want to do this in your code and
> not on the shell
>
>
>
> Matthijs Sneijders
>
>
>
>
> CORUS
> Research,
> Development
> &
> Technology
>
> Building
> 3G16 room
> 3-312
>
> P.O. Box
> 10.000
>
> 1970 CA
> IJMUIDEN
>
> phone +31 (0)251-496400
>
> fax +31 (0)251-470064
>
> mail matthijs.sneijders at corusgroup.com
>
>
>
>
>
>
> |---------+------------------------------>
> | | Muhammad Rizwan |
> | | <rizwan at nixpanel.co|
> | | m> |
> | | Sent by: |
> | | redhat-list-bounces|
> | | @redhat.com |
> | | |
> | | |
> | | 26-04-2006 18:15 |
> | | Please respond to |
> | | General Red Hat |
> | | Linux discussion |
> | | list |
> | | |
> |---------+------------------------------>
> >----------------------------------------------------------------------------------------------------------------------|
> | |
> | To: General Red Hat Linux discussion list <redhat-list at redhat.com> |
> | cc: |
> | Subject: Re: running services |
> >----------------------------------------------------------------------------------------------------------------------|
>
>
>
>
> Thanks for this reply. but i need some precise solution bocause i need
> to use this command through my C++ code, now its almost impossible for
> me to parse the results of "service --status-all".
> Is there any command which 'll result me just name and status of
> services.
>
> thanks
>
> On Wed, 2006-04-26 at 10:23, BERES Laszlo wrote:
> > Muhammad Rizwan wrote:
> >
> > > How i can get all the running services on linux system (through
> > > command).
> >
> > Use "service --status-all"
> >
> > --
> >
> > BÉRES László RHCE
> > systems engineer, trainer
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>
>
>
> **********************************************************************
> This transmission is confidential and must not be used or disclosed by
> anyone other than the intended recipient. Neither Corus Group Plc nor
> any of its subsidiaries can accept any responsibility for any use or
> misuse of the transmission by anyone.
> **********************************************************************
>
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>
--
~O_0~
~sagar
http://vipinsagar.be
...i've to look back when i heard a gong! i could only see a huge
cobweb and its shining, just got wonder, what the time it was…5AgAr
More information about the redhat-list
mailing list