Page 1 of 1

kill pid

Posted: Tue Feb 19, 2008 12:21 pm
by just4u_sharath
how to kill pid of other users,if any one locked the job with there ids.
i need unix command to kill process ids of other users

Posted: Tue Feb 19, 2008 12:48 pm
by kcbland
su root
<<enter root password here>>
kill -15 the_pid


8)

Posted: Tue Feb 19, 2008 1:04 pm
by crouse
Killing the PID is not the FIRST thing you want to do. Also, killing the PID of another user is only possible if you're root or have root privs. Even if you kill the PID, it won't unlock the job.

First, try unlocking via Director.
Second (I just go here first), determine the lock that is in place on the job. Go to DS Administrator, Projects, highlight project, Command, issue "LIST.READU EVERY". Record the "Userno" for the process that has the job locked.
Third, issue command "UNLOCK USER Userno ALL"
Fourth, if third step fails, issue command "INSERT INTO VOC (F0, F1, F2, F3, F4, F5) VALUES ('UNLOCK','V','list_readu','E','BV','unlock');" This adds the UNLOCK verb to the specific project.
Then do third step again.

This will unlock the job. It will not kill the unix user's DS session that had the job locked.

Use with care and only as a last measure once you've determined the original user can't unlock the job on their own.

Posted: Tue Feb 19, 2008 3:12 pm
by ray.wurlod
I prefer to use list_readu from the operating system, because I can pipe its output through filters like grep to narrow my focus. I also like to capture the header line:

Code: Select all

list_readu | head -1 ; list_readu | grep rwurlod

Posted: Tue Feb 19, 2008 3:43 pm
by crouse
I like that, Ray.

Is "unlock" available from the command line also?

Posted: Tue Feb 19, 2008 3:55 pm
by kcbland
to get unlock to work, create a symbolic link called unlock which points to list_readu. It's a magic trick - if list_readu is executing under the name unlock then it gains the functionality to unlock locks. 8)

Posted: Tue Feb 19, 2008 4:31 pm
by crouse
eh?

You're scaring me...

I tried it under my account (not dsadm). Like shooting into the ground so as not to hurt anyone.

So I get "Insufficient privileges to perform lock maintenance." Good.

So if I do it as dsadm.... just what will get unlocked?

-Craig

Posted: Tue Feb 19, 2008 4:51 pm
by kcbland
If you type in "unlock ALL", the answer is EVERYTHING. If you type in "unlock USER 12345 ALL" then only the locks held by USER 12345. It works exactly the same as UNLOCK from the UV account inside dssh/uvsh, because it is the same. Most commands for the engine are executable from the unix command line (clear.file, mkdbfile, etc) with synonyms in the VOC pointing to them, sometimes as other names though. UNLOCK and LIST.READU point to the same unix executable list.readu. 8)

Posted: Tue Feb 19, 2008 5:00 pm
by chulett
8)

Posted: Tue Feb 19, 2008 5:09 pm
by crouse
8) 8)

Posted: Tue Feb 19, 2008 5:26 pm
by ray.wurlod
The need to have admin privileges doesn't go away just because you're executing from the operating system. The same restriction would occur if you used UNLOCK as a non-admin user at the TCL prompt.