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

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

#31 Post by Mike Walsh »

@Geoffrey:-

Thanks for your xbitmeter tar.gz.

I found that it needs an established network connection before /etc/init.d/bitmeter is run, that's why the script is in /root/Startup

See if this sorts it out for you.
Code:
#!/bin/sh

IFCONFIG="`ifconfig | grep '^[pwe]' | grep -v 'wmaster'`"
while [ "$IFCONFIG" != "" ]; do
sleep 1
ping -c 1 8.8.8.8
if [ $? -eq 0 ];then
break
else
ping -c 1 www.google.com
if [ $? -eq 0 ];then
break
fi
fi
done

/etc/init.d/bitmeter restart

Works a treat. What I did was un-install 0.7.6, delete the bitmeter directory in /root/.config, and re-booted. I then installed OscarTalks' .pet of the 0.8.0 version, as his starts the daemons, obviating a re-start. Started Chromium, and 'tabbed up' BitMeter; all working nicely.

Quit Chromium, and re-started it. As expected, the logs weren't updating... again. So; quit Chromium. Extracted your xbitmeter.tar.gz to /root/Startup. Checked with Geany...all present & correct.

Shut down, and re-booted. Back into Chromium, and re-started BitMeter; all behaving itself; logs now updating. Did a second shut-down, and re-boot (not strictly necessary, but I like to double-check things). Back into Chromium, and.....BitMeter 0.8.0 still working nicely! Excellent.

So; thanks for that. A nice, simple little 'workaround'; the best things usually are. Cheers, Geoffrey!

Appreciated.


Regards,

Mike. :D
Last edited by Mike Walsh on Tue 12 May 2015, 10:43, edited 1 time in total.

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

#32 Post by Mike Walsh »

mikeb wrote:I am not a child of confusion :)

Well I put it on the shelf fo a little while...but sounds like we are all getting some slightly erratic behaviour...I want to get to the bottom of the cause which may take a little time and head scratching.

Otherwise there should be no reason why this wont work on ANY pup...that is the beauty of it.

Mike

That's rather what I'm hoping, Michael. The basic concept is pretty simple.....and, as you say, there's no real reason why it shouldn't be able to work on all Pups, given a bit of thought.

It's not a particularly complex app, when all's said and done. A fair bit of 'window dressing', obviously; Rob's done a lovely job on it. But it's a very useful one.

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

#33 Post by mikeb »

What I use to detect a live network...

Code: Select all

while [ "$SUBNET" = "" ]; do
	SUBNET=$(ifconfig | grep inet | grep -v 127.0.0.1 | awk '{print $2}' | cut -d ':' -f 2)
	sleep 20
done
could probably be simplified as thats looking for the subnet to check for live NFS shares.... but similar idea.

The non creation of the log was not caused by a lack of network though.

Back on dry land so will have another play unless we have a reproducible package now.
As mentioned its probably just messed up permissions during my tests.

Mike

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

#34 Post by Mike Walsh »

Now installed, and working nicely, in Slacko 5.7.0.....using OscarTalks' experimental 0.8.0 .pet, and employing Geoffrey's 'xbitmeter' start-up workaround (modified from mavrothal's original...thanks, mavrothal!)

And thanks to Geoffrey, too, for sharing.

Next up; to see if I can get it to work in ETP's OBPrecise 14.07.26 'ChromeBook' Pup. Precise is known for being a wee bit 'awkward'; watch this space.


Regards,

Mike. :)

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

#35 Post by Geoffrey »

Mike,
I got it working in Vanguard, I stuffed up the libpcap link, here's a command that finds libpcap.so.x.x.x excluding symbolic links to create the libpcap.so.0.8 link for version 0.8.0

Code: Select all

LIBPCAP=`find /usr/lib -type f -name 'libpcap.so.*'`
ln -s "$LIBPCAP" /usr/lib/libpcap.so.0.8
I don't know how to run this if the package is a sfs, a pet is easy enough using a pinstall.sh script.
[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.

#36 Post by Mike Walsh »

Geoffrey wrote:Mike,
I got it working in Vanguard, I stuffed up the libpcap link.....
That's great, Geoffrey; excellent news. Well, you have at least had 5 years or so with Puppy.....and from the look of things, your scripting skills are certainly better than mine. I've had barely 6 months; 35 years of other OSs does not prepare you for the reality that is Linux, to say nothing of somewhat 'special' ones like Puppy.....but I already like it so much, I'll defend it to the death if necessary!
I don't know how to run this if the package is a sfs, a pet is easy enough using a pinstall.sh script.
Like I said, I am in no sense a developer.....but I did want to bring this to people's attention. This is where we need folk like 666philb, 01micko, OscarTalks, rcrsn51, mavrothal, et al., to (hopefully) get interested enough to volunteer some of their skills for us!

Still, we know it will at least work with Tahrpup, Slacko 570, Carolina, and now Vanguard. 4 down.....and about 400 more to go. It is at least a start...


Regards,

Mike. :)

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

#37 Post by mikeb »

Don't forget lucid and 412...indeed it would be odder if it did not work in everything .. :)

Its also the most on topic thread so far :D

mike

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

#38 Post by Mike Walsh »

Hah!

You just had to put that in, didn't you, Mike? :lol:

Yes, indeedy; it does make a change for me, I must say. Well, we have success in ETP's OBPrecise 14.07.26 'ChromeBook' Pup (V.2), too. So, if we now add Lucid & 412 into the mix (and D-Pup 'Wheezy', that Oscar originally tried 0.8.0 in), that makes 8 for definite we know it's working in.....which is a good start.

Obviously, we'll have to rely on various other individuals being prepared to try it out in their 'Pups' of choice. If I gave into it, it could well take me from now till Xmas to try it out in every Pup & Puplet out there; don't fancy it, somehow...

We really need some testers for the 64-bit versions. I know 0.7.6 (stable) works perfectly in 64-bit Ubuntu & its derivatives.....but I'm afraid the 'buntus are no longer enjoying my patronage, so I can't try it out on them any more.

Slow & steady, that's the best way.....

I think I need to a start a list in the OP that lists the Pups known to work with it; give new viewers a 'heads-up' from the beginning.


Mike. :D
Last edited by Mike Walsh on Wed 13 May 2015, 21:17, edited 1 time in total.

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

#39 Post by mikeb »

Well perhaps i should have said it should be possible to make one pet that works for all.
I only knocked up the sfs for testing really.

And yes its my duty to rise from my tomb in the puppy basement and rattle a few chains now and then ;)

mike

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

#40 Post by Geoffrey »

Here is bitmeteros-0.8.0-i386.pet.

I've included a pinstall.sh that creates the needed libpcap.so.0.8 symbolic link,

Copies /var/lib/bitmeter/bitmeter.db.new to /var/lib/bitmeter/bitmeter.db, was mentioned the database wasn't being created.

Runs the bitmeterweb start and bitmeter start

I'm guessing it should work in any pup

As always, use at your own peril :wink:

Edit: re-uploaded, changed so opens default browser created bitmeter.png so the icon shows in the menu with jwm, don't seem to like .ico.

Tested with Racy 5.2.9, Tahr 1.6.0.2, Wary 5.5, all work OOTB.
[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

#41 Post by mikeb »

Ok quick test of the 0.8.0 pet....

libpcap is a funny one.... perhaps the older bitmeter had it statically compiled in since it seems to provide functions that are needed for monitoring...or perhaps there were too many to duplicated in the end :)

As it happens 4.12 (thought I would test on that again) does not have it...debian etch provided the goods and even that has 0.8 as a symlink to 0.9.5! Actually Lucid does not have it (libpcap) either.

Ok those debian start up scipts will not work on 4.12 and lucid (and others?)...so tested from command line.
All works just fine so no problem there.
4.12 might not be considered but Lucid does still have quite a user base here.

Interestingly enough there is no log file generated that I can see...and since that seemed to be related to the problems I was having I will take that as a good thing :).

II also did not see any problems with the 0.8.0 build...the coding of the guy seems solid and yes the web inteface has those nice extras :)

Just some feedback.

mike

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

#42 Post by mikeb »

Just noticed the pet has everything as root.

The older package had all files as 1000:1000 ownership (actually on 4.12 it comes up as ftp:ftp and it behaved) which I am sure helped confuse matters so hopefully being all root makes life easier.

Mike

gcmartin

#43 Post by gcmartin »

BM080 installed to 2 32bit PUP distros; namely X-Slacko2.1 and Puppex6.0.

In each case, it shows in the Menu>Network>BitMeter OS... Launching from the menu does not present itself in the browser. On X-Slacko's menu, it has an icon, but on Puppex, it does not.

What can I present which would be helpful?

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

#44 Post by Geoffrey »

gcmartin wrote:BM080 installed to 2 32bit PUP distros; namely X-Slacko2.1 and Puppex6.0.

In each case, it shows in the Menu>Network>BitMeter OS... Launching from the menu does not present itself in the browser. On X-Slacko's menu, it has an icon, but on Puppex, it does not.

What can I present which would be helpful?
ldd shows these library files

Code: Select all

ldd bmcapture
	libpcap.so.0.8 => /usr/lib/libpcap.so.0.8 (0xb7753000)
	libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0xb769e000)
	libm.so.6 => /lib/libm.so.6 (0xb7651000)
	libc.so.6 => /lib/libc.so.6 (0xb749b000)
	libpthread.so.0 => /lib/libpthread.so.0 (0xb747f000)
	libdl.so.2 => /lib/libdl.so.2 (0xb747a000)
	/lib/ld-linux.so.2 (0xb7780000)
Check the task manager, bmcaputure and bmws should be running

I've had the pet work on X-slacko 3 which is slacko 5.9.3 don't know what Puppex's window manager is?

The bitmeterweb.desktop I edited so the icon is a png instead of a ico, it should now show in any menu

Code: Select all

[Desktop Entry]
Name=BitMeter OS Web Interface
GenericName=Bandwidth Monitor
Comment=Monitor your network speed using a web browser
Exec=/var/lib/bitmeter/runweb.sh
Type=Application
Icon=/var/www/bitmeter/bitmeter.png
Categories=Network;
You may have downloaded before I fixed the icon and changed the runweb.sh script, it now opens the default browser, download the pet again and try it.

You can try http://localhost:2605 in a browser and see if it's working
[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]

gcmartin

#45 Post by gcmartin »

Thanks @Geoffrey. I will download and replace 080.

Code: Select all

URL ===> localhost:260
Works, prior to replacing.

I noticed that the utilty implies, by its name, a 32bit usage. Will there be a separate utility for 64bit PUPs or will the 32bit morph into 64bit as well?

Thanks for this very good tool for home data management use. And, thanks to everyone for addressing this understanding.

Edited: Replacing with the latest has resolved the issues reported earlier. Thx, again, Geoffrey! 8)
Last edited by gcmartin on Wed 13 May 2015, 19:36, edited 1 time in total.

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

#46 Post by Mike Walsh »

My, you have all been busy bees while I've been to the seaside today....!

@Geoffrey:-

Goodness me; I shall to have to turn my back on things a bit more often if this is what happens in my absence...! :lol: That's marvellous, Geoff. How certain are we that this will run OK in the Pups you've tried it in?

@ gcmartin:-

As stated in the original post, there are 64-bit versions of both 0.7.6 AND 0.8.0. However, obviously no development work will go on with those if nobody's yet tried them. We need testers for the 64-bit versions. Install them (taking all necessary precautions, of course) from the .deb file; note what happens.....then give us all some feedback! That's what's needed.

What work has been done so far is all on 32-bit 'Pups', for the simple reason, I expect, that there's more of them in general use by the community. That in turn, is also for the simple reason that 64-bit came along after 32-bit; so in terms of what elderly hardware is in use, I think there would naturally be a higher proportion of 32-bit systems. As stated, I'm NOT a programmer, or 'coder'. I did, however, bring this to the community's notice because I genuinely believe that it does have a place for many Puppy users.

I don't have any 64-bit Pups myself to try them out in. Although I have a 64-bit system (AMD Athlon 64 X2 3800+), I've always preferred to run 32-bit Puppies, for the simple reason that they run so fast.....and I'm not too keen on the likes of FatDog, et al. That's not to say that kirk & jamesbond haven't done some absolutely marvelous work with them; it's just not my cup of tea. I've tried FatDog 700 in the past; didn't get on too well with it....

I am, however, considering giving Slacko64 a try, so.....we'll see.

Anyway, it's just my bit to contribute to the community, since I enjoy Puppy so much. The 'dev' work, however, will of necessity have to come from other interested parties...who know what they're doing! (I don't mind admitting I'm very much a 'noob' at present.) Oscar, Geoffrey & mikeb have done some sterling work on this already.....


Regards,

Mike. :)
Last edited by Mike Walsh on Wed 13 May 2015, 21:15, edited 3 times in total.

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

#47 Post by Geoffrey »

mikeb wrote:Just noticed the pet has everything as root.
That's my fault, I had a mishap with the properties on the drive, it don't seem to have been detrimental.
I might make another and see if it works the same with the ftp ownership, though maybe better to let sleeping dogs lie.

gcmartin wrote: Will there be a separate utility for 64bit PUPs or will the 32bit morph into 64bit as well?
Only if someone with a 64bit version of Puppy packages the bitmeteros_0.8.0-amd64.deb, I don't have a 64bit version to try it on.
[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

#48 Post by mikeb »

yes let the dogs lie... I was actually wanting to make it all root anyway.
Sometimes i find packages with odd permissions and sometimes it causes problems...in this case i suspect its not intentional or necessary.

Well all good progress :)

been fiddling with Thunar of all things so left this on the side for a little anyway.

mike

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

#49 Post by Geoffrey »

Mike Walsh wrote: How certain are we that this will run OK in the Pups you've tried it in?
I think it should work ok, they were booted with no save file, installed the pet, run bitmeter from the menu and worked without a hitch.

I packaged the 64 bit version for gcmartin to test, changed all the files to "root" ownership, waiting a report
[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]

gcmartin

#50 Post by gcmartin »

Tested results
Installed with no reports of issues to LxPUP64 and on an old nonsupported version of PUPPY Chubby. Both showed the Menu>Network>BM as seen in 32bit, and both would launch the browser to localhost:... But, in each case, the browser port would not open to BM's local page port 2605.

Edit: Lighthouse and its derivatives (Chubby is one of them) will install a ".deb" file. The deb works where the pet did not launch.
Last edited by gcmartin on Wed 13 May 2015, 23:27, edited 2 times in total.

Post Reply