AminetAminet
Search:
84451 packages online
About
Recent
Browse
Search
Upload
Setup
Services

util/cli/ktm.lha

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:Kool Task Manipulator
Author:megacz at usa.com
Uploader:megacz usa com
Type:util/cli
Version:0.4
Requires:68000+/os2.04+
Architecture:m68k-amigaos
Date:2009-03-25
Download:http://aminet.net/util/cli/ktm.lha - View contents
Readme:http://aminet.net/util/cli/ktm.readme
Downloads:1344

ktm-0.4
---------

---

 Kool Task Manipulator =D

 This proggy allows to change priority, signal, freeze &  activate
 any task or process without a hassle with guis.  It accepts exact
 or case insensitive and patternal name, just to be as handy as
 possible. Further more, you can do all those things massively to a
 group of tasks or go nuts and do that with every task.

 I tried to make the output look like in 'Scout'.
  
---

NEWS:

     [09-Mar-2009]   0.4  Smaller, better, faster.
     [31-Jul-2008]   0.3  Program can be made resident now.
     [31-May-2008]   0.2  Added searching by address($xxxxxxxx)

---

NOTES:

Requires 68000+, OS 2.04+, 8192+ bytes of free memory

Returns 0 if nothing was done and 5 upon successful operation.

When used in scripts avoid "task,task,..." syntax because there is no
way to distinguish between successful and unsuccessful. Only one call
per task can tell what happened.

Quite fast(also because it does not perform sorting).

This proggy can also display ports.

Basic 'status' command emulation is possible.

Basic 'break' command emulation is possible.

When made resident works even faster.

---

USAGE:

 *** template: ktm <com=task/a>[,...] [arg] [ic/s] [all=mass/s] [status/s]

     <com=task/a>  -  name of a task or process, you can specify exact 
                      "taskname" or exact "[procname]" or partial name 
                      together with [ic/s] or "#?" for all, or task 
                      address($XXXXXXXX, 0xX[XXXXXXX]) or CLI number.

            [arg]  -  decides what to do, you can, set priority with
                      numbers in range of -127 to 127, send a signal
                      with $XXXXXXXX or 0xX[XXXXXXX], send C,D,E,F
                      signals, or S - self signal, you can FREEZE and
                      ACTIVATE, or dump(P) ports.

                         -127<>127  -  priority
                         $XXXXXXXX  -  signal
                      0xX[XXXXXXX]  -  signal
                           c/d/e/f  -  standard signals
                                 s  -  self signal
                            freeze  -  freezes task(s)
                          activate  -  activates task(s)
                                 p  -  search in ports

           [ic/s]  -  ignores case and does patternal search.

     [all=mass/s]  -  means all.
       [status/s]  -  'status' emulation.

 *** indicators:

                d  -  dump
                p  -  priority
                s  -  signal
                f  -  freeze
                a  -  activate    

---                                                            

EXAMPLES:

   ; you want to see the list
   ktm #?

   ; you want only CLIs to be listed
   ktm "Background CLI,Shell Process" all

   ; you want everything but the clis
   ktm -1 all

   ; you want all clis first and then the rest
   ktm "Background CLI,Shell Process,-1" all
                     
   ; you want process 3 to be shown
   ktm 3

   ; suppose there is plenty "wait" commands running and you want
   ; them not to be handled too often, but you dont know the case
   ; of each process.
   ktm [wait] -1 ic all

    p $01E71578 process -120  49 wait dos     $00000100    3.770  Background CLI
[WAIt]
    p $01EA8678 process -120  50 wait dos     $00000100    3.770  Background CLI
[WAit]
    p $01EAD578 process -120  51 wait dos     $00000100    3.770  Background CLI
[Wait]
    p $01EA28D8 process -120  48 wait dos     $00000100    3.770  Background CLI
[WAIT]
    p $01E866B8 process -120  45 wait dos     $00000100    3.770  Background CLI
[waiT]
    p $012B2180 process -120   3 wait dos     $00000100    4.794  Background CLI
[wait]
    p $0138F9A0 process -120   6 wait dos     $00000100    4.794  Background CLI
[wait]
    p $01E87430 process -120  46 wait dos     $00000100    3.770  Background CLI
[waIT]
    p $01EA0B58 process -120  47 wait dos     $00000100    3.770  Background CLI
[wAIT]
 
   ; suppose you have slow cpu and you use "scsi.device" or "IDEFIX" where
   ; these tasks have rather high priority and when something is accessing 
   ; the drive everything else stops for a while.
   ktm IDEFIX,scsi.device 0

   ; freeze the 'sMeLLy' who is doing messy things in the OS afap
   ktm smelly ic freeze

   ; break bunch of different tasks not knowing their exact case
   ; but knowing that they work as shell processes - this way other
   ; tasks with matching patterns wont be terminated.
   ktm [aws],[inetd],[named] c ic

   ; signal some task with custom signal
   ktm TASK 0xFFA0FF

   ; set new priority of two different groups of processes
   ktm arexx,[rx] -1 ic all

   ; find a task by its address
   ktm $01EAD578

   ; simulate 'status' behaviour - obtaining CLI number
   ktm wait ic status

   ; simulate 'status' behaviour - obtaining process list
   ktm "Background CLI,Shell Process" all status

   ; simulate 'break' behaviour
   ktm 10 c
 
   ; obtain task address - you can use this technique to obtain anything
   set taskaddress "`ktm wait ic`"
   set taskaddress "`echo first 4 len 9 "$taskaddress"`"
   echo "$taskaddress"

---
megacz at usa.com


Contents of util/cli/ktm.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                 2554    3912  65.3% -lh5- 1f87 Mar 10 02:48 ktm-0.4/ktm
[generic]                 2534    3832  66.1% -lh5- d459 Mar 10 02:48 ktm-0.4/ktm-68000
[generic]                 4432   18545  23.9% -lh5- 3f9e Mar 10 02:45 ktm-0.4/ktm.c
[generic]                 1985    5137  38.6% -lh5- d933 Mar 10 00:56 ktm-0.4/ktm.readme
[generic]                  283     552  51.3% -lh5- e43e Mar 10 02:46 ktm-0.4/SMakefile
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         5 files   11788   31978  36.9%            Mar 25 18:55

Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>