tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: "Eric Wyn Jones (01248-382407)" <e.w.jones () bangor ! ac ! uk>
To: tru64-unix-managers
Subject: Can anyone help with the table call ?
Date: Wed, 23 Apr 1997 09:10:37 +0000	[thread overview]
Message-ID: <96078611110608.tru64-unix-managers.marc@archive.invalid> (raw)


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 |                                         |
 -----------------------------------------------------------------------

                 reply	other threads:[~1997-04-23  9:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

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