BIT METER OS 0.7.6 (stable) & 0.8.0 (experimental)

Configuration wizards, scanners, remote desktop, etc.
Post Reply
Message
Author
User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#81 Post by Mike Walsh »

mikeb wrote:One note for testers...a database written by 0.7.8 will prevent 0.8.0 starting..you will get an error message in the log. Might cause a few red herrings. The reverse may also apply.

mike
Quite so; have to agree with you, there. I found that out myself when upgrading from one to t'other a few days ago. That's why I've added the suggestion into the OP that people will find it helpful to go into /var/lib and delete the bitmeter directory after uninstalling 0.7.6 and before installing 0.8.0.

Should prevent a lot of 'head-scratching'.....


Mike 2 Mike. :)

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#82 Post by mikeb »

Useful tool though...just determined with it that ebay uses an average of 2MB a page...no wonder i chalked up 400MB searching for a boat nav light!!!!

Now thats bloated web design...and its NOT the images either!!

mike

robd
Posts: 4
Joined: Sun 17 May 2015, 14:52

#83 Post by robd »

Hi

I'm the developer of BitMeter OS, thanks to Mike for alerting me to this thread.

It's very rewarding to see all the effort that you have put into getting the app working on Puppy! I haven't done any real development on BitMeter for a number of years, but if anyone has specific questions about any issues you have found please reply here and I'll try to help.

Once you have a PET or SFS package that you are happy with I will add it to the download links on my site, so hopefully others will benefit from your work

best wishes

Rob D

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#84 Post by mikeb »

Hi rob.... this is another mike.

thanks for dropping in...hope you can make some sense of all our ramblings.

Seems like you have gained some popularity around here...or notoriety ;)

regards

mike

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#85 Post by Mike Walsh »

Well, well, well.....howsabout that then, guys & gals? We have had a visitation.....and a most welcome one, too.

@robd:-

Thank you very much for replying to my e-mail; it's much appreciated. I did say that I'd find out one way or another if this was still under development or not; at least now I know!

I still stand by what I said, in my original post; BitMeterOS is, to my way of thinking, one of the most useful small apps I've ever found...and if one individual found it useful, then it was likely a fair bet that others would, too. When I was using XP a while back, I used to regularly troll the download sites to see if I could glean any gems from the vast oceans of Windows dross that used to overflow the sites. You'd occasionally find something useful; that was how I came across a company called ShaPlus Software. They mostly produce business software for the Muslim community.....but they also produced an absolute little gem of a bandwidth meter:-

http://www.shaplus.com/bandwidth-meter/

Small, neat, and very simple...and told me just what I needed to know. In more or less the same way that yours does. To quote the UK 'Ronseal' television advert; '...it does exactly what it says on the tin...'

To reiterate; BitMeterOS is ace, IMHO. And one thing you soon learn, here on the Forums; we have some extremely talented, and very knowledgeable individuals, here in 'Puppyland'... They're the ones who've put the hard graft in; all I did was give the app an airing, and brought it to the community's attention. They deserve the credit...definitely not me!


Regards,

Mike. :)

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#86 Post by Mike Walsh »

@robd:-

In fact, I DO have one question, now that I think about it. I moved to Linux about a year ago, as I said in my message to you. Nearly from the start, I looked for something similar to, and then discovered, BitMeterOS; I think the stable version then was 0,7.5, and 0.7.6 was the experimental version. When 0.8.0 was released, I moved to 0.7.6.

With 0.8.0, the web interface now shows the difference between total usage (up & down), and internet usage. It didn't take me long to find out that file-sharing via LAN was a lot more prevalent in the Linux world than it was in the Windows one. I've since come to realise that in fact, networking and 'file-sharing' is becoming quite standard these days, with the advent of media-streaming, and home-based media server setups.

Was this in your mind when you developed the 0.8.0 version?


Regards,

Mike.
Last edited by Mike Walsh on Mon 18 May 2015, 01:11, edited 1 time in total.

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#87 Post by Geoffrey »

Mike Walsh wrote:Obviously, it won't make much difference if you have several GB of RAM to play with (as is the case on my desktop), but if you're in the 'upto a gig' bracket (as is the case with a lot of older hardware, including MY old Dell), then it might be wiser to recommend to people that they use the stable 'version'...

What do you think?
0.8.0, 32 bit and 64 bit versions appear to be working fine for me so far , as for the memory usage I don't think it will be that much of an issue.

I think the 0.8.0 version would be the best to use if your concern is internet bandwidth and you have a local network to consider too, else 0.7.8. should be adequate.

Maybe a tray icon to start and stop it would be of benefit, or a way to only start when connected to your metered connection, don't need to have it running if using other network access
mikeb wrote:Don't forget lucid and 412...indeed it would be odder if it did not work in everything
Whats needed for lucid and 412, does the 32 bit package work ok as is ?
Last edited by Geoffrey on Sun 17 May 2015, 22:46, edited 1 time in total.
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#88 Post by mikeb »

well aside from the problem with lucid and 0.7.8 web display some pups do not have the debian daemon binaries for starting and stopping.... I just used bitmeter & for example in the scripts.

pcap...some don't have it at all ..some need a link...some have the link...a mixed bag. My thoughts were to include a copy of 0.8 as its small... make it independent of whatever system its on then.

memory usage...not so much a case of can it be handled but anything way over the 1-2mb suggested a problem that may need looking at.

mike

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#89 Post by Mike Walsh »

@Geoffrey:-

A tray icon sounds a good idea, Geoff. It could work in much the same way as rcrsn51's experimental Bluetooth packages. Aside from all the supporting stuff, Bill's configured the set-up with a tray icon for actually enabling the Bluetooth connection. It's a simple toggle affair; click once for on, and again for off.

Could be a good addition. I like the sound of that. As I've said, however, I have to leave the mechanics of that to people like your good self: me no know what the hell I'm doing, as far as that goes..! I really think this is your 'baby' now, Geoffrey...

Comments?


Regards,

Mike. :)

User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

Bitmeter for a multiPup computer?

#90 Post by davids45 »

G'day,

How does Bitmeter or any other similar monitor store its data. Or where?

With for example, Osmo and Seamonkey, I can set every Pup on this computer to use the same profile data, sym-linked from a common file on a boot-mounted data partition.

So I can boot any Pup any time and have access to the same data, and add to that during any session.

The Pup-default meter on the taskbar (pops up with a hover over the internet connection icon) keeps a sort-of record for that Pup during the month (where I wonder?) but it is the aggregate for the computer itself that would be more handy to know.

Does a router store this sort of information so that it could be accessed from a Pup browser? With several old desktops set up with Puppies for the visiting grandkids, and an MS-commited wife, this would be interesting data to get/monitor as the common point of our home network is the router. Particularly now smart-phones as well as visiting laptops also go through the router via wifi.

Our ISP has its opinion about our total usage, of course :shock: .

David S.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#91 Post by Mike Walsh »

Hello, David.

Now; let's see if I have this right. As I understand it, BitMeter (I can't vouch for other monitors, as I haven't tried any others...yet!), stores its data in a database called 'bitmeter.db' in /var/lib.

By using the address bar entry 'localhost:2605/index.html', you are then telling the local loopback system to listen, on port 2605, for the most recent measurement from BitMeter, as it is in fact a small 'server'. The app itself is fairly configurable; you can set the 'Summary' tab to refresh itself at any interval you like, right down to once a second if you want. I have mine set for once every 7 seconds.....the default is 10.

I haven't got a clue whether other monitors work in this fashion.....I only know that this is how BitMeter OS works. Now that the author, Rob Dawson, has posted in the thread, you may be able to get a more detailed answer from the man himself. He's indicated that he's quite willing to answer questions on the subject.


Regards,

Mike.

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#92 Post by Geoffrey »

mikeb wrote:pcap...some don't have it at all ..some need a link...some have the link...a mixed bag. My thoughts were to include a copy of 0.8 as its small... make it independent of whatever system its on then.
Is there a particular pcap that's needed, the one in Vanguard is as in Carolina/wary, if that will do I can add that so it's only used if the native version doesn't exist.

Could likely have the pinstall also create new bitmeterweb and bimeter scripts to suit the versions of puppy that don't support the debian one's.

So far I'm at this as a pinstall if I add the Carolina libpcap.so.0.8 @179.1 kB, is there a smaller one ?

Code: Select all

LIBPCAP=`find /usr -type f -name 'libpcap.so.*' | head -n 1`
if [ ! -f "$LIBPCAP" ]; then
cp libpcap.so.0.8 /usr/lib/
else
LINK_PATH=${LIBPCAP%/*}
if [ ! -f "$LINK_PATH/libpcap.so.0.8" ]; then
ln -s "$LIBPCAP" "$LINK_PATH"/libpcap.so.0.8
fi;fi
cp /var/lib/bitmeter/bitmeter.db.new /var/lib/bitmeter/bitmeter.db
/etc/init.d/bitmeterweb start 
/etc/init.d/bitmeter start 
exit 0
How would this be as a start, stop script ?

Code: Select all

#!/bin/sh
# Lucid/412
DAEMON=/usr/bin/bmcapture
PROC=bmcapture

test -f $DAEMON || exit 0

doStart(){
    if ps aux | grep $PROC | grep -v grep > /dev/null
	then
	echo -e BitMeter Capture daemon is running...
	else
	echo -e Starting BitMeter Capture daemon: bmcapture
	$PROC &
	fi
}
doStop(){
    if ps aux | grep $PROC | grep -v grep > /dev/null
	then
	echo -e Stopping BitMeter Capture daemon: bmcapture
	pkill -f $PROC
	sleep 1
	fi 
}
case "$1" in
  start)
    doStart
    ;;
  stop)
    doStop
    ;;
  restart)
    doStop
    doStart
    ;;
  force-reload)
    doStop
    doStart
    ;;
  *)
    echo "Usage: $0 {start|stop|restart}" >&2
    exit 1
    ;;
esac

exit 0
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

Bitmeter for multiPup desktop

#93 Post by davids45 »

G'day Mike Walsh,

Thanks for the quick answer.

If Bitmeter keeps its data as a .db file in /var/lib, then can I set this file as a sym-link for each Pup's Bitmeter to the same 'real' bitmeter.db file on my computer's data partition? Whichever Pup I am using will then use this one-and-only common bitmeter.db file, so for this computer, I will have a single record of its internet usage.

I could do the same for the grandkids' old HP desktops here too, as they do like to play on-line ABC4Kids games for their age-group (1-4 years old) when not watching Peppa or Thomas or Roary or Sam or Bob or ... etc :roll:

David S.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

Re: Bitmeter for multiPup desktop

#94 Post by Mike Walsh »

davids45 wrote:...If Bitmeter keeps its data as a .db file in /var/lib, then can I set this file as a sym-link for each Pup's Bitmeter to the same 'real' bitmeter.db file on my computer's data partition? Whichever Pup I am using will then use this one-and-only common bitmeter.db file, so for this computer, I will have a single record of its internet usage...
Hmm. I don't know, to tell the truth. As I've stated in the thread, I'm pretty new to all this, compared to some other folk on the forums.....only been here for about 10 months, I think..?

I only discovered the use of 'sym-links' myself less than a month ago! If you mean would it work for multiple 'Pups' on the same hard drive, well..... Actually, I can't think of any reason why that shouldn't work; as long as they were all running the same version of BitMeter (0.7.6 or 0.8.0; I don't know if it would make a difference if you had, say, a mixture of 32- & 64-bit 'Pups'...)

I don't think it would work across a network for multiple machines, though.....I have no idea if symlinks can be set across a network (I'm more than willing to learn, though!) That's where Rob Dawson's 'bmsync' utility normally comes in; you can read more about that here:-

http://codebox.org.uk/pages/bitmeteros/bmsync/man

As I understand it, though, 'bmsync' has to be run manually (say like once or twice a day, simply to total data readouts across a network); I don't think it can be set to 'autorun'...

Something to think about, there... Thanks for that, David. I've been wondering if there was another way to 'sync' data in that manner; I've never been able to use 'bmsync' between OS's on the same machine, because it isn't designed to work like that. It's intended for use between two physical machines, running simultaneously.....you could have 20 Pups on one machine, but you can only physically run one of them at a time...

Try it, is all I can say. What's the worst that can happen?


Regards,

Mike. :D
Last edited by Mike Walsh on Mon 18 May 2015, 08:26, edited 1 time in total.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#95 Post by Mike Walsh »

@Geoffrey:-

A question for you. If you look at the last couple of posts, between me and davids45; would that idea work? Or would you get multiple instances of the same data?

What part of the app is it that actually writes to the database in /var/lib? Would that need to be what was 'sym-linked'.....or have I got hold of the wrong end of the stick here?

My 'noob-ness' is showing, ain't it? :lol:


Mike.

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#96 Post by Geoffrey »

Mike Walsh wrote:@Geoffrey:-

A question for you. If you look at the last couple of posts, between me and davids45; would that idea work? Or would you get multiple instances of the same data?

What part of the app is it that actually writes to the database in /var/lib? Would that need to be what was 'sym-linked'.....or have I got hold of the wrong end of the stick here?

My 'noob-ness' is showing, ain't it? :lol:


Mike.
Sharing the database from outside the save file should work for multiple pups on the same machine using a symlink , the database file for the 32 and 64 bit versions appear to be the same, so sounds like a plan :wink:

We're all noob's with varying degrees of experience and constantly learning :)
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#97 Post by Mike Walsh »

@Geoffrey:-
We're all noob's with varying degrees of experience and constantly learning :)
That's for sure.....

Okay; enough with the jollity, already..! :lol: To expand upon this, I would like to know something else here, if I may?

If you go into /var/lib, then click on the 'bitmeter' directory, there's 3 items, yes? I know what the 'runweb.sh' does, but there's two database entries; 'bitmeter.db', and 'bitmeter.db.new'. What's the difference between these; does BitMeter use the value from the latter, add it to the former, and then overwrite.....or something? In other words, is one temporary storage, until the total is calculated and written to the 'permanent' database?

This is, of course, assuming that you can 'see' the structure of the app in the coding, and are able to figure out quite how it runs...

I'm just curious as to which of those '.db' files should be used as the symlink for obtaining an overall total between multiple Puppies...and I suspect davids45 would like to know, too!


Mike. :?

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#98 Post by Mike Walsh »

@Geoffrey, davids45:-

Now, then; seems we have an answer as to whether symlinking to a common database will work...

It won't.

I initially set up a small data partition. In Tahrpup, I then dragged /var/lib/bitmeter/bitmeter.db across to it, and 'Moved'. I then dragged it back again, and this time 'Link(Absolute)' to create the link. By itself, this works fine.

In Slacko, I then repeated things; only this time, I deleted /var/lib/bitmeter/bitmeter.db from Slacko's install, and symlinked Tahrpup's bitmeter.db (from the new partition) back to it.

Did the same thing again in OBPrecise 14.07.26 'ChromeBook' Pup.

I then went back to Tahrpup, to see what the result was. And.....a big, fat zero. BitMeterOS had quit working. 'This page is not available...'

It was the same story in Slacko & ChromePup. BitMeterOS was non-operational. For now, I've uninstalled, and re-installed, so everything is currently back to stand-alone separate databases, as it was originally.

Mind you, I'm willing to bet that this is mostly due to my lack of experience with the way scripts work.....and not really knowing quite what I'm doing. I'm more than willing to be tutored, here..!

Perhaps the common 'bitmeter.db' needs creating from scratch, rather than copying, and then symlinking one of the originals? I honestly don't know. Or could it be that where I've gone wrong is in not stopping BitMeter before setting up the symlink? I know your script auto starts BitMeter at boot time, so.....how do I temporarily stop it, and then re-start it?

Thoughts? Comments?


Mike. :(

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#99 Post by mikeb »

database..its an sqlite database so those rules apply... how it would behave for multiple simultaneaous accesses...hmm could be interesting .
Otherwise a symlink makes sense for sharing...assuming all using the same version of bitmeter AND the structure of the data is not custom per machine... though its totals that are of interest for a group of machines...might mean 0.7.8 handles it better...just my view of the subject. By the way no usage logging in my netgear...you would need bitmeter adding to it :)

Geoffry.
Yes that start stop script seems suitable...and should work for any pup...I did a simpler version for testing thats all. bitmeter binaries do not self daemonise so have to be handled as such.

I have a libpcap from debian etch that worked..158k...and that is really 0.9.5 not 8..I just renamed it...seems like an old lib which also means anything calling it specifically would be fine. I wonder how small a true 0.8 version is :)

wow busy thread... and no spell checker :D

mike

gcmartin

#100 Post by gcmartin »

Hope no one get upset by this entry, but, @Davids45 is really a VERY GOOD question for the many/most of us who have a LAN with TVs, PCs, etc.

His question points to a central point of collection. This is important as internet enters the home network via some central point. And at that central point is where accountability should exist.

Thanks @Davids45 for presenting that.

Now that this is presented to us, it steers us to look at some mechanism that can be employed such that monitoring traffic in/out of the home network can be accurately measured and available to all.

@Gyro has presented a very workable solution available to ALL in the forum community without the need to ask for permission. Its uses simple off the shelf items and it appears, though it is based at 32bit, that it is no great leap should anyone want to use on any platform. His solution is a PUPPY distro based router for a home network. Thus, this solution running in that frame would accomplish the best as any local PC could simple access its web port for display or taskbar popup data display.

This or similar approach would mean a single LAN monitor with every PC having access to review data traffic accurate for the home network relating to its internet traffic.

One last item to note. If a central approach like @Gyro's is used, the neat thing is that it could morph to any known solutions for getting internet to the home:
  • @Gyro's project via modems (cable/dsl/fiber) from ISP
  • @Gyro's project via modems (2G/3G/4G) from telcos
  • @Gyro's project via router front ending the home network
  • @Gyro's project via phone tethering
  • @Gyro's project via satellite
  • etc.
Thus @Gyro's project offers great flexibility in setup and use with any of these individually or in combinations.

Hope this clarifies a view that I perceive from his question. This does NOT change what is already done. Again, "To address this thread's efforts, centrally, in no way changes this thread's work." It merely moves the collection point to Gyro's router project's ability, while also making this thread's information available to all on the LAN without each LAN device being a collection point, individually.

This can be done on something a simple as an old motherboard, alone (little or no peripherals), as long as it has the limited RAM needed to run the router-bitmeter-browser to expose the port. Several ways to boot something this simple. Almost a nocost/lowcost solution for control beyond the Telcos and ISP ramp devices. And, there are many similar hardware for a PUP setup which can be useful from ... to ...

Hope this helps
Last edited by gcmartin on Mon 18 May 2015, 23:15, edited 5 times in total.

Post Reply