Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

1 Answer 1

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.