How stop process like smbd at AIX system

Hi all,

how can I stop process like smbd or other process?

I have this in Action Script:
if {exists “smbd” of processes}
run kill {parameter (pids of processes whose (name of if = “smbd”)}
endif

I got answer that failed it on relevance substitution. Where is a problem?
Thanks for answer.

1 Like

There are two things I would do differently here.

  1. Put the ‘exists’ into relevance for the task itself.
  2. Find the polite way to stop smbd on the AIX system instead of an outright kill of the pid.

You have the relevance substitution error because you said name of if instead of name of it.

1 Like

You also are not using parameter correctly and you haven’t closed all of the parentheses. Also, in the likely case that there is more than one pid for smbd, you aren’t concatenating the results correctly. You’d need to build a script to kill each pid individually.

Something like

createfile until EOF
#/bin/sh
{concatenation "%0a" of ("kill " & it ) of pids of processes whose (name of it = "smbd")}
EOF
move __createfile kill-smb.sh
waithidden /bin/sh -c kill-smb.sh

Awesome, it is exactly what I need to doing. Thank you.