Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
* File and record locks
@ 2002-07-08 15:51 Nims
  2002-07-09  6:56 ` Emmanuel Choquet
  2002-07-09 14:21 ` Stephen Carpenter
  0 siblings, 2 replies; 3+ messages in thread
From: Nims @ 2002-07-08 15:51 UTC (permalink / raw)


Hi,
I'm in a real difficult position - no-one so far has been able to help.
Using a Tru64 platform DECALPHA with 8 Gbytes of  RAM

shm-max is set to 2 Gbytes and all the other kernel paremters are set
sensibly...

can anyone out there think of areason why the folloing system messgae may
appear:

        Can't obtain file/record lock

more importnatly does anyone know of a toll that does the same as "glance"
on HP?

many thanks in advance,

Naeem




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: File and record locks
  2002-07-08 15:51 File and record locks Nims
@ 2002-07-09  6:56 ` Emmanuel Choquet
  2002-07-09 14:21 ` Stephen Carpenter
  1 sibling, 0 replies; 3+ messages in thread
From: Emmanuel Choquet @ 2002-07-09  6:56 UTC (permalink / raw)


"Nims" <naeem_ali<no-spam>@adc.com> wrote in message news:<1026143512.25156.0.nnrp-12.c246a78e@news.demon.co.uk>...
> Hi,
> I'm in a real difficult position - no-one so far has been able to help.
> Using a Tru64 platform DECALPHA with 8 Gbytes of  RAM
> 
> shm-max is set to 2 Gbytes and all the other kernel paremters are set
> sensibly...
> 
> can anyone out there think of areason why the folloing system messgae may
> appear:
> 
>         Can't obtain file/record lock
> 
> more importnatly does anyone know of a toll that does the same as "glance"
> on HP?
> 
> many thanks in advance,
> 
> Naeem

You do not mention if this message appears on stderr for some exe file
you're running, or on /dev/console.

if it comes from an exe file, try dbx or ladebug or within  some
syscall, install 'truss' command, which is in system V extension
subsets, somewhere in the associated products CDs

running your command with truss - and right command options- will
trace every syscall, with parameters. then you'll see probably the
culprit.


You're using ipc, therefore try to monitor semaphores as well with
ipcs -a. if you see some saturation, have a look in sysconfig -q ipc
to see your semaphore limits (man sys_attrs_ipc for details)

Cheers,


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: File and record locks
  2002-07-08 15:51 File and record locks Nims
  2002-07-09  6:56 ` Emmanuel Choquet
@ 2002-07-09 14:21 ` Stephen Carpenter
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Carpenter @ 2002-07-09 14:21 UTC (permalink / raw)


To look at the # of file/record locks in use try compiling and running 
this program:


/*
  * Show the number of record locks configured on a system
  *
  * This program should be run set group-id kmem
  */

#include <stdio.h>
#include <nlist.h>
#include <sys/types.h>
#include <sys/fcntl.h>
#include <sys/flock.h>


/*
  * Define the name lists were are interested in
  */
struct nlist name_list[] = {
   { "_flckinfo" },
   { 0 }
};


void
main ()
{
   int kmem;
   struct flckinfo lock_info;

   kmem = open ("/dev/kmem", 0);

   /*
    * Get the kernel name list
    */
   nlist ("/vmunix", name_list);

   /*
    * Read the value of flckinfo
    */
   lseek (kmem, (off_t) name_list[0].n_value, 0);
   read (kmem, &lock_info, sizeof (struct flckinfo));

   /*
    * Print out the lock information
    */
   printf ("Max records locked       =  %d\n", (int) lock_info.recmax);
   printf ("Max files locked         =  %d\n", (int) lock_info.filmax);
   printf ("Lock records in use      =  %d\n", (int) lock_info.reccnt);
   printf ("File headers in use      =  %d\n", (int) lock_info.filcnt);
   printf ("Total lock records used  =  %d\n", (int) lock_info.rectot);
   printf ("Total file headers used  =  %d\n", (int) lock_info.filtot);
}




On a V5.x box to see the number of record locks configured run:

# sysconfig -q vfs nlock_record
vfs:
nlock_record = 10000


Use sysconfigdb or dxkerneltuner to change the nlock_record parameter.


Regards,

Stephen Carpenter



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-07-09 14:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-08 15:51 File and record locks Nims
2002-07-09  6:56 ` Emmanuel Choquet
2002-07-09 14:21 ` Stephen Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox