1

When I try to get the status of Mule service in linux by this:

service mule status

I get this:

Usage: /etc/init.d/mule {start|stop|restart}

Apparently, mule service doesn't support status. How can I see that Mule is running then?

4 Answers4

3

If you want it to run just go:

service mule start

Or stop, go:

service mule stop

Then it will tell it is already in that state, or it will do it.

I also know a few services, where i need to do this.

Otherwise you can check with ps:

ps aux | grep mule

Should work...

Adionditsak
  • 3,935
  • 1
    Could you explain the last part ps aux | grep mule. I'm not interested in starting/stopping/restarting. – Charu Khurana Jun 12 '14 at 14:42
  • 1
    ps is the process command which will list all running processes, to see what actually is running you need the -aux flags. Check them out in the man! :-) ($ man ps). Then i pipe it over to grep, where i can find different parts of text from standard output based on string pattern. Then i just grab lines with "mule" from the list from ps. And there you got it. – Adionditsak Jun 12 '14 at 19:11
1

You can try to see if the process itself runs with the command ps, as mentioned above. The List of current processes might be very long, and thus can either be filtered for a given string like mule with the command ps -efH|grep mule or it can be piped into a viewer: ps -efH|less where you can read through the command output. Btw., -e tells the system to show all processes, -f makes sure additional information are output, and -H prints the information in a tree, showing process dependencies.

As an alternative, you could also (install and) launch the process viewer htop, which will show you all current processes with information like how many CPU is used my them, live.

liquidat
  • 562
0

If you are testing with InSpec:

describe service("mule") do
  it { should be_installed }
  it { should be_enabled }
  it { should be_running }
end
-1

It should be great include which version of Mule you are running, in any version 3.x.x you can go to %MULE_HOME%/bin and run the command:

./mule status

and it will give you and output like this if is running:

MULE_HOME is set to /opt/MuleSoftESB/mule-Poc
Mule Enterprise Edition is not running.

or if is not running:

MULE_HOME is set to /opt/MuleSoftESB/mule-Poc
Mule Enterprise Edition is running (12403).

Other option is, into the same bin directory, list the files (ls -la) including the hidden files and if you see a file called:

-rw-rw-r--  1 wasadmin devwas     6 Apr  2 17:45 .mule_ee.pid

Then the Mule server is running for sure.

2ark0
  • 1