
Treeps 1.2.2    Graphical process monitor for - Unix, Linux, Solaris
------------

Treeps is a program that is designed to make monitoring 
and interacting with the running programs on your system easy.

A "real time" tree view shows the relationships between the
processes and is color coded to provide easy interpretation of various
values. The process tree displays any combination of users/groups and
can be used to drill down into process details and then extract key
fields for continuous display. A number of predefined actions can be
performed on processes, such as signaling, tracing or viewing the man
page. Various control mechanisms can be used to fine tune the display
and adjust sampling rates etc. There are also a large number of other
features, please read the man page and/or the online help.

Requirements
------------

	Motif 1.2 or better( LessTif, OpneMotif, ...)

	Pentium/Sparc Class machine or higher

Options
-------

	Xpm library for color icons
	KDE/GNOME/CDE desktops

Quick Start
-----------

	make
	#		Modify Install.params if desired
	su root
	   ./Setup
	   exit
	treeps

Change Summary
--------------

	Solaris Updates
	
	    Add LWP support - Shown in tree, "drillable"
	
	    Separate Process Details Application

	    Simple System Information App for Solaris 8
	    
	Preliminary support for IRIX64(not working yet).

	Some minor mod's for RPM building

	Linux updates for 2.4 kernel

	Updates for RedHat(7.3, 8.0), Mandrake 8.2, SuSe 8.0

	A few bug fixes

Target Platforms
----------------

Version 1.2.2 should build on the following platforms

	Unixware 2.0+      - Including 7.0
	GNU/Linux 	   - Tested on Red Hat 5.1 -  8.0
	Solaris 5.0+	   - Including 5.7 (Motif,CDE)

Recent Changes: 	See doc/ChangeLog-1.2.2 


Previous Test Platforms
-----------------------

Previous versions had been built and tested on 

	Unix 5.4		UNIX_SV system 4  2.0 i386 x86at
    	Unixware 2.0		UNIX_SV system 4.2MP 2.01 i386 x86at
	Solaris 5.3,5.7		SunOS hydra 5.3 Generic_Patch sun4m sparc
	Linux			Specifically Red Hat 5.0 - 7.1
	
Current Tested Platforms
------------------------

This version has been built and tested on

	Linux		Red Hat(5.1 - 8.0) with Motif 1.2+
	Solaris 8	x86 with GNU compiler
	UnixWare 7	x86 with GNU compiler

Build Details
=============

	This release has the ability to be built for:
	
		Root Install	    -  Install to /usr/X11... 
		Usr local Install   -  Install to /usr/local...
		Personal Install    -  Install under $HOME

	The first, i.e. Root Install, is the default and requires 
	root access to complete the install. The second only requires 
	access to the /usr/local tree, and can be useful when it's
	shared and you have access to it. The last is for installation
	in your own tree under $HOME. In the first case the program
	is installed setuid to root and has more capabilities, i.e
	being able to trace your own processes, fetch and display
	more process details on processes you don't "own"...

	To do the normal build just type:

		make

	To perform a "User Local" build enter:

		make local

	To build for your personal tree, enter:

		make personal

	You can see the effect of the builds by looking in
	the Install.params file. You can then tweak things in that file before
	the final install. (Note: some things need to match the compiled in
	values, specifically the location of the lib directory).

	The build mechanism should automatically configure for your platform. 
	You can perform this step separately by doing:

		make config

	If all goes well the program creates:

		makeConfig
		${platform}/localized.h
		Install.params

	If you get an error message then check .scriptLog first, then
	look at the above files. You can edit the above files and run make,
	or you can figure out the config engine and do a make clobber, 
	then run make again.

	The former is probably easier. If you decide on that approach then be
	sure *not* to invoke make clobber as it wipes those files clean.

	Once configured the program can be built as usual by invoking make.

		make

	This will perform the configure, if required, then go on to build
	the program.  There are more details in the platform specific readme's 
	in the platform subdirectory(i.e. what the command uname(1) returns).
	Also read doc/Configure for more details on the configuration engine.

	Once built, run 
	
		make clean 
		
	to remove .o's

	If you do a personal build then want to switch to another build type
	then do a "make clobber" in between.

How to install
==============

	During the configure the file Install.params is modified to contain
	the install directories for your platform. You may change these if you 
	wish to install the files elsewhere.

	To do a general install, you need to be root, so

		su root

	Then run the installer program

		./Setup

	A "make install" will invoke the Setup script if you wish. If
	you are doing a "Usr Local" or "Personal" install then you don't
	need to su to root.

	The program will fine tune the resource file for your current
	screen size/depth. If you normally run at other resolutions and
	color depths then switch to your typical configuration. If the
	Setup program can't figure out something by probing it may ask
	you some questions, generally if your running X it will be 
	automatic. 

	Note: When the program is installed setuid to root, it enables
	      one or more of the following.

		Running renice to decrease nice value(Users processes only)

		Trace process system calls(Users processes only)

		On Linux, view some details on processes not owned by 
		the current user, i.e.

			CWD, exe, fds, ...

	     As with any setuid program there is an opportunity for
	     security violations. I have taken precautions to prevent this
	     i.e. using absolute paths ..., but if you are installing
	     on a multiuser system you may want to make it non-suid. The
	     program will still function, except the above features won't
	     work(it generates appropriate error messages). Also each
	     OS and release varies what can be done by non-setuid programs.
	     On some older versions of Unix the program may not be able to
	     accomplish much without being setuid to root. If you want
	     to install non-setuid to root then modify the appropriate entry in
	     
		Install.params

	     prior to running Setup.

	If you run the install as root then it will also register the
	application with various desktops e.g. GNOME, KDE, CDE. This will
	put the icon in various menus, folders and install some docs.
	If you do not do a root install then you may need to adjust your
	PATH and MANPATH variables.

How to Run
==========

	Type,

		treeps

	If you are running fvwm2, CDE, KDE or GNOME, you should be able to 
	start it from a menu item or from an app folder icon. You may have 
	to adjust the install for your site. You may also have to restart your 
	window manager and/or refresh the tool folder to get the menu item 
	and/or see the icon. There are some KDE docs, not much but a start.

How to Uninstall
================

	You can uninstall the program by changing to the treeps lib directory,
	look in the Install.params for the location. You can take a quick
	peek at what will be removed by looking in the installLog file.
	Then run the uninstaller

		./uninstall

	This removes all the installed files, and uninstalls from the desktops.
	

Documentation
-------------

The man page(doc/treeps.1) contains a few useful pointers on using the
program, generally you should be able to figure it out by just running
the program and referring to the online help.  Try right clicking on
the treeps node from the treeps main display and selecting 
man item(cool eh!).  Generally try pointing and clicking 
on things. Left clicking on a process in the tree performs
the default action, generally displaying the process details.
Selecting the label of fields in the details dialog "extracts"
those values to the main tree.


This program is copyrighted, please read the copyrights files
in the doc directory. A number of persons have helped along the way,
these brave souls are listed in the HallOfFame!! 

I have a long list of ideas, these are organized in the Todo file, more
ideas or comments are welcome. 


Build Time Options
------------------

The program can be compiled as "Trusted", in which case you will be able
to send signals to ANY process, including the ability to kill them. This
is useful if you are running treeps on a single user system and want to
be able to do things like ask a server processes to reload it's config file.
However it is somewhat dangerous, as you can easily kill
an important process by mistake(yup it happened to me once!).  So it's
up to you, you want this feature, then set the following value(found in
${platform}/security.h) to 1.

	#define TRUSTED_USER    0

The program will also need to be setuid to root for this feature to
work, which will be true if you do the default install.


If the program is installed setuid(the default), then users will usually be 
able to increase their processes priority(nice value)(on some systems one 
has to be root to do this). This can be disabled by changing the following 
definition, also found in security.h, to 0.

	#define TRUST_INCREASE_OWN_NICE_VALUE 		1

The program can also allow any user to increase/decrease the priority
of any process by setting the following definition to 1. 

	#define TRUST_CHANGE_ANY_PROCESS_NICE_VALUE	0

again you probably only want to do this on a single user system.


Request
-------

Once you get it up and running, please send me an email to
let me know what system you are on. The following would be
great:

	uname -a | gmd@orbit2orbit.com

George MacDonald  gmd@orbit2orbit.com

