I have several Raspberry Pi computers running, and they're currently using smtp to tell me what's going on Error reporting etc. But I'd really like to find a better way. I found Sensu, but perhaps it's overkill.
Have you tried Sensu on a Raspberry?
Are there any other monitoring solutions you recommend?
I havent tried sensu on raspberry pi, but the sensu-client gem is extremely light weight. There is a check-tail check that might help you with checking your errors.
Btw, it does seem that the raspberry pi does run ruby.
The dashboard is great also, being that it uses rabbitmq on the backend, you can have multiple machines checkin without having to configure each over and over.
Do you have a static amount of Pis? Or are you planning on fluctuating?
I strongly suggest against nagios/nrpe for something that already has lower than normal resources.
I use telegraf with influxdb ang grafana for the monitoring. And Monit for the proactive monitoring for my Pis.
Related
I am trying to get started developing unittests for my embedded system, actually its a firmware that was already developed a while ago, now we want to add CI to it and start this by writing unittests.
I read blogs like
https://dmitryfrank.com/articles/unit_testing_embedded_c_applications
or https://interrupt.memfault.com/blog/unit-testing-basics and they recommend to implement the unittests via a unittest framework as unity, cpputest and so on and so on. I tried to figure out how to make this run on my windows machine that I use at work but it seems tedious and prone to problems etc.
I also tried to start working with the microsoft vs unit testing framework but got discouraged after running into problems here, too. I think this can't be so hard, it shouldn't take so much effort to start writing the first littlest test...
Do you have experience with this and what would you recommend? Is it viable to do this on Windows? Should I push my boss to let me use a VM, WSL or a Machine that runs Ubuntu? In the end I would like to transfer the CI System to a lab pc (edit: this pc would then also be connected to the hardware, flash it, maybe run a debug build on it and compile some answers that it gets from the hardware... but now I want to talk about the unit test), so if I start developing on Ubuntu now, I will have to deal with this lateron, too...
Maybe a lot of thoughts but I feel a bit overwhelmed with the problem and don't know how to start.
Thanks for you replies, people!
Edit: The discussion I am looking for is not about whether unit testing for embedded systems is useful or the right approach (also interesting but I would like to seperate it) . It's about the question whether it can be fully developed under Windows or whether a Linux System is necessary to be efficient.
I am writing some simple test automation to access the USB port in Ubuntu, and determine driver specific details, devices that are connected, and operating mode (USB 2 , 3 , etc ...).
I have not done any development in this area, and was looking for advice on libraries / recommendations to accomplish this.
Thank you for you help!
Dan.
I've done this using libusb. You can get get started here. http://libusb.sourceforge.net/api-1.0/ If you're just looking at seeing various usb devices, it's pretty easy. Here are some examples that you can get up and running pretty quickly: http://www.dreamincode.net/forums/topic/148707-introduction-to-using-libusb-10/
I found the sourceforge info useful, but could not get the install to work in Ubuntu.
After some searching, I found Libusb and how to use its packages in Ubuntu
This appears to resolve my issue; plus interesting point about using usb.h instead of libusb.h to compile.
Thanks for all the input!
Dan
I've been investigating a way of tracking a device's location in a building, at first I was intending to use iBeacons. However I have been since told that it must be done by monitoring access points and looking for the MAC address of that device.
I can't seem to find any generic sort of library or API that can hook into an access point and give me details. Infact I don't even know where to start looking which is making it even harder.
Has anybody had dealings with this and could point me in the right direction? Any programming language acceptable.
I have written software from scratch to do exactly this, but to my knowledge, no frameworks are available.
The basic steps are:
Get a number of small, low-cost computers (Raspberry Pis work nicely) to act as sensors that do WiFi scanning in promiscuous mode, collecting unique macs and detection times. On Linux, you can use C or Java software to collect these records.
Write the info from the sensors to a server, including the sensor identifier so you know where each device was detected.
Write lots of code to crunch the numbers.
You should be aware of three big issues:
Mobile devices aren't always detectable on WiFi. If they are asleep, or simply not communicating, you will not detect them. On iOS the best you can hope for is detections every minute or so if the device is not locked and not actively using WiFi.
On iOS 8+, mac addresses are scrambled under certain conditions,boften making it impossible to track unique devices.
Building the above from scratch is a lot of work. Think several man months for even a basic system.
I know you were asked to build it this way and not with beacons, but beacons do provide a much simpler path forward if you can ensure an app on each device and can revisit this design constraint.
I suggest you to do this with iBeacons.
But :
On IOS 8 , when u try in anyway to get mac adress from a device , you obtain this value : 02:00:00:00:00:00.
The best way to get an unique identifier for a device is to use the identifierForVendor method form UIDevice.
Like this :
UIDevice *device = [[UIDevice alloc]init];
NSString *uniqueIdForDevice= [NSString stringWithFormat:#"%#", [device identifierForVendor]];
NSLog(#"%#",uniqueIdForDevice);
That gives you an ID that's unique for that device for your company.
I hope this can help you.
I'm not sure what the constraints are on your particular design but there are existing systems that allow you to get the kind of monitoring I think you're looking for. As davidgyoung writes, there are a few technical challenges that exist at OS level that will be present in whatever wi-fi solution to choose (e.g. iOS MAC address rotation). That aside, you might get some value from looking at solutions from Wi-fi hardware manufacturers like Cisco: https://meraki.cisco.com/solutions/cmx . They have a pre-built platform for visitor data (i.e. showing you where phones are in buildings/spaces). I think all the major wi-fi hardware manufacturers have something similar now and Cisco are likely to be top-end. From memory, Aruba were much cheaper (I'm going back ~10 months).
There are also software providers like Euclid Analytics ( http://euclidanalytics.com ) who build on top of the hardware and API's of providers like Cisco to provide visitor info like I think you want.
This isn't an exhaustive list as I'm writing this from memory but hopefully a bit of Googling based on the above should give you a better chance of success than rolling your own.
Good luck,
James
If you want to do indoor location services, then I would recommend checking out Cisco Connected Mobile Experience software.
You can try it free.
Based on my analysis, it is the best solution out there. I am biased because I work there. But, I do competitive analysis and have yet to find anything I think works better.
I'm into something about writing a "Mock GPU driver" for Linux based systems. What I mean is that, simply I want to write a driver (Behind X-server obviously) to answer X's API calls with some debugging messages.
In other words I want to fool Linux about having an actual GPU. So I can make a test-bed for GUI-accelerated packages in console based systems.
Right now, if I execute a GUI-accelerated package in Linux console based systems; it'll simply dies due to lack of a real GPU (or a GPU driver better I'd say).
So I want to know:
Is it even possible? (Writing a GPU driver to fool Linux about having an actual GPU)
What resources do you recommend before getting my hands dirty in code?
Is there any similar projects around the net?
PS: I'm an experienced ANSI-C programmer but I don't have any clue in real Kernel/Driver development under *nix (read some tutorials about USB driver development though), so any resources about these areas will be really appreciated as well. Thanks in advance.
What you are looking for is actually part of Xorg server suite, and it is called Xvfb (virtual framebuffer).
If you're not afraid of a bit complex bash, you can take a look at Gentoo's virtualx.eclass for an use example (we use it to run tests which require X11).
A good place to start is the Mesa project - it implements OpenGL in software. It has a way to trick the OS into thinking that it is the OpenGL driver.
I'm working on a free software (bsd license) project with others. We're searching for a system that check out our source code (svn) and build it also as test it (unit tests with Check / other tools).
It should have a webbased interface and generate reports.
I hope we don't have to write such a system from null by ourselves...
You surely do not have to code this yourself - there are a lot of continuous integration systems which are able to check out source code from systems such as SVN and they are generally easy to extend with your own tasks, so running custom test scripts/programs should not be a problem.
While these CI systems are probably not written in C, this does not matter, since they just need to be able to access and compile your source code, for which they will use an external compiler anyways.
Just to list some of the well known CI tools:
CruiseControl
Hudson
TeamCity
You might also be interested in other questions on Stack Overflow tagged as continuous-integration. :)
I don't think that there's a buildsystem that is capable of doing all this tasks - but what about combining them?
SCons is a nice buildsystem that runs on every machine that has Python. It can even build directly from SVN. For automatic building you can try Buildbot.
Check out buildbot
My vote would be CruiseControl.NET, it has everything you are asking for. It is open source so the costs are low, and it has a very active user community on google groups to help you with your problems as you grow accustomed to it. Also, although .NET based, using MONO it is very nice on Linux and Mac build servers as well so you have everything covered.