[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r2790 - GNUnet/contrib
From: |
grothoff |
Subject: |
[GNUnet-SVN] r2790 - GNUnet/contrib |
Date: |
Sat, 13 May 2006 16:04:24 -0700 (PDT) |
Author: grothoff
Date: 2006-05-13 16:04:22 -0700 (Sat, 13 May 2006)
New Revision: 2790
Modified:
GNUnet/contrib/effectiveness
Log:
calc
Modified: GNUnet/contrib/effectiveness
===================================================================
--- GNUnet/contrib/effectiveness 2006-05-13 22:55:35 UTC (rev 2789)
+++ GNUnet/contrib/effectiveness 2006-05-13 23:04:22 UTC (rev 2790)
@@ -1,10 +1,12 @@
#!/bin/sh
+CALC=calc
+calc 1 + 1 &> /dev/null || CALC=expr
FWD=`gnunet-stats | grep gap | grep forwarded | awk '{ print $9 }'`
SUC=`gnunet-stats | grep gap | grep success | awk '{ print $7 }'`
LOC=`gnunet-stats | grep gap | grep local | awk '{ print $8 }'`
UP=`gnunet-stats | grep Uptime | awk '{ print $4 }'`
-RAT=`calc $FWD / $SUC`
-RRAT=`calc $FWD / \( $SUC - $LOC \)`
+RAT=`$CALC $FWD / $SUC`
+RRAT=`$CALC $FWD / \( $SUC - $LOC \)`
echo "Uptime : ${UP}s"
echo "GNUnet total routing effectiveness: $RAT = $FWD / $SUC"
-echo "GNUnet remote routing effectiveness: $RRAT = $FWD / ($SUC - $LOC)"
\ No newline at end of file
+echo "GNUnet remote routing effectiveness: $RRAT = $FWD / ($SUC - $LOC)"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r2790 - GNUnet/contrib,
grothoff <=