kill pid

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
just4u_sharath
Premium Member
Premium Member
Posts: 236
Joined: Sun Apr 01, 2007 7:41 am
Location: Michigan

kill pid

Post 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
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

su root
<<enter root password here>>
kill -15 the_pid


8)
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
crouse
Charter Member
Charter Member
Posts: 204
Joined: Sun Oct 05, 2003 12:59 pm
Contact:

Post 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.
Craig Rouse
Griffin Resouces, Inc
www.griffinresources.com
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
crouse
Charter Member
Charter Member
Posts: 204
Joined: Sun Oct 05, 2003 12:59 pm
Contact:

Post by crouse »

I like that, Ray.

Is "unlock" available from the command line also?
Craig Rouse
Griffin Resouces, Inc
www.griffinresources.com
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post 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)
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
crouse
Charter Member
Charter Member
Posts: 204
Joined: Sun Oct 05, 2003 12:59 pm
Contact:

Post 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
Craig Rouse
Griffin Resouces, Inc
www.griffinresources.com
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post 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)
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

8)
-craig

"You can never have too many knives" -- Logan Nine Fingers
crouse
Charter Member
Charter Member
Posts: 204
Joined: Sun Oct 05, 2003 12:59 pm
Contact:

Post by crouse »

8) 8)
Craig Rouse
Griffin Resouces, Inc
www.griffinresources.com
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply