Currently allocated Proc32 pids

I need to know how many Proc32 pids are currently allocated in my QNX
4.25 box (processes, proxies, vids).

“sin info” tell me only the total available pids number, and not the
currenty allocated or free ones.

Is “qnx_psinfo()” iteranting on all the possible pid number the right
way?

Davide


/------------------------------------------------------------

  • Davide Ancri - Prisma Engineering
  • email = davidea AT prisma DASH eng DOT it
    ------------------------------------------------------------/

Davide <doesnot@exist.spam> wrote:

I need to know how many Proc32 pids are currently allocated in my QNX
4.25 box (processes, proxies, vids).

“sin info” tell me only the total available pids number, and not the
currenty allocated or free ones.

Is “qnx_psinfo()” iteranting on all the possible pid number the right
way?

Yup.

There are a couple of utilities that do this sort of thing already,
I think. Try:

ftp.qnx.com:/usr/free/qnx4/os/utils/misc/os_info.tgz
ftp.qnx.com:/usr/free/qnx4/os/utils/misc/sysres.gz

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Davide <doesnot@exist.spam> wrote:

I need to know how many Proc32 pids are currently allocated in my QNX
4.25 box (processes, proxies, vids).

“sin info” tell me only the total available pids number, and not the
currenty allocated or free ones.

Is “qnx_psinfo()” iteranting on all the possible pid number the right
way?

Yes, qnx_psinfo() will eventually iterate through all pids.
Be aware that there are three kids of pids:
regular processes
proxies
virtual circuits
Each qnx_psinfo() querry will return either:
the requested pid, or
the next higher numbered one, or
an error when you hit the end of the list

NOTE: If your iterating through the list and a new processes is created
with a lower pid than what your currectly searching (i.e. you already
passed it) you’ll will miss it.


Bill Caroselli – Q-TPS Consulting
1-(626) 824-7983
qtps@earthlink.net

Thanx to all for support!

Davide


/------------------------------------------------------------

  • Davide Ancri - Prisma Engineering
  • email = davidea AT prisma DASH eng DOT it
    ------------------------------------------------------------/