Date: Fri, 7 Mar 2014 16:57:39 -0300 From: Luiz Otavio O Souza <loos.br@gmail.com> To: "freebsd-embedded@freebsd.org" <freebsd-embedded@freebsd.org>, freebsd-current@freebsd.org Subject: bsnmp lm75 module Message-ID: <CAJ8CS7rkTSL1HpAr73O9T0f604b1K08HdwmguNm=5RLyU1nz3Q@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
--bcaec53d5eb583d78b04f409aa66 Content-Type: text/plain; charset=ISO-8859-1 Hello, I've written a bsnmp module to export the lm75 sensor's temperature (and some other data) over SNMP. With this module it is simple and easy to monitor the temperature of rooms and other devices over the network with help of a RPi, a BBB or others. This is my first module for bsnmp, so i would appreciate if someone more clueful about it could take a look (can i just pick any free MIB ?) The lm75 kernel driver is the same published on http://lists.freebsd.org/pipermail/freebsd-embedded/2013-November/002195.html I'll publish an updated version soon (for the lm75 kernel driver) which include a man page and support for non FDT systems. The SNMP data usually looks like: http://pastebin.com/cHYYBY1R It includes the number of sensors on system, the driver name, the compat string, the i2c bus and address and, sure, the sensor temperature. Cheers, Luiz --bcaec53d5eb583d78b04f409aa66 Content-Type: text/plain; charset=US-ASCII; name="snmp_lm75.diff" Content-Disposition: attachment; filename="snmp_lm75.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hshvmpyy0 SW5kZXg6IGV0Yy9zbm1wZC5jb25maWcKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gZXRjL3NubXBkLmNvbmZpZwko cmV2aXNpb24gMjYyODYwKQorKysgZXRjL3NubXBkLmNvbmZpZwkod29ya2luZyBjb3B5KQpAQCAt Mjk2LDYgKzI5NiwxMiBAQAogI2JlZ2Vtb3RTbm1wZE1vZHVsZVBhdGguImJyaWRnZSIgPSAiL3Vz ci9saWIvc25tcF9icmlkZ2Uuc28iCiAKICMKKyMgTE03NSBTZW5zb3IgbW9kdWxlCisjICBUaGlz IHJlcXVpcmVzIHRoZSBtaWJJSSBtb2R1bGUuCisjCisjYmVnZW1vdFNubXBkTW9kdWxlUGF0aC4i bG03NSIgPSAiL3Vzci9saWIvc25tcF9sbTc1LnNvIgorCisjCiAjIFdpcmVsZXNzIG1vZHVsZQog IyAgVGhpcyByZXF1aXJlcyB0aGUgbWliSUkgbW9kdWxlLgogIwpJbmRleDogdXNyLnNiaW4vYnNu bXBkL21vZHVsZXMvTWFrZWZpbGUKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gdXNyLnNiaW4vYnNubXBkL21vZHVs ZXMvTWFrZWZpbGUJKHJldmlzaW9uIDI2Mjg2MCkKKysrIHVzci5zYmluL2Jzbm1wZC9tb2R1bGVz L01ha2VmaWxlCSh3b3JraW5nIGNvcHkpCkBAIC0xMiw2ICsxMiw3IEBACiAJc25tcF9icmlkZ2Ug XAogCXNubXBfaGFzdCBcCiAJc25tcF9ob3N0cmVzIFwKKwlzbm1wX2xtNzUgXAogCXNubXBfbWli SUkgXAogCXNubXBfdGFyZ2V0IFwKIAlzbm1wX3VzbSBcCkluZGV4OiB1c3Iuc2Jpbi9ic25tcGQv bW9kdWxlcy9zbm1wX2xtNzUvQkVHRU1PVC1MTTc1LU1JQi50eHQKPT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gdXNy LnNiaW4vYnNubXBkL21vZHVsZXMvc25tcF9sbTc1L0JFR0VNT1QtTE03NS1NSUIudHh0CShyZXZp c2lvbiAwKQorKysgdXNyLnNiaW4vYnNubXBkL21vZHVsZXMvc25tcF9sbTc1L0JFR0VNT1QtTE03 NS1NSUIudHh0CSh3b3JraW5nIGNvcHkpCkBAIC0wLDAgKzEsMTYwIEBACistLQorLS0gQ29weXJp Z2h0IChjKSAyMDE0IEx1aXogT3RhdmlvIE8gU291emEgPGxvb3NARnJlZUJTRC5vcmc+CistLSBB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IHsgbG03NVNlbnNvckVudHJ5IDQgfQorCitsbTc1U2Vu c29yUG5wSW5mbyBPQkpFQ1QtVFlQRQorICAgIFNZTlRBWAlPQ1RFVCBTVFJJTkcKKyAgICBNQVgt QUNDRVNTCXJlYWQtb25seQorICAgIFNUQVRVUwljdXJyZW50CisgICAgREVTQ1JJUFRJT04KKwki TE03NSBTZW5zb3IgcG5wIGluZm9ybWF0aW9uLiIKKyAgICA6Oj0geyBsbTc1U2Vuc29yRW50cnkg NSB9CisKK2xtNzVTZW5zb3JQYXJlbnQgT0JKRUNULVRZUEUKKyAgICBTWU5UQVgJT0NURVQgU1RS SU5HCisgICAgTUFYLUFDQ0VTUwlyZWFkLW9ubHkKKyAgICBTVEFUVVMJY3VycmVudAorICAgIERF U0NSSVBUSU9OCisJIkxNNzUgU2Vuc29yIHBhcmVudCBidXMuIgorICAgIDo6PSB7IGxtNzVTZW5z b3JFbnRyeSA2IH0KKworbG03NVNlbnNvclRlbXBlcmF0dXJlIE9CSkVDVC1UWVBFCisgICAgU1lO VEFYCUludGVnZXIzMgorICAgIE1BWC1BQ0NFU1MJcmVhZC1vbmx5CisgICAgU1RBVFVTCWN1cnJl bnQKKyAgICBERVNDUklQVElPTgorCSJMTTc1IFNlbnNvciB0ZW1wZXJhdHVyZS4iCisgICAgOjo9 IHsgbG03NVNlbnNvckVudHJ5IDcgfQorCitFTkQKClByb3BlcnR5IGNoYW5nZXMgb246IHVzci5z YmluL2Jzbm1wZC9tb2R1bGVzL3NubXBfbG03NS9CRUdFTU9ULUxNNzUtTUlCLnR4dApfX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fCkFkZGVkOiBzdm46ZW9sLXN0eWxlCiMjIC0wLDAgKzEgIyMKK25hdGl2ZQpcIE5vIG5ld2xp bmUgYXQgZW5kIG9mIHByb3BlcnR5CkFkZGVkOiBzdm46bWltZS10eXBlCiMjIC0wLDAgKzEgIyMK K3RleHQvcGxhaW4KXCBObyBuZXdsaW5lIGF0IGVuZCBvZiBwcm9wZXJ0eQpBZGRlZDogc3ZuOmtl eXdvcmRzCiMjIC0wLDAgKzEgIyMKK0ZyZWVCU0Q9JUgKXCBObyBuZXdsaW5lIGF0IGVuZCBvZiBw cm9wZXJ0eQpJbmRleDogdXNyLnNiaW4vYnNubXBkL21vZHVsZXMvc25tcF9sbTc1L01ha2VmaWxl Cj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT0KLS0tIHVzci5zYmluL2Jzbm1wZC9tb2R1bGVzL3NubXBfbG03NS9NYWtlZmls ZQkocmV2aXNpb24gMCkKKysrIHVzci5zYmluL2Jzbm1wZC9tb2R1bGVzL3NubXBfbG03NS9NYWtl ZmlsZQkod29ya2luZyBjb3B5KQpAQCAtMCwwICsxLDEzIEBACisjICRGcmVlQlNEJAorCisuaW5j bHVkZSA8YnNkLm93bi5taz4KKworTU9EPSAgICBsbTc1CitTUkNTPSAgIHNubXBfbG03NS5jCitY U1lNPSAgIGJlZ2Vtb3RMbTc1CitNQU49ICAgIHNubXBfbG03NS4zCisKK0JNSUJTPSAgQkVHRU1P VC1MTTc1LU1JQi50eHQKK0RFRlM9ICAgJHtNT0R9X3RyZWUuZGVmCisKKy5pbmNsdWRlIDxic2Qu c25tcG1vZC5taz4KClByb3BlcnR5IGNoYW5nZXMgb246IHVzci5zYmluL2Jzbm1wZC9tb2R1bGVz L3NubXBfbG03NS9NYWtlZmlsZQpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCkFkZGVkOiBzdm46ZW9sLXN0eWxlCiMjIC0w LDAgKzEgIyMKK25hdGl2ZQpcIE5vIG5ld2xpbmUgYXQgZW5kIG9mIHByb3BlcnR5CkFkZGVkOiBz dm46bWltZS10eXBlCiMjIC0wLDAgKzEgIyMKK3RleHQvcGxhaW4KXCBObyB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CBPUiBUT1JU IChJTkNMVURJTkcgTkVHTElHRU5DRSBPUiBPVEhFUldJU0UpIEFSSVNJTkcgSU4gQU5ZIFdBWQor IyBPVVQgT0YgVEhFIFVTRSBPRiBUSElTIFNPRlRXQVJFLCBFVkVOIElGIEFEVklTRUQgT0YgVEhF IFBPU1NJQklMSVRZIE9GCisjIFNVQ0ggREFNQUdFLgorIworIyAkRnJlZUJTRCQKKyMKKworKDEg aW50ZXJuZXQKKyAgKDQgcHJpdmF0ZQorICAgICgxIGVudGVycHJpc2VzCisgICAgICAoMTIzMjUg Zm9rdXMKKyAgICAgICAgKDEgYmVnZW1vdAorICAgICAgICAgICg0MDAgYmVnZW1vdExtNzUKKyAg ICAgICAgICAgICgxIGJlZ2Vtb3RMbTc1T2JqZWN0cworICAgICAgICAgICAgICAoMSBsbTc1U2Vu c29ycworICAgICAgICAgICAgICAgICgxIGxtNzVTZW5zb3JzIElOVEVHRVIzMiBvcF9sbTc1U2Vu c29ycyBHRVQpCisgICAgICAgICAgICAgICkKKyAgICAgICAgICAgICAgKDIgbG03NVNlbnNvclRh YmxlCisgICAgICAgICAgICAgICAgKDEgbG03NVNlbnNvckVudHJ5IDogT0NURVRTVFJJTkcgb3Bf bG03NVNlbnNvclRhYmxlCisgICAgICAgICAgICAgICAgICAoMSBsbTc1U2Vuc29ySW5kZXggSU5U RUdFUjMyIEdFVCkKKyAgICAgICAgICAgICAgICAgICgyIGxtNzVTZW5zb3JTeXNjdGxJbmRleCBJ TlRFR0VSMzIgR0VUKQorICAgICAgICAgICAgICAgICAgKDMgbG03NVNlbnNvckRlc2MgT0NURVRT VFJJTkcgR0VUKQorICAgICAgICAgICAgICAgICAgKDQgbG03NVNlbnNvckxvY2F0aW9uIE9DVEVU U1RSSU5HIEdFVCkKKyAgICAgICAgICAgICAgICAgICg1IGxtNzVTZW5zb3JQbnBJbmZvIE9DVEVU U1RSSU5HIEdFVCkKKyAgICAgICAgICAgICAgICAgICg2IGxtNzVTZW5zb3JQYXJlbnQgT0NURVRT VFJJTkcgR0VUKQorICAgICAgICAgICAgICAgICAgKDcgbG03NVNlbnNvclRlbXBlcmF0dXJlIElO VEVHRVIzMiBHRVQpCisgICAgICAgICAgICAgICAgKQorICAgICAgICAgICAgICApCisgICAgICAg ICAgICApCisgICAgICAgICAgKQorICAgICAgICApCisgICAgICApCisgICAgKQorICApCispCklu ZGV4OiB1c3Iuc2Jpbi9ic25tcGQvbW9kdWxlcy9zbm1wX2xtNzUvc25tcF9sbTc1LjMKPT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PQotLS0gdXNyLnNiaW4vYnNubXBkL21vZHVsZXMvc25tcF9sbTc1L3NubXBfbG03NS4zCShy ZXZpc2lvbiAwKQorKysgdXNyLnNiaW4vYnNubXBkL21vZHVsZXMvc25tcF9sbTc1L3NubXBfbG03 NS4zCSh3b3JraW5nIGNvcHkpCkBAIC0wLDAgKzEsNjAgQEAKKy5cIi0KKy5cIiBDb3B5cmlnaHQg KGMpIDIwMTQgTHVpeiBPdGF2aW8gTyBTb3V6YSA8bG9vc0BGcmVlQlNELm9yZz4KKy5cIiBBbGwg cmlnaHRzIHJlc2VydmVkLgorLlwiCisuXCIgUmVkaXN0cmlidXRpb24gYW5kIHVzZSBpbiBzb3Vy Y2UgYW5kIGJpbmFyeSBmb3Jtcywgd2l0aCBvciB3aXRob3V0CisuXCIgbW9kaWZpY2F0aW9uLCBh cmUgcGVybWl0dGVkIHByb3ZpZGVkIHRoYXQgdGhlIGZvbGxvd2luZyBjb25kaXRpb25zCisuXCIg YXJlIG1ldDoKKy5cIiAxLiBSZWRpc3RyaWJ1dGlvbnMgb2Ygc291cmNlIGNvZGUgbXVzdCByZXRh aW4gdGhlIGFib3ZlIGNvcHlyaWdodAorLlwiICAgIG5vdGljZSwgdGhpcyBsaXN0IG9mIGNvbmRp dGlvbnMgYW5kIHRoZSBmb2xsb3dpbmcgZGlzY2xhaW1lci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vcGxhaW4KXCBObyBuZXdsaW5lIGF0IGVuZCBvZiBwcm9wZXJ0eQpBZGRlZDogc3ZuOmtleXdv cmRzCiMjIC0wLDAgKzEgIyMKK0ZyZWVCU0Q9JUgKXCBObyBuZXdsaW5lIGF0IGVuZCBvZiBwcm9w ZXJ0eQo= --bcaec53d5eb583d78b04f409aa66--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ8CS7rkTSL1HpAr73O9T0f604b1K08HdwmguNm=5RLyU1nz3Q>