You are not logged in.

#1 2007-06-13 13:25:25

ravisghosh
Member
From: Intergalactic Spaces
Registered: 2006-10-12
Posts: 517
Website

Htop displays several lines for single app

Htop shows multiple lines for a single process with different or similar values of memory and cpu usage. I could not find anything in setup or on www to make htop display one app in one line only as it is in top. I am unable to understand the exact memory and cpu usage in htop. Could anyone please give some guidance in either understanding htop or changing its display to one app-one line kind of way.

Last edited by ravisghosh (2007-06-13 13:25:54)

Offline

#2 2007-06-13 14:36:30

ArchPad
Member
Registered: 2007-03-26
Posts: 81

Re: Htop displays several lines for single app

The apps displayed are 100% identical? Maybe what you're seeing are similar or associated processes.

Offline

#3 2007-06-13 14:36:31

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Htop displays several lines for single app

It shows threads. According to man, K and H should trigger showing of kernel and userspace threads respectively.

-edit-

There's an option in setup (f2) to hide those threads too, if K/H doesn't work.

Last edited by lucke (2007-06-13 14:38:40)

Offline

#4 2007-06-13 14:50:39

ravisghosh
Member
From: Intergalactic Spaces
Registered: 2006-10-12
Posts: 517
Website

Re: Htop displays several lines for single app

ya, K/H option is not working. However, selecting the option in setup works. Still there are few apps which are shown in 3 lines, like

/usr/bin/mpd /etc/mpd.conf
/usr/bin/mpd /etc/mpd.conf
/usr/bin/mpd /etc/mpd.conf

Offline

#5 2007-06-13 15:01:01

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Htop displays several lines for single app

Does "ps ax | grep mpd" show it thrice too?

Offline

#6 2007-06-13 15:22:27

ravisghosh
Member
From: Intergalactic Spaces
Registered: 2006-10-12
Posts: 517
Website

Re: Htop displays several lines for single app

yeh it does.

Offline

#7 2007-06-13 15:35:00

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Htop displays several lines for single app

Then apparently you have three instances of mpd running.

Offline

#8 2007-06-14 18:08:41

ravisghosh
Member
From: Intergalactic Spaces
Registered: 2006-10-12
Posts: 517
Website

Re: Htop displays several lines for single app

how is that possible. Only one mpd is in rc.conf.

Offline

#9 2007-06-14 21:08:50

lloeki
Member
From: France
Registered: 2007-02-20
Posts: 456
Website

Re: Htop displays several lines for single app

certainly it (pre)forks so as to handle multiple clients. is the number of mpd equal to the number of client connections + 1 ? see also if there's a 'child' setting in mpd.conf


To know recursion, you must first know recursion.

Offline

#10 2007-06-14 22:56:00

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Htop displays several lines for single app

Try hitting 't', it will make more sense in a tree-based layout.

Offline

#11 2007-06-15 02:57:48

ravisghosh
Member
From: Intergalactic Spaces
Registered: 2006-10-12
Posts: 517
Website

Re: Htop displays several lines for single app

in tree view, 3 mpd lines appear something like this

`- /usr/bin/mpd /etc/mpd.conf
     `- /usr/bin/mpd /etc/mpd.conf
          `- /usr/bin/mpd /etc/mpd.conf

All 3 have different mem and cpu values. Does it mean that the latter 2 are child processes?

Also, i htop shows

hald-addon-keyboard: listening on /dev/input/event1
hald-addon-keyboard: listening on /dev/input/event2
hald-addon-keyboard: listening on /dev/input/event3

Does that mean that my box is set up for 3 keyboards and I am wasting system resources!!!

Last edited by ravisghosh (2007-06-15 03:03:29)

Offline

#12 2007-06-15 14:02:21

lloeki
Member
From: France
Registered: 2007-02-20
Posts: 456
Website

Re: Htop displays several lines for single app

/dev is handled by udev and nodes are created as needed, so you certainly have 3 keyboard-like devices (mouse with special buttons, special keyboard, etc...). nothing to worry, because it doesn't use much resources.

as for mpd, I think there's:
1. the parent, which listens to incoming connections
2. the child, forked on each connection
3. the subchild, forked from the child
I believe 2 and 3 handle different things: eg one handles decoding/playing audio (certainly 3) and the other handles connection to the client (listening to commands, like play pause etc...)

Last edited by lloeki (2007-06-15 14:07:30)


To know recursion, you must first know recursion.

Offline

#13 2007-06-15 14:07:57

ravisghosh
Member
From: Intergalactic Spaces
Registered: 2006-10-12
Posts: 517
Website

Re: Htop displays several lines for single app

I have a 3 button generic mouse and a 104-key generic keyboard.

Offline

#14 2007-06-15 16:49:05

lloeki
Member
From: France
Registered: 2007-02-20
Posts: 456
Website

Re: Htop displays several lines for single app

if you want, use:

udevinfo --query=path --name=/dev/input/event0

then with the resulting sysfs path

udevinfo --query=all --attribute-walk --path=/class/input/input0/event0

to get an idea of what they are corresponding to.

on mine these are unused (except the actual keyboard) ps/2 ports on the ps/2 chip.

Last edited by lloeki (2007-06-15 16:49:30)


To know recursion, you must first know recursion.

Offline

Board footer

Powered by FluxBB