Operating System - HP-UX
1832907 Members
3610 Online
110048 Solutions
New Discussion

Re: process performance shell

 
chin hyeon jung
Advisor

process performance shell

I had made advise shell and got the process CPU % and MEM util
But I want to make this shell into interactive shell(First askinf me the process then I reply the process name and then show me utilization using looping )
Do you hane any good shell?
#cat perf_test
glance -iterations 1 -adviser_only -syntax adv_pcpu -maxpages 1 >res
#cat adv_pcpu
print "------------- CHECKING TIME -------------",gbl_stattime
print " CPU_util MEM_util "
print "------------------------------------------------"
COUNT=0
process loop {
COUNT=COUNT+1
if (COUNT==1) then
print gbl_cpu_total_util|15, gbl_mem_util|25

}
print " "

1 REPLY 1
Steven Sim Kok Leong
Honored Contributor

Re: process performance shell

Hi,

If this works like a normal shell program, then perhaps you can do something like this:

========================================
echo -e "Enter the process in question\c"
read my_process
while [ "$my_process != "quit" ]
do
# insert your commands here with $my_process as a parameter value
echo -e "Enter the process in question\c"
read my_process
done
========================================

Hope this helps. Regards.

Steven Sim Kok Leong