home *** CD-ROM | disk | FTP | other *** search
-
- SPY Process Time Monitoring System
- ==================================
-
- By Supervisor Software 1989,90,91,92
-
-
- Revision 2
-
-
-
-
- The SPY system allows one to monitor the overall CPU usage and the CPU
- times consumed by various tasks and processes running on the Amiga.
-
- These new program versions are NOT compatible with the older ones. Using
- different versions simultaneously may cause a system crash.
-
-
- This package consists of three different programs:
-
- Spy v2.01 - This program loads and initializes a shared library which
- contains the time monitoring routines and a few other
- routines called by the tools included. This program must
- be run before any other tools can be used.
-
- DSD v2.07 - A graphic display of CPU loading with numeric information
- about the system uptime and CPU load.
-
- Report v2.05 - A CLI utility for listing all tasks and processes in the
- system and showing their CPU usage information.
-
- TopCPU v2.05 - A new addition to Spy system. This program currently
- lists ten most CPU intensive tasks or processes and their
- relative CPU usage.
-
- CPUTime v.0.25 - A new addition to Spy system. This program measures the
- CPU time and real time consumed by any CLI program. This
- program is currently in it's beta testing phase.
-
- sssystem.library v2.4
- - This is a shared library which must be present for the
- other tools to work. This library must be initialized by
- the Spy program before any timing measurements are done.
- This is because it would otherwise be impossible to pass
- any options to the library.
-
-
-
- This package is primarly designed for the new Kickstart and Workbench 2.x,
- but it will also run on Kickstart 1.3, although the CPU time measurement is
- very inaccurate under 1.3 unless a CIA hardware timer is used (see below).
-
- Use 'command ?' for a template, 'command ??' for human readable help or
- 'command ???' for full online help in any of the programs mentioned above.
-
-
-
-
- USAGE:
- ======
-
- Spy
- ~~~
- First run Spy to load and initialize sssystem.library. Spy will return
- immediately, thus no RUN command is required. If you wish, you can later
- later remove Spy from the Amiga by running it again with the Remove option.
- Spy can only be removed from the system when no DSD/TOPCpu/CPUTime/Report
- programs are running.
-
- Spy has a few command line options to control the operation of the time
- monitoring system.
-
- Install installs Spy routines in memory (initializes the library)
- Remove removes Spy routines from memory (deintializes the library)
- -Times sets Started time to current time for all tasks
- -A uses CIAB timer A for timing
- -B uses CIAB timer B for timing
-
- You must always specify either Install or Remove (only the upper case
- characters of any option are needed, so you can use I for Install and R
- fo Remove).
-
- The option -Times causes all tasks and processes started _before_ Spy to
- receive the current time as their starting time. That is, all processes
- started before Spy will look like they were started at the same time with
- Spy. If this option is NOT used, the processes mentioned will have an
- 'unknown' starting time.
- All tasks and processes started _after_ Spy was run will always get the
- real starting time in their structures.
-
- Options -A and -B are used to allocate a CIA B hardware timer for accurate
- time keeping. If neither is used, sssystem.library will use the time in
- Dos library's RootNode (under Workbench 1.x) or the system ReadEClock()
- routine (under Workbench 2.x).
- It is recommended to use either -A or -B, especially under Workbench 1.x,
- where there is no good way of reading an accurate time from the system.
- An inaccurate time may cause serious timing problems with DSD, Report, and
- TOPCpu.
- Under Workbench 2.04, the accuracy of ReadEClock() is the same as that of
- the sssystem.library's own CIA timer routines. However, the routines of
- the sssystem.library are more optimized and result in slightly better
- overall performance. If both CIA B timers are needed by other programs,
- the options can be left out and the system's ReadEClock() used instead.
-
-
-
- DSD
- ~~~
- You may start DSD right after running Spy. The initial x and y coordinates
- for the DSD window can be specified on the command line. For example,
- DSD -x400 -y0 sets the coordinates to (400,0). Specifying coordinates of -1
- will open the window as far right and down as possible.
-
- Normally DSD updates its display once a second. The user can specify a
- different interval time (1...3600 seconds) using the -Interval option:
-
- DSD -I60
-
- sets the interval to 60 seconds.
-
- DSD may be terminated at any moment by clicking its close gadget or sending
- a CTRL+C signal to it.
-
- The DSD display shows the CPU usage (load) in graphical form. When the
- graph is low, the CPU load is low. When the CPU is fully loaded, the graph
- will fill the entire display. The graph is updated once every <interval>
- seconds, thus the approximate timing of load peaks can also be determined.
-
- The Load numbers show the CPU loading. 100% means the CPU is fully loaded.
- The number on the left hand side shows the value for the last seconds, the
- other shows the CPU load calculated for the total Uptime.
-
- IdleCPU shows the total amount of time that CPU has been idle (ie. it has
- had nothing to do) and Uptime shows the time that the SPY system has been
- running (usually Spy is started during machine boot so this will show the
- total uptime of the Amiga).
-
-
-
- Report
- ~~~~~~
- Report is a CLI based utility used to list all tasks and processes running
- on the Amiga. It shows many kinds of information about the tasks:
-
- FIRST, it lists the Uptime, IdleCPU and Average Load:
-
- Uptime: 0 00:23:15.140 Idle CPU: 0 00:21:04.494 Average Load: 9.39%
-
- THEN, it lists all tasks and processes in alphabetical order:
-
- num taskname (args) typ id pri task ptr stack used disp CPU time
- 1 AmiCron bw 4 0 078C1C68 8192 314 204 0.339
- 2 bin/keylock bw 2 0 078AFAF8 8192 118 0 0.000
- 3 CD0 pw 10 0788C648 6000 182 2306 0.781
- 4 CON pw 5 07901C18 3200 530 0 0.000
- 5 CON pw 5 0790B220 3200 530 0 0.000
- 6 CON pw 5 078DCE70 3200 530 0 0.000
- 7 CON pw 5 07871C50 3200 530 16 0.059
- 8 console.device tw 5 0780E160 4096 90 68 0.460
- 9 CON pw 5 078E5E48 3200 530 544 6.959
- 10 DF0 pw 10 07815B40 2400 130 0 0.000
- 11 DF2 pw 10 078352A0 2400 130 0 0.000
- 12 DH0 pw 10 07817FC0 2400 130 577 0.160
- 13 DH1 pw 10 078379C0 2400 130 800 0.340
- 14 DH2 pw 10 0783D708 2400 130 54 0.000
- 15 dsd bw 5 0 078E30C8 8192 152 1196 8.062
- 16 Enhancer v1.577 pw 10 07883988 8192 94 61 0.000
- 17 H0 pw 10 078230C0 2400 130 10 0.000
- 18 H1 pw 10 07829150 2400 130 0 0.000
- 19 H2 pw 10 0782F1F0 2400 130 0 0.000
- .. .. .. .. ........ .... ... . .....
- .. .. .. .. ........ .... ... . .....
- .. .. .. .. ........ .... ... . .....
-
-
- If ssystem.librayry is not active, the timing information for tasks and
- processes is not available. In that case, the appropriate fields of output
- will be blank.
-
-
- The meanings of the colunms are:
-
- num Line number of printout (may be disabled with option
- -NONumbers)
-
- taskname Name of task or process shown. Under Workbench 2.0, the
- command line arguments of CLI commands are also shown.
-
- typ Task or process type: First letter indicates if this is a
- CLI background process (b), a process (p) or a simple task
- (t). Second letter shows if this task or process is doing
- nothing (waiting, w) or currently ready to run (ready, r).
-
- id CLI identifier number.
-
- pri Priority (-128...+127) of this task or process.
-
- task ptr Task structure pointer of this task or process.
-
- stack Stack size for this task or process.
-
- used This many bytes of stack are in use.
-
- disp Number of dispatches for this task or process (shows how
- many times this task has been scheduled to run or how many
- times it has needed CPU time).
-
- CPU time CPU time used by this task or process, shown in seconds and
- milliseconds (or seconds only when the value exceeds 1000000
- seconds). This field is not reliable under WB 1.3 for the
- current version of Spy without a CIA timer (see below).
-
- created (Not shown above) Time when this task or process was
- started. This may be unknown for the tasks that were
- launched before Spy was started (unless -Times option is
- used for Spy).
-
- idle (Not shown above) Time which the task or process has been
- sleeping, needing no CPU time. If a CLI window or an
- application program is not used, it usually needs no CPU
- time and the idle time is seen here. Most system processes
- need CPU time several times a second and this field is
- blank (meaning no idle time for that process).
-
- sigalloc (Not shown above) The task signal bits allocated by this
- task or process.
-
- sigwaitf (Not shown above) The signal bits this task or process is
- currently waiting for.
-
- sigexcpt (Not shown above) The signal bits on which this task or
- process will execute an exception routine.
-
- sigrecvd (Not shown above) The signal bits received by the task or
- process.
-
-
- Report has several command line options:
-
- [<pattern>|$<address>|#<cli_id>] [-Time] [-Format="<fmtchars>"]
- [-Header[="<header>"]] [-NOHeader] [-[NO]Status] [-[NO]Numbers]
- [-CLI] [-Proc] [-SIgnals] [-TAsk] [-Waiting] [-Ready] [-Unix]
-
- The characters shown in UPPER CASE are obligatory, while those in lower
- case are optional. Option strings are case-insensitive. Thus, -H, -He,
- -HEA and -HeAdEr mean all the same option.
-
- When <pattern> is specified, Report only lists tasks and processes whose
- names match the given pattern string. Under Workbench 2.x, the standard
- AmigaDOS wildcards can be used. Under 1.3, if the pattern string ends with
- an asterisk (*) all task and process names beginning with the given
- string will be listed.
-
- When $<address> is specified, Report will only list one task with the
- Task structure pointer of <address>. The address mus be given in
- hexadecimal as shown in the task ptr field of Report output. If a given
- task is not found, No match will be printed instead of the task's data.
-
- When #<cli_id> is specified, Report will only list one CLI process
- with the given CLI id number. The id must be a decimal number. If a given
- process is not found, No match will be printed.
-
- -Time option selects the alternate output format of Report, showing the
- task starting and idle times instead of some other information.
-
- -Format option can be used to specify a custom output format. <fmtchars>
- may contain nay combination of the following formatting characters:
-
- %n task name and arguments (shorter format, 22 columns)
- %N task name and arguments (longer format, 30 columns)
- %t task or process type
- %c CLI process id
- %p priority
- %a address of Task structure
- %s stack size and usage
- %d number of dispatches
- %T CPU time consumed, long format
- %H CPU time consumed, short format (hh:mm)
- %C creation time of task or process
- %i idle tile of task or process
- %S task signal bits
-
- The default format string is "%n %t %c %p %a %s %d %T" and the -Time format
- is "%n %t %c %a %d %T %C %i".
-
- -Header enables the header line for printing. If -Header="<header>" is
- specified, the custom header line will be used instead of the standard
- one. The header line can be set in the environment variable (see below).
- -NOHeader and -Header control the printing of header. By default, the
- header line is printed unless only one task or process is listed. For
- every -NOHeader, one -Header must be given to reverse the option's effect.
-
- -NONumbers and -Numbers control the printing of line numbers. By default,
- the numbers are printed unless only one task or process is listed. For
- every -NONumbers, one -Numbers must be given to reverse the option's effect.
-
- -NOStatus and -Status control the printing of status line. By default, the
- status line is printed unless only one task or process is listed. For
- every -NOStatus, one -Status must be given to reverse the option's effect.
-
- -CLI causes only CLI processes to be printed.
- -TAsk causes only tasks to be printed.
- -Proc causes only non-CLI processes to be printed.
- If several flags are specified, all the specified task types will be printed.
- By default, all types of tasks and processes are printed.
-
- -Ready filters all waiting (idle) processes off the printing causing only
- ready processes to be printed. -Waiting only prints processes which are
- sleeping at the moment. These flags are mutually exclusive. By default,
- all tasks and processes are printed recardless of their state. These flags
- can not be set in the environment variable.
-
- -Signals lists the states of task's signal bits (found in the Task structure).
-
- Options for the Report command can be given in an environment variable
- called 'report'. The command line options can be used to override the
- defaults or the ones set by the environment variable when needed.
-
-
-
- TopCPU
- ~~~~~~
- TopCPU has similar options as DSD. TopCPU shows ten most CPU intensive
- tasks or processes and the relative CPU times (percents) in both numeric
- and graphical format.
-
- You may start TopCPU right after running Spy. The initial x and y
- coordinates for the TopCPU window can be specified on the command line.
- For example, TopCPU -x0 -y200 sets the coordinates to (0,200). Specifying
- coordinates of -1 will open the window as far right and down as possible.
-
- Normally TopCPU updates its display every five seconds. The user can
- specify a different interval time (0.1 to 60.9 seconds) using the -Interval
- option:
-
- TopCPU -I0.5
-
- sets the interval to 0.5 seconds. Using shorter interval times increases
- the CPU load caused by TopCPU due to more frequent display updates.
-
- TopCPU may be terminated at any moment by clicking its close gadget or
- sending a CTRL+C signal to it.
-
- TopCPU lists ten tasks or processes getting most of the CPU time at a
- time. The calculation is done for the whole -Interval time; for example,
- with the default interval of five seconds, a task which has gotten 60% of
- the CPU time has consumed (60/100)*5 seconds or 3 seconds of CPU time.
-
-
-
- CPUTime
- ~~~~~~~
- CPUTime measures the real and CPU time used by a given CLI command like
- a compiler or a sort program. The only arguments needed by CPUTime are
- the command to be run and its arguments.
-
- CPUTime CLI-command arguments
-
- Only the CPU time used by <CLI-command>'s process is measured. If the
- command outputs text or uses other file-I/O, the CPU time consumed by
- the console window processes etc. is NOT taken into account.
-
- CPUTime currently uses Execute() routine to launch the commands. This
- may change in the future.
-
-
-
- Other
- ~~~~~
- These programs are still under development. Feel free to send bug reports
- or suggestions to the author.
-
- Thank you for your interest.
-
- Supervisor Software
-
-
-
- Mail: E-Mail: Voice/FAX:
-
- Jukka Marin jmarin@messi.uku.fi int. + 358 71 232 793
- Metsurintie 17 B 8
- 70150 Kuopio
- FINLAND
-
-
-