HOME                                           |  
GIT Overview           | 
Script-Archive:
(docs) : 
(wiki) : 
(git)     | 
...
Peter's Script-Archive - Process Handling
Some  scripts  for  dealing  with  processes  and   process-related
events.
Major Commands
Git
    View of this section / Download
   - waitcond (perl) - test or wait for an event. Like tagls/Grep.pm, 
       this one also offers boolean expressions, this time on top of a 
       language of tests including
   
      - (dis)appearance of files
      
- (dis)appearance of processes in ps output
      
- threshold-based file modification time (file is recent/idle)
      
- threshold-based cpu/net/disk idleness
      
- host pinging
      
- return code of shell commands
      
- grep in files or command output
      
- detect changes in files or command output (needs watch_delta below)
   
 See waitcond.dbus.README for ideas on using dbus-events with waitcond
       (waiting for events like 'ping', HAL, FUSE, Desktop-Notifications).
       You will probably want to combine waitcond with some notification tool 
       like the trumpets of Jericho (or just ALARM, maybe also something boring 
       like eMail or SMS) to be indeed sucessfully notified of the fact that your 20 hour 
       compile just failed with a syntax error after just 58 minutes... . 
       Published on freshmeat
       and cpan. 
       (the changes between version 0.2.2 to 0.32 are just CPAN-related and don't
        change the actual code).
- A simplified variant with different history and codebase is
       fwait/pwait, which is probably the most authentic and still used version
       of my original boolean regex patch that I created for a small perl fulltext
       indexer (96-97 maybe?). Note that neither fwait nor waitcond allow 
       arbitrary perl (e.g. 'do{}') in the boolean expression.
   
- waitcond.timeout is an extended version of Piotr Roszatycki's script.
       It runs a command and kills it after a period. The
       timelimit specification allows using a command such as waitcond. (Simple 
       timeout programs are also available as timeout.dep and in the GNU coreutils).
  
- watch_delta repeatedly runs a command and continuously report lines 
       or diff sections. Used to detect command output changes in waitcond, with
       a special "netstat -c"-style mode to get a really usable continuous output
       from netstat -apnW augmented with information from /proc.
   
- zap (perl) has come a long way from the its old incarnation in the camel book. 
       Nowadays it lists, nices or kills processes or process trees 
       matching a regex with or without user interaction. Includes ionice support 
       and also tries to cpulimit for higher nice values (if a cpulimit or ionice
       command is available and zap's nice-personality is active).
HOME                                           |  
GIT Overview           | 
Script-Archive:
(docs) : 
(wiki) : 
(git)     | 
...
jakobi(at)acm.org, 2009-07 - 2012-03