tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* Can anyone help with the table call ?
@ 1997-04-23  9:10 Eric Wyn Jones (01248-382407)
  0 siblings, 0 replies; only message in thread
From: Eric Wyn Jones (01248-382407) @ 1997-04-23  9:10 UTC (permalink / raw)
  To: tru64-unix-managers


Hello,
       I'm trying to use the table system call to get a list of
processes ( home brew ps -A)

According to the man page for table :-
  ...
  The table() interface returns a count of the elements examined or updated. 
  The id TBL_PROCINFO allows you to determine the actual number of elements 
  in a table before requesting any data; call table() with lel set to zero 
  (0) and nel to the maximum positive integer. 
  ...


  The following returns the value 4096 on my Alpha 2100 running DU 4.0B

        n=table(TBL_PROCINFO,0,(char *)0 ,1073741823 , 0 ); 
        if (n == -1) { 
                perror("table error"); 
                exit(1); 
        } 

  However it seems the entries in this table are indexed by pid and some
  pids are greater than 4096.  In fact I can call table with indices up
  to 32767 without getting an error return and I get information returned
  for entries > 4096 .

  So my question is :- Is the first call to table to get number of elements
   incorrect or what ?


 -----------------------------------------------------------------------
| Eric Wyn Jones,             |                                         |
| Information Services,       |                                         |
| University of Wales, Bangor |                                         |
 -----------------------------------------------------------------------

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-04-23  9:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-04-23  9:10 Can anyone help with the table call ? Eric Wyn Jones (01248-382407)

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