frivolous question about ps, yasp plasmoid, grsec kernels

I have this yasp plasmoid on my desktop and the ps command it uses or the kernel or sort is causing problems with the desired display, any help would be appreciated.
So I will show the screen shot first and the non-desired display is the “migration/xx” listings in the CPU% heading.

http://paste.opensuse.org/view/download/95924806

so this great yasp plasmoid has this ps command that collects the information and then it is displayed as shown above. I believe yasp can execute and display any linux terminal command but this is what is used now.

cmd="ps -Ao pcpu,comm --cols 23 | sort -nr | head -8"

Question, is there a way to get rid of the “migration/xx” listing in the plasmoid by altering the ps command used or a simple pipe of some sort?

Next question, while researching this problem I came across a post where ****cPanelTristan ****suggested the following:

grsec kernels apparently show a high number of migration processes as part of the kernel. You should likely discuss this with your host and possibly using a different kernel if you do not wish to see these processes.

Is this some sort of kernel enabled process that openSUSE uses and is there a way to turn it off without a re-compile?

You’re jumping on two legs. The one leg -simply avoiding the 2 items to be displayed- is not the way to go. If these processes run the way they do, they should be displayed like that, otherwise the plasmoid would display absolute nonsense. The second leg is the one you shoud jump on. These two processes make the system run at it’s max. If that’s a persisting situation, something’s wrong. But, before diving into that, rather start

top

and hit “1” (one) to show the info per cpu core.

I have looked at top and it does not display the same way. I am not entirely sure what these "grsec’ kernel processes are and why top does not report them or at least not in CPU%. They do show up as using a bunch of cpu time, I am not entirely sure what that is exactly.

http://paste.opensuse.org/view/download/44340454

Maybe this tells you more debian - ps shows that migration/* processes consume a lot of CPU, but top keep silence about them - Server Fault. I read that these migration processes are processes moving from on to another core. What’s said in the comment about ps is important. Even if the plasmoid refreshes, ps gives a snapshot of a single moment, top shows what’s going on. I’d prefer yakuake (a top down terminal app) and top to a plasmoid.

On 2013-01-28 21:26, anika200 wrote:
>
> I have looked at top and it does not display the same way. I am not
> entirely sure what these "grsec’ kernel processes are and why top does
> not report them or at least not in CPU%. They do show up as using a
> bunch of cpu time, I am not entirely sure what that is exactly.

They might show if you type “H” in top.

> [image: http://paste.opensuse.org/view/download/44340454]

Suggestion: that is just plain text, you can paste it here inside code
tags instead as a photo. It uses less resources.

Posting in
Code Tags - A Guide


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

lol! Yeah, I know about it and thank you for the warning. I got excited about the paste feature someone told me about, it does load slow.

@knurpht

Yes that looks like a similar deal, the one link leads to spam though. I will look around and see what I can find about the migration threads cpu thing.

Does anyone checking in here know how to Awk or Sed that part (migration/xx) out of the ps command listed above?

Take a look:
run top, in top, hit " f " , use the space bar to toggle all marked items except for %CPU and COMMAND, hit " q " and see what you have.
Then hit " l, t, m " to get rid of the summarizing headers if you like, next hit " W " to write a config file. Then hit " q " and restart top


 %CPU %MEM COMMAND                                                                                                                                           
 17,2  1,0 akonadi_googlec                                                                                                                                   
  4,3  3,7 virtuoso-t                                                                                                                                        
  3,0  3,7 kontact                                                                                                                                           
  1,7  0,7 Xorg                                                                                                                                              
  1,7  0,6 akonadiserver                                                                                                                                     
  1,7  2,5 mysqld                                                                                                                                            
  1,3  3,3 chromium                                                                                                                                          
  0,9  0,0 top                                                                                                                                               
  0,4  0,0 rcu_preempt                                                                                                                                       
  0,4  0,0 jbd2/sda1-8                                                                                                                                       
  0,4  0,1 dbus-daemon                                                                                                                                       
  0,4  2,8 plasma-desktop                                                                                                                                    
  0,4  0,7 nepomukservices                                                                                                                                   
  0,4  0,5 yakuake                                                                                                                                           
  0,4  0,6 synaptiks                                                                                                                                         
  0,4  0,4 kfilebox                                                                                                                                          
  0,4  2,9 chromium                                                                                                                                          
  0,4  2,9 chromium                                                                                                                                          
  0,4  2,7 chromium                                                                                                                                          
  0,4  0,6 akonadi_googlec                                                                                                                                   
  0,4  0,4 akonadi_agent_l                                                                                                                                   
  0,4  0,0 kworker/u:2                                                                                                                                       
  0,0  0,1 systemd                                                                                                                                           
  0,0  0,0 kthreadd                                                                                                                                          
  0,0  0,0 ksoftirqd/0                                                                                                                                       
  0,0  0,0 kworker/0:0H                                                                                                                                      
  0,0  0,0 kworker/u:0H                                                                                                                                      
  0,0  0,0 migration/0                                                                                                                                       
  0,0  0,0 rcuc/0                                                                                                                                            
  0,0  0,0 rcub/0                                                                                                                                            
  0,0  0,0 rcu_bh                                                                                                                                            
  0,0  0,0 rcu_sched                                                                                                                                         
  0,0  0,0 watchdog/0                                                                                                                                        
  0,0  0,0 watchdog/1                                                                                                                                        
  0,0  0,0 rcuc/1                                                                                                                                            
  0,0  0,0 ksoftirqd/1                                                                                                                                       
  0,0  0,0 migration/1                                                                                                                                       
  0,0  0,0 kworker/1:0H                                                                                                                                      
glosscomputer@laptop:/etc/sysconfig> top


 %CPU %MEM COMMAND                                                                                                                                           
  4,0  2,8 chromium                                                                                                                                          
  3,0  2,7 chromium                                                                                                                                          
  2,3  3,3 chromium                                                                                                                                          
  1,7  0,7 Xorg                                                                                                                                              
  1,3  1,8 chromium                                                                                                                                          
  0,7  0,0 kworker/u:0                                                                                                                                       
  0,3  0,0 rcu_preempt                                                                                                                                       
  0,3  0,0 kworker/0:1                                                                                                                                       
  0,3  2,8 plasma-desktop                                                                                                                                    
  0,3  0,5 yakuake                                                                                                                                           
  0,3  2,9 chromium                                                                                                                                          
  0,3  0,6 chromium                                                                                                                                          
  0,3  3,7 kontact                                                                                                                                           
  0,0  0,1 systemd                                                                                                                                           
  0,0  0,0 kthreadd                                                                                                                                          
  0,0  0,0 ksoftirqd/0                                                                                                                                       
  0,0  0,0 kworker/0:0H                                                                                                                                      
  0,0  0,0 kworker/u:0H                                                                                                                                      
  0,0  0,0 migration/0                                                                                                                                       
  0,0  0,0 rcuc/0                                                                                                                                            
  0,0  0,0 rcub/0                                                                                                                                            
  0,0  0,0 rcu_bh                                                                                                                                            
  0,0  0,0 rcu_sched                                                                                                                                         
  0,0  0,0 watchdog/0                                                                                                                                        
  0,0  0,0 watchdog/1                                                                                                                                        
  0,0  0,0 rcuc/1                                                                                                                                            
  0,0  0,0 ksoftirqd/1                                                                                                                                       
  0,0  0,0 migration/1                                                                                                                                       
  0,0  0,0 kworker/1:0H                                                                                                                                      
  0,0  0,0 watchdog/2                                                                                                                                        
  0,0  0,0 rcuc/2                                                                                                                                            
  0,0  0,0 ksoftirqd/2                                                                                                                                       
  0,0  0,0 migration/2                                                                                                                                       
  0,0  0,0 kworker/2:0H                                                                                                                                      
  0,0  0,0 watchdog/3                                                                                                                                        
  0,0  0,0 rcuc/3                                                                                                                                            
  0,0  0,0 ksoftirqd/3                                                                                                                                       
  0,0  0,0 migration/3          

Turns out this is pretty easy with sed, here I have removed the offending "migration and virtuoso lines.

lee@linux-r5rj:~> ps -Ao pcpu,comm --cols 23 | sort -nr | sed '/migration/,/virtuoso-t/d'  | head -8   5.0 plasma-desktop                                                                                   
 4.0 Xorg                                                                                             
 3.9 amarok                                                                                           
 1.2 chrome                                                                                           
 0.9 kwin                                                                                             
 0.5 nepomukservices                                                                                  
 0.4 chrome                                                                                           
 0.3 dolphin                                                                                          
lee@linux-r5rj:~>