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

util/rexx/deemon.lha

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:deemon -daemonizing Scout
Author:megacz (megacz at usa.com)
Uploader:megacz (megacz usa com)
Type:util/rexx
Version:0.00
Requires:68000+/os2.04+
Architecture:generic
Distribution:Aminet
Date:2006-08-08
Download:http://aminet.net/util/rexx/deemon.lha - View contents
Readme:http://aminet.net/util/rexx/deemon.readme
Downloads:511

HELLO KIDS!

Today im going to make some changes into Your systems =D

Do You use Scout from shell often?, Have You noticed that
loading it from the disk everytime You need to do some
operations is slow like early calculators? ;]

Did You tried to make it resident, and it is still slow?

Haha, Follow me!

We will daemonize the Scout, so it will be running in the
background all the time plus it will be invisible for other
instances for safety reasons.


Needed things are:

    - Scout in C: (http://www.aminet.net/util/moni/Scout_os3.lha)
    - WaitForPort in path or move to C: (sys:Rexxc/)
    - rep in C: (http://www.aminet.net/util/cli/rep.lha)


Now I will show You how to setup this thing:

"
.key QUIET/S
.bra «
.ket »
IF «QUIET»
SET consoleo NIL:
ELSE
SET consoleo CONSOLE:
ENDIF
FailAt 25
SET inexec SCOUT
SET outexec SC0UT
SET inpath C:
SET outpath T:
IF `rx "say SHOW('P','$outexec')"` EQ 1
echo "'$outexec' is already running..." >$consoleo
SKIP skipped
ENDIF
echo ":Daemonizing $inexec as '$outexec' ..." >$consoleo
echo "modyfying structure of '$inpath$inexec' and writing to '$outpath$outexec'"
>$consoleo
rep $inpath$inexec scout.reply sc0ut.reply $outpath$outexec >$consoleo
echo "starting up whole thing..." >$consoleo
stack 30000
run >NIL: $outpath$outexec ICONIFIED PORTNAME=$outexec
stack 4096
WaitForPort $outexec
IF WARN
echo "failed!" >$consoleo
ELSE
echo "ready." >$consoleo
ENDIF
UNSETENV $outpath$outexec
LAB skipped
UNSET inexec
UNSET outexec
UNSET inpath
UNSET outpath
UNSET consoleo
"

If You want to insert this into Your startup-sequence and don't
want to have screen verbosity just comment out all echo's or copy
'daemonize' to C: and insert this: "execute c:daemonize QUIET".

You can also insert this after TCP/IP stack and add some
network related args so that it will be possible to control
Your Amiga from another Amiga running Scout in GUI mode.


TECH: this changes the invoke method of Scout from:
      `scout command=tasks`
                                                to:
      `rx "c='T:T';ADDRESS SC0UT; 'printlist T 'c;
       a=OPEN(b,c,'R');say READCH(b,65535);
       a=CLOSE(b);a=DELETE(c)`

       funny thing is that, that this is not funny ;]
       ,only requesting lists is such a crap, but
       there are utils I made to get this easier so relax.
       BTW: see Scout docs on how to use ARexx interface.


Features(what You gain by doing this):

    - speeEEEEEEd!
    - non-limited access, even in low memory situations


Utils(My very handy ARexx scripts for use with Scout):


 requirements:

    - rexxsupport.library (system)
    - rmh.library (http://www.aminet.net/util/rexx/rmh.lha)
    - RexxMast (system)
    - rx, execute in path or in C:
    - +s bit on script files for command-like invoking

 utils(scripts):

    - dump       -allows to see any list just by typing one char
    - signalize  -signal tasks [massively]
    - rexxpriset -change priority [massively]
    - rexxbreak  -term. tasks [massively]
    - termgen    -terminates tasks mainly launched by You
    - rxterm     -very basic ARexx port terminator (non-Scout)


NOTE: These scripts work actually without daemonizing, but
      everything is kinda slowwwww coz Scout needs to be
      loaded from the disk everytime some function
      of it is being requested...


  dump (help: '--help')
 =======================

"
template: dump [list/K],[word/K],[col/N],[ic/S]
examples: dump ,CON,, | dump t,CON,8 | dump t,CON,,ic

[list/K]:
Allocations (a), BoopsiClasses (b), Commands (c), Devices (d),
Timer (e), Fonts (f), Assigns (g), InputHandlers (h), Interrupts
(i), LowMemory (j), Commodities (k), Libraries (l), Memory (m),
Mounts (n), Locks (o), Ports (p), Residents (r), Semaphores (s),
Tasks (t), Resources (u), Vectors (v), Windows (w), Expansions
(x), System (y) and ScreenMode (z). + Timer (1), Patches (2).

NOTE: last two entries r only accessible through the task

"

- [word/K] - allows to scan for particular word(s)
- [col/N]  - searches in specified column only,
             THIS ARGUMENT IS DYNAMIC IN SOME WAY
             AND HAS RANGE EQUAL TO THAT FROM THE LIST,
             0=all cols, like: ,word,0 = ,word,, = ,word
- [ic/S]   - ignore case

NOTE: when invoked with no args tasks will be shown by default,
      You can change this by editing 'dump' - 'dflt_list' var.


  signalize (help: no args)
 ===========================

"
template: signalize <[--LIST]/'[TNAME]/[TADDR],...'> [[--INT]/[HEXSIGNAL]]
"

ex.1: signalize input.device

ex.2: signalize input.device --int

ex.3: dump t,input,,ic
 $0108CF62 task      20 --- ready        $C0000000    4.006  input.device
      signalize $0108CF62 $C0000000

ex.4: signalize --list
Using internal signal: $1FFF6FFF
 $015F6400 process   19  20 ready        $00000100    3.798  Background CLI
[c:fscreen.exec]
 $015F9588 process   68  18 waiting      $B4001000    7.898  Background CLI
[powerwindows]
 $016FDAA0 process    5 --- waiting      $C0001000    9.798  DepthMenu
 $0108CF62 task      20 --- ready        $C0000000    4.006  input.device
 $01787970 process    5 --- waiting      $8C001000    7.990  magicmenu_AL
 $015E8550 process    0 --- wait dos     $00000100    3.802  MCP_TitleClock
 $010B0200 process    0 --- waiting      $80000000    1.838  ramlib
 $01802DA8 process    2  26 waiting      $E0000000    3.866  ToolsDaemon
[ToolsDaemon]
 $0172F2C8 process    1  23 waiting      $80000000    5.830  Workbench
[Workbench]
 $01415D98 process    0 --- waiting      $80000000    2.802  « ConClip »
- $1FFF6FFF usually breaks the internal loop, when process
  hangs unexpectedly and might cause heavy CPU load.
  In such cases use 'rexxpriset' to lower its priority and
  then try to 'signalize' -helps in most cases after
  two or more attempts.

ex.5: signalize ARexx,[rx]
Using corresponding signals.
 $0143FFA0 process    0 --- waiting      $C0000000    3.702  ARexx
 $01825C20 process    0 --- waiting      $C0000000    3.702  ARexx
 $0182D5D8 process    0 --- waiting      $C0000000    3.702  ARexx
 $01454008 process    0 --- waiting      $C0000000    3.702  ARexx
 $0144CBE8 process    0 --- waiting      $C0000000    3.702  ARexx
 $01C1F7D8 process    0 --- waiting      $80000000    3.730  ARexx
 $0141ABB8 process    0   9 waiting      $70001000 ---ackground CLI
[c:InfraRexxDaemon]
 $0143CD38 process    0  10 wait dos     $00000100    3.738  Background CLI [rx]
 $0144AAC8 process    0   7 wait dos     $00000100    3.738  Background CLI [rx]
 $014518B8 process    0  12 wait dos     $00000100    3.738  Background CLI [rx]
 $018230D0 process    0  27 wait dos     $00000100    3.738  Background CLI [rx]
 $018270E0 process    0  28 wait dos     $00000100    3.738  Background CLI [RX]
 $01847018 process    0  39 wait dos     $00000100    3.738  Shell Process [RX]



-You can edit 'signalize' file to set Your own default 
 tasks to be signalized('--list'), useful in deadlock situations,
 You might want to buttonize this in some program or use with infrared
 or invoke from remote terminal.
 NOTE: using '--list' without daemonized Scout its senseless.


  rexxbreak (help: 'help' or '?')
 =================================

"
REXXBREAK by megacz 2k6

usage: rexxbreak <TASKNAME> [IC] [MASS]
"


  rexxpriset (help: 'help' or '?')
 ==================================

"
REXXPRISET by megacz 2k6

usage: rexxpriset <TASKNAME> <PRI> [IC] [MASS]
"

example: rexxpriset ARexx -1 mass
 $0143FFA0 process -1>-1  --- waiting      $C0000000    3.702  ARexx
 $0182D5D8 process -1>-1  --- waiting      $C0000000    3.702  ARexx
 $01454008 process -1>-1  --- waiting      $C0000000    3.702  ARexx
 $01825C20 process -1>-1  --- waiting      $C0000000    3.702  ARexx
 $0144CBE8 process -1>-1  --- waiting      $C0000000    3.702  ARexx
 $01DE3A78 process 0>-1  --- waiting      $80000000    3.730  ARexx


  termgen (help: no args)
 =========================

"
template: termgen [FORCE]/[DUMP [UNBUF]]
"

-There are two files needed:'env:TERMGEN.exclude' & 'env:TERMGEN.rexxexcl'
 they should contain tasks You don't want to terminate, like system
 processes, patches, clocks, menus...
 First one contains tasknames and the second ports.
 ITS RECOMMENDED FIRST TO SEE ('DUMP') WHAT WILL BE TERMINATED BEFORE
 GOING WITH 'FORCE' -termination.


  rxterm (help: 'help' or '?')
 ==============================

"
template: PRGNAME,PERIODIC/S
"

- PRGNAME is ARexx port to be terminated, case sensitive!,
  for more details launch editor and check out how it looklikes.



Additional NOTES:
-----------------

I found that using 'ixpipe-handler' which size is 2532 causes troubles
when requesting Scout mounts('dump n'), use 30152 version from ixemul48.2.


HAVE FUN.



deemon -daemonizing Scout by megacz2k6(megacz at usa.com), 07-08-2006


Contents of util/rexx/deemon.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                  403     814  49.5% -lh5- 25a0 Aug  7 19:31 deemon/daemonize
[generic]                 3685    8766  42.0% -lh5- 798c Aug  8 12:47 deemon/deemon.readme
[generic]                 1547    3156  49.0% -lh5- bac2 Aug  7 22:51 deemon/util/dump
[generic]                  767    1663  46.1% -lh5- cc87 Feb  3  2006 deemon/util/rexxbreak
[generic]                  806    1728  46.6% -lh5- e67b Feb  3  2006 deemon/util/rexxpriset
[generic]                  711    3280  21.7% -lh5- 8fdc Aug  7 18:11 deemon/util/rxterm
[generic]                 1099    2634  41.7% -lh5- b9ee Jul 11 18:59 deemon/util/signalize
[generic]                  622     987  63.0% -lh5- 8f54 Apr  6 04:31 deemon/util/termgen/env/TERMGEN.exclude
[generic]                  299     410  72.9% -lh5- 4a11 May 18 16:47 deemon/util/termgen/env/TERMGEN.rexxexcl
[generic]                 1525    4575  33.3% -lh5- 001f Aug  7 17:06 deemon/util/termgen/termgen
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total        10 files   11464   28013  40.9%            Aug  8 17:58

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