1834149 Members
2428 Online
110064 Solutions
New Discussion

Re: Global Run Queue

 
OneNeck UNIXSA
Frequent Advisor

Global Run Queue

Is there a way to list processes that reside in the global run queue?
6 REPLIES 6
George A Bodnar
Trusted Contributor

Re: Global Run Queue

Not sure this is what you want, but this shows you runnable processes:

(export UNIX95=""; ps -eo pid,state,args | grep " [R] ";)
OneNeck UNIXSA
Frequent Advisor

Re: Global Run Queue

I can use ps -efl to see states, was looking more at which processes were in the run queue. Thanks for the input though.
Martin Johnson
Honored Contributor

Re: Global Run Queue

George's way is thje only way I know how to determine who's waiting to run.

You understand that the Global run queue is a moving target. The entries are constantly changing the the processes move through the queue.

Is there something in particular that you are looking for?

HTH
Marty
OneNeck UNIXSA
Frequent Advisor

Re: Global Run Queue

I was looking for a way to identify the processes in the run queue when MWA makes and alert. Currently I use ps -efl and look for the running and waiting processes, but this doesn't seem to show the information that was looking for. I have mwa setup to alert such as:
Global CPU Utilization = 66.33%
Global CPU System Mode Util should be < 50 = 38.21%
Global CPU Interrupt Util should be < 30 = 0.85%
Global CPU Context Switching Util should be < 30 = 1.79%
Global Priority Queue should be < 3 = 0.24
Global Run Queue should be < 3 = 19.00
Detected on 08/15/02 at 07:00

and just wanted to get the threshold and any extended data. Just tweaking. :)
Martin Johnson
Honored Contributor

Re: Global Run Queue

I alert on a combination of CPU and global run queue:

symptom CPU_Bottleneck type=CPU
rule GBL_CPU_TOTAL_UTIL > 90 prob 35
rule GBL_CPU_TOTAL_UTIL > 95 prob 25
rule GBL_CPU_TOTAL_UTIL > 98 prob 15
rule GBL_CPU_TOTAL_UTIL > 100 prob 8
rule GBL_RUN_QUEUE > 2 prob 10
rule GBL_RUN_QUEUE > 4 prob 15
rule GBL_RUN_QUEUE > 8 prob 25

alarm CPU_Bottleneck > 80 for 5 minutes
type = "CPU"
start
if CPU_Bottleneck > 90 then
red alert "CPU Bottleneck probability= ", CPU_Bottleneck, "%"
else
yellow alert "CPU Bottleneck probability= ", CPU_Bottleneck, "%"
repeat every 10 minutes
if CPU_Bottleneck > 90 then
red alert "CPU Bottleneck probability= ", CPU_Bottleneck, "%"
else
yellow alert "CPU Bottleneck probability= ", CPU_Bottleneck, "%"
end
reset alert "End of CPU Bottleneck Alert"

HTH
Marty
OneNeck UNIXSA
Frequent Advisor

Re: Global Run Queue

I think I am going to go with:

alarm (GBL_CPU_TOTAL_UTIL > 90) or
(GBL_CPU_SYS_MODE_UTIL > 50) and
(GBL_PRI_QUEUE > 3) or
GBL_RUN_QUEUE > 4) for 5 minutes

Still looking for a way to list the run queue though. :)

Previously my and was an "or".