CPU usage, process bind
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > CPU usage, process bind




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    CPU usage, process bind  
jagpreet


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-19-07 12:31 PM

Hi There,
I have written a script which shows the status of the running
application.
shows mem usage, cpu no. , pid etc.

used ps -efl to get that information.

ps -efl |grep $MY_PROCESS |grep -v "grep" | awk '{printf("%9s %19s
%18s %11s",$6,$4,$12,$10)}'

I want to add CPU usage as well for each process of that application.

But thats option is not available in HP-UX.(ps -efo  which I find on
net after googling)
can I use something else(like top, again googling).

But top is not helping me much for the same.

what are the options I can use.


Further, is there a way to know the processors(cpu#) available on
perticular server. and is there a way to distribute the processes
among them.(pbind is not available in HP-UX).

regards
Jagpreet






[ Post a follow-up to this message ]



    Re: CPU usage, process bind  
Don Morris


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-19-07 06:27 PM

jagpreet wrote:
> Hi There,
>   I have written a script which shows the status of the running
> application.
> shows mem usage, cpu no. , pid etc.
>
> used ps -efl to get that information.
>
> ps -efl |grep $MY_PROCESS |grep -v "grep" | awk '{printf("%9s %19s
> %18s %11s",$6,$4,$12,$10)}'
>
> I want to add CPU usage as well for each process of that application.
>
> But thats option is not available in HP-UX.(ps -efo  which I find on
> net after googling)

Um, say what?

http://docs.hp.com/en/B2355-90690/ps.1.html

(start quote)

-l

Show columns flags, state, uid, pid, ppid, cpu, intpri, nice, addr, sz,
wchan, tty, time, and comm, in that order.

(end quote)

Maybe the order is different from what you expect (my awk skills are
non-existent) -- but ps -efl most definitely produces output that
includes CPU time:

401 S     root 15583 15582  0 154 20 e00000015d617b00  133
e00000015eb4bb68  Sep  7  pts/tc    0:00 ksh

(sample from an rx2600, r11.31... pretty much idle, hence no significant
time).

> can I use something else(like top, again googling).
>
> But top is not helping me much for the same.
>
> what are the options I can use.
>
>
> Further, is there a way to know the processors(cpu#) available on
> perticular server. and is there a way to distribute the processes
> among them.(pbind is not available in HP-UX).

man pstat_getdynamic() or http://docs.hp.com/en/B2355-90693/pstat.2.html
(See Example 2 where they in fact get information on each processor).

The OS itself will distribute processes among them based on load
balancing. If you need/want to override that or adjust it, mpsched
should do it [man 1 mpsched].

Don





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:40 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register