Package: procps
Version: 1:3.2.8-2
Severity: wishlist

Hello,

I have coded something that can be easily implemented, as file under 
/usr/bin/watchlog:

#!/bin/sh
# declarations
[ ! -f  $HOME/.watchlogrc ] && echo "5"   > $HOME/.watchlogrc
TIMING=`cat $HOME/.watchlogrc`
#echo "> $@  command line started. <"
MSG=$@
if [ "--set-time" = "$1"  ] ; then
        echo "$2"   > $HOME/.watchlogrc
        exit
fi
if [ "--help" = "$0"  ] ; then
        echo "--help, or --set-time 5  (corresponding to e.g. 5 seconds), or a 
command line to be done every e.g. 5 seconds"
        echo "typical application : /usr/bin/watchlog  'date > $HOME/.log-file'"
        exit
fi
while [  1  ] ; do
    bash -c " $MSG "
    sleep "${TIMING}s"
done


(I am not expert in linux / coder)
This code is quite useful, since it can be used for screen directly:

#.screenrc
# status
hardstatus alwayslastline "%{= Yk} %H %{= yk}%-Lw%{= kG}%50> %n%f* %t 
%{-}%+Lw%< %=  %{= yk} %l %{= Yk} %0c:%s %d/%m %{-}"
# add CPU idle/sustem/user/interrupt stats
backtick 100 5 5 tail -n 1 $HOME/.log
caption always '%{= kY} %200` %= %100` %='
bindkey ^[[1;5A prev
bindkey ^[[1;5B next
bindkey ^[[1;5D prev
bindkey ^[[1;5C next
bindkey ^N screen
bindkey ^[[1;2D prev
bindkey ^[[1;2C next

It is a nice add-on eventually that requires to long typing, it is already in 
the /usr/bin and is few kb only.

Watch is cool

All the best, 
Best regards
Yellow



-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-2-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages procps depends on:
ii  initscripts               2.87dsf-8      scripts for initializing and shutt
ii  libc6                     2.10.2-2       GNU C Library: Shared libraries
ii  libncurses5               5.7+20090803-2 shared libraries for terminal hand
ii  lsb-base                  3.2-23         Linux Standard Base 3.2 init scrip

Versions of packages procps recommends:
ii  psmisc                        22.8-1     utilities that use the proc file s

procps suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to