Identifying RF users

HP-UX
All,
I work in a manufacturing environment where some users connect to our Progress-based system with wireless RF units (Bar-code). Sometimes they go out of range and get disconnected but their session remains alive (ghost sessions). This sometimes causes record lock problems and is a pain.

1) Is there a way to identify such ghost sessions?

Also, the sys-admins would like to be able to identify who is logged in with RF units. I came up with the idea of having the users' profile launch a backfround ksh script that does nothing(!) but remain in memory for the duration of the session. The name of the script would look something like: "RF-joeblow.sh".
We would generate and run this script as a background job when the user logs in and selects the RF option from his menu. This way we can ps|grep for the 'RF' keyword and see who our RF users are.

2) What command should I put inside this script to have it do nothing but remain active until the session ends. I thought about "sleep 100000" but I am not sure how cpu-consuming this could be? Any ideas?

Thanks!

By ghost do you mean a zombie? Or do the sessions sit and wait for a blocked read request forever and ever?

Yes, zombie. Sometimes the RF units will go out of range of the wi-fi routers. This causes the Units to disconnect from the system. Most of the times Unix will see they are no longer active and shut their session. But not always. In some cases, if the user was in the middle of a Progress database transaction, this locks records. Since the user cannot resume his lost session, it just hangs in this state until a sys-admin manually kills this session.

If they are zombie processes the ps -ef command will show them as a zombie. You can grep for that.

ps -ef | grep zombie

Sounds like you are using something like UCAD/Advantecs/Service Suite. Each process created on the server side has to be connected using the exact same executable image name, correct? Can you see the image name in the commandline they are currently running --- using the ps -ef command?

Otherwise you will need to resort to the fuser (or lsof) command to see all processes that have certain data file(s) open.

Wouldn't this be nice if HP UX could identify zombie processes and just tell me like this...

Sorry I'm not familiar with this. Here's what ps -ef looks like to me:
->ps -f
UID PID PPID C STIME TTY TIME COMMAND
morinr 21905 12886 1 14:06:38 pts/tc 0:00 ps -f
morinr 12886 12885 1 10:53:03 pts/tc 0:00 -sh
root 12885 985 0 10:53:03 pts/tc 0:00 telnetd

Thanks.

Jim,
My "ps" command was wrong. Here's what I get when I type the command decently:
->ps -ef
root 25344 1 0 Mar 7 ? 0:15 /openedge/dlc/bin/_mprosrv
root 2284 1 0 Feb 13 ? 0:01 /usr/sbin/stm/uut/bin/tools
root 25347 1 0 Mar 7 ? 1:31 /openedge/dlc/bin/_mprshut
root 2353 1 0 Feb 13 ? 0:50 /usr/sbin/stm/uut/bin/tools
oracle 3576 1 0 Feb 13 ? 0:27 /u05/app/oracle/product/10.
savinie 18317 18305 0 13:01:46 pts/tf 0:00 /bin/sh /mfgpro/scripts/eb2
root 2439 1 0 Feb 13 ? 0:13 /usr/sbin/stm/uut/bin/tools
. . .