Page 4 of 10 FirstFirst 123456789 ... LastLast
Results 61 to 80 of 192
Like Tree1Likes
  1. schraal's Avatar
    Posts
    43 Posts
    Global Posts
    44 Global Posts
    #61  
    Hi, here's the requested data. Cheers, Hilbert

    Code:
    root@palm-webos-device: ls -l /media/internal/.app-storage/file_.var.usr.palm.applications.org.daemon.de.netstat_0
      -rwxr-xr-x    1 root     root        68608 Jan 30 12:47 0000000000000001.db
      -rwxr-xr-x    1 root     root          297 Jan 30 12:47 stats.json
    root@palm-webos-device: cat /media/internal/.app-storage/file_.var.usr.palm.applications.org.daemon.de.netstat_0/stats.json
      {
        "wifigraph": {
          "traffic":    "49 MB",
          "rawtraffic": "51947653"
        },
        "wangraph": {
          "traffic":    "20 MB",
          "rawtraffic": "21079946"
        },
        "btgraph": {
          "traffic":    "0 Bytes",
          "rawtraffic": "0"
        },
        "lastupdate": "12:47:35 01/30/2010",
        "timestamp": "1264852055"
      }
    root@palm-webos-device: cat /proc/net/dev
      Inter-|   Receive                                                |  Transmit
       face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
          lo:  172045    1490    0    0    0     0          0         0   172045    1490    0    0    0     0       0          0
      bridge0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
        eth0:  353426     807    0    0    0     0          0         0   495508     997    0    0    0     0       0          0
        bsl0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
    root@palm-webos-device:
  2.    #62  
    @schraal: thanks. As it turns out, netstatd didn't execute the aggregate() function which will be triggered when you click on the reset counter button or if the reset day arrived. The daemon looks peridocally into the preferences DB of the app to see if the reset flag have been set there. This particular request seemed to fail ( there is an error in you log abou this). Also, there would have been more .json files in the db directory if the aggregate() had worked.

    Unfortunately I really don't know what happend I'll think about it, perhaps I've to add some debugging functionality to the app and daemon in the next version...

    @cmusik: nope, your patch doesn't change anything.

    - line=`grep "$interface:" $stats`
    - set -- $line
    - rx=${2}
    - tx=${10}

    and

    + line=`grep "$interface:" $stats | cut -d: -f2`
    + rx=`echo $line | awk '{print $1}'`
    + tx=`echo $line | awk '{print $9}'`

    are having the very same result, but my solution works with less external program calls. The problem you've seen must have another cause.
  3. #63  
    @debilater

    There if a difference if the space between the colon and the number is missing. This happens if you have downloaded more than 10mb. Then there is a difference.
    I know that my solution is not perfect, but it shows how to fix the problem.

    Here is some debugging I've done:

    Code:
    root@palm-webos-device:/var/home/root# line=`grep "ppp0:" /proc/net/dev`
    root@palm-webos-device:/var/home/root# echo $line
    ppp0:51357859 60306 6 0 0 0 0 0 3850512 43720 0 0 0 0 0 0
    root@palm-webos-device:/var/home/root# set -- $line
    root@palm-webos-device:/var/home/root# echo $1
    ppp0:51357859
    root@palm-webos-device:/var/home/root# echo $2
    60306
    root@palm-webos-device:/var/home/root# echo $line | cut -d: -f2 | awk '{print $1}'
    51357859
    As you can see the output is different and causes wrong calculations, because the packet count is used and not the byte count.

    Kind regards,
    Christof
  4. #64  
    dear debilater,

    thank you for this app, it helped me allot.

    looking forward for the historical statistics graphs.

    all the best in your application development and thanks again.
  5. #65  
    Hi

    how about this solution?

    Code:
    diff --git a/usr/sbin/netstatd b/usr/sbin/netstatd
    index 303d8cf..4ed990a 100755
    --- a/usr/sbin/netstatd
    +++ b/usr/sbin/netstatd
    @@ -320,10 +320,10 @@ while : ; do
     
         for interface in eth0 $ppp bsl0; do
            # fetch current rx+tx values from procfile
    -       line=`grep "$interface:" $stats`
    +       line=`grep "$interface:" $stats | cut -d: -f2`
            set -- $line
    -       rx=${2}
    -       tx=${10}
    +       rx=${1}
    +       tx=${9}
     
            # set to zero if not defined (e.g. when said interface is currently not online)
            if test -z "$rx"; then
    As an alternative you could also use /sys/class/net/{eth0,ppp0,bsl0}/statistics/{rx,tx}_bytes

    Kind regards,
    Christof
  6.    #66  
    Oh my goodness You're right, I'll fix it soon, thanks for the patch too!
  7.    #67  
    Netstat Daemon 1.0.8 fixes both bugs:

    - non incrementing Counters: this was a bug related to the filesystem, netstatd used the wrong directory to lookup for preferences DB and it's stats DB. Found and fixed by rwhitby - Thanks a lot!

    - counter above 10 MB not incrementing: using /sys/class/... files instead of /proc files from now on. Thanks goes to cmusik for finding this!
  8. #68  
    Hi debilater

    I just looked at the diff and I think that you are missing the tx line. I could only see "rx=", but no "tx=".

    Kind regards,
    Christof
  9.    #69  
    Oh ****

    fixed - 1.0.9
  10. #70  
    Quote Originally Posted by debilater View Post
    Netstat Daemon 1.0.8 fixes both bugs:

    - non incrementing Counters: this was a bug related to the filesystem, netstatd used the wrong directory to lookup for preferences DB and it's stats DB. Found and fixed by rwhitby - Thanks a lot!

    - counter above 10 MB not incrementing: using /sys/class/... files instead of /proc files from now on. Thanks goes to cmusik for finding this!
    Hi, and... Where can we find this 1.0.8 version? Thanks!
  11.    #71  
    Quote Originally Posted by NuttyBunny View Post
    Hi, and... Where can we find this 1.0.8 version? Thanks!
    In Preware Package Updates. But wait another 30 mins (pkg will be automatically generated), because 1.0.8 had a bug too, 1.0.9 is latest.
  12. #72  
    Quote Originally Posted by debilater View Post
    In Preware Package Updates. But wait another 30 mins (pkg will be automatically generated), because 1.0.8 had a bug too, 1.0.9 is latest.
    Hehehe.. Thanks

    I'll try in a couple hours.
  13.    #73  
    Ok, it's in preware now.
  14. #74  
    Quote Originally Posted by debilater View Post
    Ok, it's in preware now.
    got it, thanks!
  15. conum's Avatar
    Posts
    338 Posts
    Global Posts
    339 Global Posts
    #75  
    after having some problems with netstat (counter-reset didn't work) i have tried to update netstatd more than one time, but netstat don't work.
    I removed everything, re-installed netstat 1.0.7 and netstatd 1.0.9, but still no go: netstat starts and shows an error: "netstat service not running" even after a luna restart.
    schade eigentlich :-((
  16.    #76  
    Quote Originally Posted by conum View Post
    after having some problems with netstat (counter-reset didn't work) i have tried to update netstatd more than one time, but netstat don't work.
    I removed everything, re-installed netstat 1.0.7 and netstatd 1.0.9, but still no go: netstat starts and shows an error: "netstat service not running" even after a luna restart.
    The netstat app also uses the wrong path for the stats file:
    /media/internal/.app-storage/file_.var.usr.palm.applications.org.daemon.de.netstat_0/stats.json

    must be /media/internal/.app-storage/file_.media.cryptofs.apps.usr.palm.applications.org.daemon.de.netstat_0/stats.json

    on 1.3.5.2

    I'll fix it asap.

    Quote Originally Posted by conum View Post
    schade eigentlich :-((
    Trotzdem lieben Gruss nach Hamburg, ich beeil mich auch
  17.    #77  
    App bug fixed too (update will be available in some 30 mins to version 1.0.8).
  18. conum's Avatar
    Posts
    338 Posts
    Global Posts
    339 Global Posts
    #78  
    now i downloaded netstat 1.0.8 (when tapping orange + icon it shows 1.0.8, see pic1), but when opening it shows as 1.0.7 (see pic3)
    if i tap on preference/reset counters i get an error (see pic2) and the counters don't reset
    Attached Images Attached Images
  19. shinebar's Avatar
    Posts
    31 Posts
    Global Posts
    33 Global Posts
    #79  
    I updated to 1.0.8 but the app still shows "1.0.7" in the first line?
  20.    #80  
    Yes, ignore the version it shows, I forgot to change it in the views, sorry. Too much to do here...

    @conum: pic#2 is not really an error, it just tells you that counters will be reset. I used the error popup because I didn't get the normal dialog working, but this will change in the future. How long did you wait for the counters to reset? Note, that this will take some time, because the daemon resets the counters, not the app, it just tells it to do so, but the daemon picks up the apps preferences just every 5 minutes.

    @conum: and another question: had you installed netstat before the 1.3.5.2 update?
Page 4 of 10 FirstFirst 123456789 ... LastLast

Posting Permissions