How do I get AIX process id from MFG/PRO session ID?

jtolson

New Member
We are currently experiencing problems with users locking up maintenance screens during batch processing in MFG/PRO . We know what users are in the system via menu 36.16.12 but we don't know of a good way to kill the specific user. We would like to get the AIX process id and then run a process to kill the session, however the MFG/PRO assigned application id is different than the AIX process id.
 

rbaggetta

New Member
kill command is not what you want in AIX

You can 1 of two things:
1) run promon to see what the userid and tty for that user is and then compare it to processes for the user using " ps -fu'username' " This way you'll know which process it is under AIX when using "ps -fu " command.

2) running " ps -ef |grep username " will show you all the AIX processes. But is not recommended that you run a " kill " command on the active process. Option 1 is less intrusive and always better to disconnect a user from promon versus an AIX kill.

3) run promon R&D, and review active transactions, doing a kill from AIX level is dangerous and you could bring down your db.

hope this helps.
 

jtolson

New Member
I appreciate the reply. Unfortunately our company has a single AIX userid for all MFG/PRO users. A better question I can ask is if MFG/PRO stores the AIX process id when a user logs in to the app?
 

rbaggetta

New Member
I'd use the 2 commands below to find out what the users process is. The first one is through promon/User Control.

Promon/user control
[FONT=r_ansi]14 rbaggett SELF -- 70426 59028694 128538 17 0 10/19/05 08:04

AIX level:
[FONT=r_ansi]$ps -furbaggett
UID PID PPID C STIME TTY TIME CMD
rbaggett 128538 122684 0 08:04:34 pts/81 :21 /progress
rbaggett 152404 18038 0 08:14:11 pts/88 0:02 /progress

As you can see this use has 2 connections to progress, but one is active in the database using promon. Thus, I would AIX kill the tty session #88.

Hope this helps.
[/FONT]
[/FONT]
 

TomBascom

Curmudgeon
You can use the _myconnection VST if you need to know this from within the context of a running program.

Or use _connect to get a complete list of connections, userids and PIDs. You can probably, somehow or other, map that back to mfgpro's session id.
 

W.Wulmsen

Member
If still applicable:

I have created a script for disconnecting users when they are doing some time "nothing". The script is parameterised and walks through all active users and active databases. The actual disconnecting is done via "Proshut <database> -C disconnect <usernumber>".

Mail me and I can send you this UNIX script. I have used this script on different platforms. Sometimes it needs some tweaking, but that is normal. You can at least retrieve the commands from the script.
 
Top