From dev-return-6032-archive-asf-public=cust-asf.ponee.io@edgent.apache.org Mon Nov 19 13:27:50 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 5BF5C180671 for ; Mon, 19 Nov 2018 13:27:49 +0100 (CET) Received: (qmail 86310 invoked by uid 500); 19 Nov 2018 12:27:48 -0000 Mailing-List: contact dev-help@edgent.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@edgent.apache.org Delivered-To: mailing list dev@edgent.apache.org Received: (qmail 86298 invoked by uid 99); 19 Nov 2018 12:27:47 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Nov 2018 12:27:47 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 655E2C8B81 for ; Mon, 19 Nov 2018 12:27:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.34 X-Spam-Level: X-Spam-Status: No, score=0.34 tagged_above=-999 required=6.31 tests=[DKIMWL_WL_MED=-1.459, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id RtEeyp3OSu5w for ; Mon, 19 Nov 2018 12:27:45 +0000 (UTC) Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id BFB115FAD5 for ; Mon, 19 Nov 2018 12:26:02 +0000 (UTC) Received: by mail-io1-f41.google.com with SMTP id n9so2273134ioh.7 for ; Mon, 19 Nov 2018 04:26:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=WJPyYOCbW1p4qA2EIZ50xwyPcCP8vLd6t/2FBSTYNf0=; b=ZhAKHP8s8gZiKSf3SXCQgq1c4CC2Flb5izkysUL2Xn4t4Gq19YqhZMALoFa6YSMnDL +wvZVrqFX6OXNUSgq2FkGBzTq5eWUlKz2Edx5+PF5LsZFx3xtYZWbKTGfXaq/YlA+A0n O2DamQ5Vyr8fE0MQCu/37+x+7Wmjdhb/pF+JA8ZOJEaXfdVzrt4riF6YDzzP1h7rZVm2 y6j71ARKLNkM7yxL0FsTxXDVct48zVvRfftqB9MotmDHAqkjkaVcQoMYtPUuHiF20Sk9 UD1ChsmCM3gTTl3Lq2V+8ZIn8RmFrHc5pC1+zhAcvPgg1ELr+9thnR9zkYbCZwI/DMgB LE+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=WJPyYOCbW1p4qA2EIZ50xwyPcCP8vLd6t/2FBSTYNf0=; b=XmGfCk7Xl9NN591nGHSkNqZVRd97b6SyaBnlkqbQTSeceuxhLECREs9Ami5QEFAWN5 Msxn+GcFELZMd3Csx0wwh72e6njmtI2ue31ud4upNi0c78q+IpgfLfRfAxkc6XwkrhW8 DpA548TfyUNvG1WO9O5ohjOI5kvwNFCayGM188N7W5GBl/hOOJYc9mE7Vfj11dPpCQsp MxRd/YMV2StRdj6KuimWUKpYlBkXHvO7eFlZ0NhmMJF5vcfq1n8Syc+5YayuUpTQ7QIw jVNy/YaXbJwDXxSydElz2kslK8fMXNY+4UjM7+x4jAGe+wN9hiPMgrx7jtml8CEGl0rh WqGA== X-Gm-Message-State: AA+aEWa5wQ0sCo8pliAfaI4Ag0C0b9Af1J8T1v4buHemZy9/Jdxg+PdK W5u5m0KCIjgqSdf6eNKUc0aHyYKnMQXWKhuBjoiYbCPp X-Google-Smtp-Source: AFSGD/Vi5nFzZnYEqReGLN8necBm6ms3a8vKlBuoAqdh3uaICFRDTB2jBF53ruYe9lbPlW9UIe1buP9LawPX9ehvvc4= X-Received: by 2002:a6b:4f14:: with SMTP id d20-v6mr18315158iob.68.1542630355653; Mon, 19 Nov 2018 04:25:55 -0800 (PST) MIME-Version: 1.0 References: <72444B89-545B-41E1-BD5A-F7D983938CEE@pragmaticminds.de> In-Reply-To: From: Felipe Gutierrez Date: Mon, 19 Nov 2018 13:25:34 +0100 Message-ID: Subject: Re: How do I monitor properties of my RaspberryPi and send it to an IoT Gateway? To: dev@edgent.apache.org Content-Type: multipart/alternative; boundary="0000000000005e6751057b039e73" --0000000000005e6751057b039e73 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, thanks for the quick responses. I do feel tempted to implement it =3D). I am planning to get my hands dirty with Apache Edgent and RPi's and the feature that I described is the first that I will need. By now I am listing all the features that I will need in my small project and if my supervisor agrees with my idea I will go towards this way. Best Regards, Felipe *--* *-- Felipe Gutierrez* *-- skype: felipe.o.gutierrez* *--* *https://felipeogutierrez.blogspot.com * On Mon, Nov 19, 2018 at 2:15 AM Gayashan Amarasinghe < gayashan.amarasinghe@gmail.com> wrote: > Hi Felipe, > > I had this simple source below that I had implemented before for some > testing. It might be of some use to you. The library I used is: > > com.github.oshi > oshi-core > 3.4.2 > > > You can read from the source and send it to an upper layer via MQTT > connector or some other method as Chris and Julian has mentioned. > > import org.apache.edgent.function.Supplier; > > import oshi.hardware.Sensors; > import oshi.hardware.platform.linux.LinuxSensors; > /** > * Read current CPU temperature > */ > public class CPUTempSensor implements Supplier { > @Override > public Double get() { > Sensors sensors =3D new LinuxSensors(); > return sensors.getCpuTemperature(); > } > } > > Best, > Gayashan > > > On Mon, Nov 19, 2018 at 5:58 AM Julian Feinauer < > j.feinauer@pragmaticminds.de> wrote: > > > Hi, > > > > I'm a bit late tot he party. > > Thinking about it, it's a pretty obvious requirement, to have some > > statistics about the jvm reported regularly. > > I think it should be pretty easy to spin up a Source Component for that= , > > e.g., using the library noted by chris. > > This source could the be polled repeatedly with whatever frequency you > > want. > > > > If you like to do so, chris or I can give you some further hints about > > that as we both already implemented sources for edgent. > > > > Best > > Julian > > > > =EF=BB=BFAm 18.11.18, 12:51 schrieb "Christofer Dutz" >: > > > > Hi Felipe, > > > > If you want to access CPU, Memory and Disk usage, you could have a > > look at this library: > > > > org.fusesource > > sigar > > 1.6.4 > > > > > > I am using this in another project and it's working nicely. I'm usi= ng > > is in a Scala Akka Actor, but it shouldn't be difficult to see how to u= se > > it in Java: > > > > > https://github.com/chrisdutz/RAPIRO/blob/master/server/telemetry/src/main= /scala/de/codecentric/iot/rapiro/telemetry/actors/TelemetryActor.scala > > ... but thinking about it ... I think it would be a great option to > > add a Edgent Source providing such data. > > Because with this, you could eventually create data-streams that > adapt > > to the load on the Edge device ... > > > > It shouldn't be hard to implement ... and as I posted in my reply o= n > > the other thread, I don't think Edgent currently has something like > that. I > > just did a quick full-text-search and couldn't find anything? > > > > Feel tempted to implement such a connector? We're currently trying = to > > re-initiate the committer-base of Edgent and contributions like this > would > > be highly valued :-) > > > > Chris > > > > > > > > Am 18.11.18, 12:44 schrieb "Felipe Gutierrez" < > > felipe.o.gutierrez@gmail.com>: > > > > Hi, > > > > On the Edgent documentations is mentioned: > > > > "You can send data from an Edgent application to your back-end > > system when > > you need to perform analysis that cannot be performed on the ed= ge > > device, > > such as: > > > > Running a complex analytic algorithm that requires more > resources, > > such as > > CPU or memory, than are available on the edge device." ( > > https://edgent.apache.org/docs/overview) > > > > I understood that the Edgent daemon on the device is constantly > > monitoring > > its properties (CPU and memory) and this daemon decides to not > > perform the > > analytics on the RPi when it has lack of resource but perform o= n > a > > layer > > above. Is it right? > > > > How can I implement a program using Edgent to send this type of > > metadata to > > a layer above? Let's say I want to sent metadata regarding CPU, > > memory and > > storage usage from the RPi to an IoT gateway. > > > > Thanks, > > Felipe > > *--* > > *-- Felipe Gutierrez* > > > > *-- skype: felipe.o.gutierrez* > > *--* *https://felipeogutierrez.blogspot.com > > * > > > > > > > > > > > --0000000000005e6751057b039e73--