		

		   Xps
         Process State Display for X

	        runs under 
           Linux 0.99 and higher
                   and
                 SunOS 4.x

===========================================================

Thomas Breitfeld
breitf@infotech.tu-chemnitz.de
University of Technology Chemnitz
Department of Information and Communication Technologies

===========================================================


SUMMARY

Xps is a tool for watching and observing Unix processes.
It continuously extracts all processes of the system and 
displays them in a X Window. The parent-child relations 
of the processes will be symboliced by lines connecting a 
parent with its childs. Xps shows you a lot of properties 
of each process and allows you to send signals to a specified 
process or a specified process group.  Additionaly there
is a process state recorder implemented. Using this recorder
you may find out and investigate short term events occuring 
to unix processes. 


REQUIREMENTS FOR USING XPS

Xps is a machine depent program because it uses kernel 
structures to get the desired process information. The module
which is responsible to do that is called 'getpst.c'.
Currently there are 2 available versions of this module:
	one for Linux 0.99 - 1.0.9
	another one for SunOS 4.x.

To compile and use xps you need the following components:
	one of the operation systems listed above
	X-Terminal Version 11 Revision 5
	ANSI-C Compiler (i.e. gcc)
	Library for X and XView Toolkit: X11, olgx, xview
	Library kvm (for SunOS only)

Xps was originally designed for the OpenLook window manager
'olwm'. It has got a special feature - 'the command frame
push pin'. Xps uses this push pin for command frame handling.
So best results in frame managing will be achived by using
this window manager, but this is not required. 


INSTALLATION

If you want to use Xps under Linux you have to compile the 
Linux kernel yourself because you need a bootimage with a 
symbol table. When this is done you must reboot the fresh
compiled kernel to run Xps. 

The Sun 'getpst'-module uses the kvm-library to access symbols in the
kernel. So you haven't to worry about such things. 

After unpacking the sources (uncompress xps.tar.Z; tar -xvf
xps.tar) run 'make config' to decide wether you want to compile
for Linux or SunOS. If this is finished type 'make' to build the
code.
If you want to use the automatic installation script you have
to copy all the xps files in the directory '/usr/local/packages/xps'
(best way to do that is copying the 'xps.tar' file to 
'/usr/local/packages' and then unpacking it). The command 
'make install' will copy the xps binary to the directory 'xps/bin'
and create a soft link to it in the directory '/usr/local/bin'.
The owner, group, and file attributes of the xps binary will be
changed too. Normally you must have superuser rights to execute 
'make install'

After you have installed the Linux version of Xps run 'xps -U'
to create the psdatabase.
The Sun version of Xps doesn't use a psdatabase yet, so you havn't
to do this step.

After installing new versions of operating systems it is most
likely necessary to recompile Xps and to recreate the psdatabase.


USAGE SUMMARY

To start Xps on your machine simply type 'xps' without any options.
All adjustments refering to the process filter, the properties frames, 
the recorder controlling and the graphic parameters can be done 
within the X window enviroment.
All known X options (see man X) will be processed. Especialy the
'-display' option is very usefull to observe a remote machine 
by redirecting the output to your local X-Display.
The following will shortly describe the main functions:

-View Menu: allows you to change some graphic parameters
	      Select an process icon by clicking on it to use 
	      the function 'Show childs' After you have activated
	      this mode only the clicked process and its childs
	      will be displayed. 'Show all' will disactivate this
	      function.
	      'Customize' gives you the posibility to choose
	      icon and font size. 
	      The point 'icon animation' refers to the window
	      manager icon displayed after closing the base frame
	      of xps. If you have very limited memory you should 
	      turn off this feature. Thus xps can be swaped out 
	      during its inactivated state.

-Control Button: main control entity of xps
	      The 'Xps Timer' is the interval timer for updateing
	      the Xps output. Its default value is 1 second.
	      The 'Xps Replay Timer' determines the replaying speed
	      of recorded sequences. 
	      The number of process state snapshots to be recorded is 
	      given in the field 'Number of Xps images to hold'.
	      All changes made must be applied by pressing 'GO'. 
	      The Recorder records continuously the last extracted
	      Xps images.
	      After stopping the recording (by pressing the Stop button)
	      it is possible to rewind and replay the recorded sequence.
	      Switching back to the regular mode can be done by 
	      pressing 'GO'.

-Action Menu: sending signals to processes or process groups
	      Before you can send a signal you have to select an
	      process by clicking on it. The menu item 'signal to 
	      process' sends the choosen signal to the selected 
	      process, the item 'signal to group' send the choosen 
	      signal to the process group of the selected process.
	      The items 'Hard Kill' and 'Soft Kill' are short forms
	      for 'SIGKILL' and 'SIGTERM' only. 

-Filter Button: adjusting the process filter.
	      This is used to scope the output of xps to processes 
	      with specified properties. Curently there are three
	      properties responsible for the filtering:
	      owner, tty and state. Only these processes which are 
	      matching all given properties will be displayed.

-Properties Button: This button will pop up an window with the 
	      main process properties. There are two other buttons 
	      at the bottom of this window. 'Resource Usage' will
	      show the recource Usage structure of the selected
	      process. 'Extended Information' includes priority, 
	      all available ID and signal information. 
	      A more detailed description of the process properties 
	      is given in the Xps documentation or refer to the
	      ps manual pages of your system.
	      	
	      
EXAMPLE PROGRAMS

In the directory 'samples' you can find some little demonstration 
programs. They will be compiled during the installation of Xps.
These programs show basic principles of the unix process management
like fork()-wait()-exit(), the calculation of process priorities,  
signal managment and the meaning of process ID's and process group ID's. 
Simply check out the programs to see what they are doing in detail.
In order to do that have an Xps running. In its process and properties 
window you will see the effects of the demonstration programs.


DOCUMENTATION

Currently there is available a german documentation in postscript format
only. It includes a detailed description about the using of Xps,
the software structure and the internal function of the Sun process
module (s_getpst.c).




Thomas Breitfeld				Chemnitz, 8-24-1994

