# The KTop Handbook

Chris
Schläger

    cs@axys.de

04/02/1999
0.09.09

This Handbook describes KTop Version 0.9.9

KDE
KTop
process monitor
top
ps

## Introduction

### About KTop

KTop is the KDE Task Manager. It displays the processes running on computer in list and tree form. Processes can be killed and various other signals can be send to specific processes. It also features a processor load and memory usage monitor.

### Authors

KTop is currently developed and maintained by Chris Schläger cs@axys.de. In the past several other people have worked on KTop:

- A. Sanda <alex@darkstar.ping.at>

- Ralf Mueller <ralf@bj-ig.de>

- Bernd Johannes Wuebben <wuebben@math.cornell.edu>

- Nicolas Leclercq <nicknet@planete.net>

The porting to other platforms than Linux was done by:

- FreeBSD: Hans Petter Bieker <zerium@traad.lavvu.no>

### License and Warranty

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

## Installation

### How to obtain KTop

KTop is part of the KDE project http://www.kde.org. KTop can be found on ftp://ftp.kde.org/pub/kde/, the main ftp site of the KDE project.

### Requirements

In order to successfully compile KTop, you need the KDE 1.x and Qt 1.4x. All required libraries as well as KTop itself can be found on ftp://ftp.kde.org/pub/kde/.

At the moment the following flavors of UNIX are supported:

Linux 2.x

  For KTop to work it is necessary to compile the Linux-Kernel with the /proc-Filesystem enabled. This is the default setting and most Linux-Distribution have it already.

FreeBSD

  The KTop program needs to be owned by the kmem group and needs to have the setgid bit set.

Support for other platforms is in preparation. Your help is greatly appreciated.

### Compilation and installation

In order to compile and install KTop on your system, type the following in the base directory of the KTop distribution:

    % ./configure
    % make
    % make install

Should you run into problems please report them to the KDE mailing lists.

### Installing the Task Manager Icon/Performance Meter in the KDE panel

It is possible to add the Task Manager to the panel. Simply use the Start Menu/Panel/Add Application Menu to do so. If you have the xload program installed you will see a performance history display instead of the KTop icon. Clicking on the icon or performance meter will start the Task Manager.

## Using the KDE Task Manager

After you have started the Task Manager you will see a dialog box with three pages. You can change to other pages by clicking on the handle of the pages. The start-up page can be configured in the options dialog available from the menu.

### The Process List Page

The Process List Page gives you a list of processes on your system. The list can be sorted by each column. Just press the left mouse button over the head of the column.

The list shows the following information about each process. Please note that not all properties are available on every operating system.

- PID The process ID. A unique number for each process.

- Name The name of the executable that started the process.

- User ID The login name of the user that started the process.

- CPU The processor load of the process in percent.

- Time The total computation time of the process so far.

- Nice The scheduling priority.

- Status The process status.

- Memory The total amount of memory (in kBytes) the process uses. This includes shared memory.

- Resident The amount of physical memory (in kBytes) the process uses.

- Shared The amount of memory (in kBytes) the process shares with other processes.

Underneath the table you find four buttons which will be described now from left to right.

#### The Refresh Rate

The refresh rate determines how often the process list will be updated. This is particularly important for the calculation of the processor load of each process. The load is averaged over the whole time between updates. A slow, a medium and a fast update rate is available. For most purposes the medium rate is a good compromise.

#### The Process Filter

The Process Filter can be used to reduce the number of processes displayed in the table. You can filter out processes you are not interested in. Currently you can display all processes, system processes only, user processes only or your processes only.

#### The Refresh Button

This button can be used to force an immediate update of the process list.

#### The Kill Button

If you want to terminate a process you can send a kill signal to the selected process by pressing this button.

### The Process Tree Page

The Process Tree Page has been designed to show the relationships between the running processes. A process that is started by another process is called the child of that process. A tree is an elegant way to show this parent-child relationship. The init process is the ancester of all processes.

If you are not interested in the children of a particular process you can click on the little box to the left of the parent and the subtree will collapse. Another click on that box will unfold the subtree again.

This page features four buttons to modifiy the tree. The buttons are described from left to right.

#### The Sort Button

This button determines the sorting order of the children in the tree.

#### The Refresh Now Button

The Refresh Now Button must be used to update the tree with the current processes.

#### The Change Root Button

If you are only interested in a certain subtree you can selected the parent of the subtree and push this button to make the selected process the new root of the tree. Pressing this button when no process is selected will restore the initial setting.

#### The Kill Button

If you want to terminate a process you can send a kill signal to the selected process by pressing this button.

### The Performance Meter Page

The Performance Meter Page provides two meters that show the overall processor load and the total memory used by the system. The red line in the memory history is the separation between physical memory (RAM) and swap space memory. Most Unixes try to minimize the accesses to the hard disk by caching files in memory. Therefore it is normal to always have almost the whole physical memory in use. This is not necessarily a sign of excessive memory use by certain programs but a sign of good caching strategies. Due to the very misleading nature of this meter I am planning to change it in one of the next versions to be more meaningful.

### Pop-up Menus

Clicking with the right mouse button on a process in the process list or process tree will pop-up a little menu that allows you to send certain signals to this process or change it's scheduling priority. The latter is not available on all operating systems. Changing the priority will affect the amount of CPU time the process will receive to do it's job. As a normal user you can usually only increase the value which will decrease the priority. The higher the value the less likely the process will get CPU time. This can be used on systems that are shared by many people. Longer running jobs (batch jobs) should be "reniced" to preserve a short response time for interactive processes.

## Questions and answers

Nothing here yet!