fix for lock.info

Bob Stockler bob at trebor.iglou.com
Thu Oct 5 10:10:10 PDT 2006


You must not have the latest version of lock,info.

 lock.info - v01.00.09 - report info re filePro file locks

Here, this version returns:

   filePro File: fpcust
  Record Number: 14
           User: bob
            TTY: ttyp1
            PID: 13100
        Command: /u/appl/fp/dclerk

Bob

Richard D. Williams wrote (on Tue, Oct 03, 2006 at 03:17:03PM -0500):

| I don't know if anyone else has fixed this already, but I have noticed 
| when I run the lock.info script it always lists filepro as the user.  
| This makes it difficult to determine who really has a record locked.  I 
| have added this line to the script and I find it works well.
| 
|   # Get the user names, ttys and commands being executed:
|   for i in $I
|   do # Get user name, tty & command for the process holding the lock:
|      eval $( $PS -ef |
|        $AWK -v PID="${PID[i]}" '
|          $2 == PID { print "USER=" $1 ; print "TTY=" $6
|                      $1 = $2 = $3 = $4 = $5 = $6 = $7 = "" ; sub(/^[ 
| \t]+/,"")
|                      print "CMD=\"" $0 "\"" }' )
|      # Print the results:
| 
| USER=`w | grep $TTY | awk '{print $1}'`
| 
|      $ECHO "
|   filePro File: $PFNAME
|  Record Number: ${REC_NUM[i]}
|           User: $USER
|            TTY: $TTY
|            PID: ${PID[i]}
| 
| Richard D. Williams

| _______________________________________________
| Filepro-list mailing list
| Filepro-list at lists.celestial.com
| http://mailman.celestial.com/mailman/listinfo/filepro-list


-- 
Bob Stockler  +-+  bob at trebor.iglou.com  +-+  http://members.iglou.com/trebor


More information about the Filepro-list mailing list