Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working on a bash script to connect a iscsi initiator to a target. After I have edited the iscsid.conf in the initiator I have to restart the open-iscsi with the command:

service open-iscsi restart

Is it a possible way to check if the restart was ok, if it was it will try to connect to target with:

iscsiadm -m discovery -t st -p
share|improve this question
You can check the status of the above service by running sudo service open-iscsi status.If there is an option. – Avinash Raj Mar 1 '14 at 11:28
up vote 1 down vote accepted

You can grep for the process, if it is running it will display otherwise it won't show

command: $ ps -ef | grep iscsi

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.