1

When issue the command htop on my RHEL5 box I get a normal view, however when I scroll down I have several "blank" command ranges as can be seen here:

enter image description here

Can someone explain me how this happens/occurs?

Update:

my .htoprc file:

# Beware! This file is rewritten every time htop exits.
# The parser is also very primitive, and not human-friendly.
# (I know, it's in the todo list).
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=46
sort_direction=1
hide_threads=0
hide_kernel_threads=1
hide_userland_threads=0
shadow_other_users=0
show_thread_names=0
highlight_base_name=0
highlight_megabytes=1
highlight_threads=0
tree_view=0
header_margin=1
detailed_cpu_time=0
color_scheme=0
delay=15
left_meters=AllCPUs Memory Swap
left_meter_modes=1 1 1
right_meters=Tasks LoadAverage Uptime
right_meter_modes=2 2 2
HopelessN00b
  • 53,795
  • 33
  • 135
  • 209
timmeyh
  • 968
  • 1
  • 6
  • 25
  • I meet this problem. ps -e show this PIDs as kernel threads. For example 2 migration/0 3 ksoftirqd/0 4 watchdog/0 ... – mmv-ru Nov 20 '14 at 12:27

2 Answers2

1

Should be in .config/htop/htoprc or something similar.

I'd say you have this line in your config file

shadow_other_users=1

You should put it at 0. Otherwise if you start htop with your user it will shadow other users' processes. Can you please post your htoprc file if this doesn't work?

Pierre-Alain TORET
  • 1,254
  • 8
  • 14
  • Hi, it already was set to 0. I've updated the post with the htoprc file which was located in /root/.htoprc – timmeyh Apr 24 '14 at 08:27
  • I see, under which user do you run htop ? Can you see other processes other than init ? Did it work good already or is the problem there since the beginning ? – Pierre-Alain TORET Apr 24 '14 at 08:37
  • I run htop as the root user. This didn't happen in the begin. I can still see other processes with normal output. Because this are low pids I think they are some kernel threads that have gone wrong. I also aknowledge that an uptime of 1024 days may have something to do with it. – timmeyh Apr 24 '14 at 08:55
  • Ah, that's true, that could happen. The only parameter I know I gave you, so good luck now. – Pierre-Alain TORET Apr 25 '14 at 14:46
1

I found that for Red Hat EL 5 and htop 1.0.3 I had to make the following code change to get the command to show up for root processes. I did not need to make this changes to Red Hat 6 EL.

--- Process.c   2014-01-01 12:00:00.000000000 -0400
+++ Process.c.patched   2014-01-01 12:00:00.000000000 -0400
@@ -52,7 +52,7 @@
 #define PROCESS_FLAG_CGROUP 16

 #ifndef Process_isKernelThread
-#define Process_isKernelThread(_process) (_process->pgrp == 0)
+#define Process_isKernelThread(_process) (_process->pgrp == 1)
 #endif

 #ifndef Process_isUserlandThread
Luke
  • 11
  • 1