Network traffic speed monitor (Xfce wavelan plugin alternative) revisions

Go back to topic: Network traffic speed monitor (Xfce wavelan plugin alternative)

  1. v7 anchor; v7 full version
  2. v6 anchor; v6 full version
  3. v5 anchor; v5 full version
  4. v4 anchor; v4 full version
  5. v3 anchor; v3 full version
  6. v2 anchor; v2 full version

Revision #7

Edited on
2024-02-10
Edited by user
gonzalo-bulnes

Revision #6

Edited on
2023-09-07
Edited by user
deeplow

Revision #5

Edited on
2021-07-12
Edited by user
Johnboy
![asd|690x29](upload://p2cJgcLQQKTCqUWevhzP788865n.png)![asd|690x29](upload://p2cJgcLQQKTCqUWevhzP788865n.png) In case you need to restart the daemon for changes to take effect, kill it's pid and rm /dev/shm/netspeed afterwards.

Revision #4

Edited on
2021-07-09
Edited by user
deeplow
``` ```
INTERVAL=3 # seconds INTERVAL=1 # seconds
if [ ! -e "$SHMFILE" ];then if [ -e "$SHMFILE" ];then cat "$SHMFILE" else
else cat "$SHMFILE"
if [ -e "$SHMFILE" ];then # possible race condition, another daemon already running exit 0 cd / umask 177 # u+rw,g-rwx,o-rwx # check for file in atomic operation (set -o noclobber;>"$SHMFILE") &> /dev/null if [ "$?" == 1 ]; then # file exists, possible race condition, another daemon already running exit 1
cd / umask 177 # u+rw,g-rwx,o-rwx touch "$SHMFILE"
a=($r) r1=${a[0]} t1=${a[1]} r2=${a[2]} t2=${a[3]} rkbps=`awk "BEGIN {printf \"%d\", ($r2 - $r1) / 1024 * (1 / $INTERVAL)}"` if [ "$?" == 0 ];then a=($r) r1=${a[0]} t1=${a[1]} r2=${a[2]} t2=${a[3]} rkbps=`awk "BEGIN {printf \"%d\", ($r2 - $r1) / 1024 * (1 / $INTERVAL)}"`
echo -n "<txt><span weight='bold' fgcolor='#FFF900' bgcolor='red'> $rkbps kb/s / $tkbps kb/s </span></txt>" > "$SHMFILE" echo -n "<txt><span weight='bold' fgcolor='#FFF900' bgcolor='red'> $rkbps kb/s / $tkbps kb/s </span></txt>" > "$SHMFILE" else echo -n "<txt><span weight='bold' fgcolor='#FFF900' bgcolor='red'> qvm-run failed </span></txt>" > "$SHMFILE" fi

Revision #3

Edited on
2021-07-08
Edited by user
deeplow

Revision #2

Edited on
2021-07-08
Edited by user
Johnboy
This script runs in dom0. You should be aware of the impact. This CAN and WILL be a security issue. This script runs in dom0. You should be aware of the impact. This CAN and WILL be a security issue. This script is NOT free of bugs.
INTERVAL=0.5 # seconds INTERVAL=3 # seconds
umask 177 # u+rw,g-rwx,o-rwx umask 177 # u+rw,g-rwx,o-rwx touch "$SHMFILE"
``` ```