Visit Our UNIX and Linux User Community


Identifying RF users


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Identifying RF users
# 1  
Old 03-10-2008
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!
# 2  
Old 03-10-2008
By ghost do you mean a zombie? Or do the sessions sit and wait for a blocked read request forever and ever?
# 3  
Old 03-10-2008
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.
# 4  
Old 03-10-2008
If they are zombie processes the ps -ef command will show them as a zombie. You can grep for that.

Code:
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?
# 5  
Old 03-10-2008
Otherwise you will need to resort to the fuser (or lsof) command to see all processes that have certain data file(s) open.
# 6  
Old 03-10-2008
Quote:
Originally Posted by jim mcnamara
If they are zombie processes the ps -ef command will show them as a zombie. You can grep for that.
Code:
ps -ef | grep zombie

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

Quote:
Originally Posted by jim mcnamara
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?
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.
# 7  
Old 03-10-2008
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
. . .

Previous Thread | Next Thread
Test Your Knowledge in Computers #200
Difficulty: Easy
Larry Wall began work on Perl in 1977.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Identifying a process

morning, i introduce the following sentence: "sudo lsof -i | grep smtp" ang get a list of the processes. two of them i don't know what is the function: 29574 & 29575, with the following indication: "memo" the rest of the processes shown are smtpd. i kill these two processes and they disappear,... (4 Replies)
Discussion started by: brijan007
4 Replies

2. Shell Programming and Scripting

Identifying .log files

Hi. Is there a way to: 1) produce a listing of .log files 2) older than 5 years of age 3) that includes the full path and filename together with one file per line Any help producing such a script would be very helpful. Thanks. (7 Replies)
Discussion started by: buechler66
7 Replies

3. Shell Programming and Scripting

Create multiple users with individual passwords to users

hi, i am new to shell scripts i write a shell script to create multiple users but i need to give passwords to that users while creating users, command to write this script (1 Reply)
Discussion started by: DONFOX
1 Replies

4. Shell Programming and Scripting

Identifying the file completion

Hi, A script is running for multiple databases so data is also being populated for multiple DBs in a.txt file. I need to rename this file once all the data is populated. Kindly suggest me How can I check once file is populated completely before renaming? Thanks in advance. (3 Replies)
Discussion started by: ravigupta2u
3 Replies

5. UNIX for Dummies Questions & Answers

Identifying the first line that has zeros

If I have a file like: 9350. 0.288426 9370. 0.320469 9390. 0.394475 9410. 0.353157 9430. 0.336001 9450. 0.336692 9470. 0.356827 9490. 0.359891 9510. 0.346305 9530. 0.356506 9550. 0.348306 9570. 0.36832 9590. 0.379067 9610. 0.0246704 9630. 0 9650. 0 9670. 0 (5 Replies)
Discussion started by: cosmologist
5 Replies

6. Solaris

To restrict the users not to change the passwords for NIS users

Hi All, How to restrict the NIS users not to change their passwords in for NIS users?? and my NIS user is unable to login to at client location what could be the problem for this ? Any body can help me. Thanks in advance. (1 Reply)
Discussion started by: Sharath Kumar
1 Replies

7. Shell Programming and Scripting

identifying duplicate entries

hi all, have got a large log file and was wondering if there is a easy way on solaris box to grep out duplicate entries based on email address ?? sample log file : 2010-06-19,04:08:12,235632470,2010-06-18T00:00:00.000+12:00,zinny123@hotmail.com... (2 Replies)
Discussion started by: cesarNZ
2 Replies

8. UNIX for Advanced & Expert Users

Identifying IO without the use of IOTop

Hey, I'm in the process of working on a script to identify IO usage on a high IO server I have setup (Debian Etch). My question is how can identify specific processes that are using much of these resources, I can identify the processes using IOTOP, but doing it remotely via script can be a pain... (1 Reply)
Discussion started by: dnbert
1 Replies

9. Solaris

How to identifying the network card ?

Hi Experts, Can we use some command from unix to find the available network interface? I did tried Its listing following, however how can I decide the which vender card is attached e.g. if its hme , bge or some thing else Thanks (7 Replies)
Discussion started by: kumarmani
7 Replies

10. Solaris

Identifying new fields of data

i have hundreds of lines of formatted data with 10 different fields per line. the data is refreshed every few minutes and some fields in some lines may reflect new data. i'm looking for a sample of code that help me to identify those new fields so that i can write them to a file to indicate that... (0 Replies)
Discussion started by: davels
0 Replies

Featured Tech Videos