TOP command usage


I want to know the status of the Process (i.e our code) running in QNX.

I am using top command as top -i 1 >1.txt to execute the process but it gives detail of other process and not the one i have started(our code).

Why is this happening?

With Hogs command i am able to get the display of cpu usage of (our code) on the screen,but when i am redirecting it to the file its not working .R there any iteration option available to this command so that we can come out of the loop

Amit negi

I’ve never used the “top” command on QNX before. It’s not on my 6.3.2 system. Maybe it’s on 6.5? The answer in to your question would seem to be in the nature of “top”. Isn’t it possible that your process is not one of the top processes?

“hogs” doesn’t seem to have a one shot option. That seems like an obvious oversight. Maybe you should try to obtain the source and remedy that.

There is a torrent file out there somewhere of some 2009 QNX source, which includes the source to top and hogs, FYI.