nslookup

mintty screen dump

$ nslookup.exe -type=SOA -debug roo.ee                                                                                                                                                                                                                                         
Non-authoritative answer:
------------
Got answer:
HEADER:
opcode = QUERY, id = 1, rcode = NXDOMAIN
header flags: response, want recursion, recursion avail.
questions = 1, answers = 0, authority records = 1, additional = 0

QUESTIONS:
8.49.98.192.in-addr.arpa, type = PTR, class = IN
AUTHORITY RECORDS:
-> 98.192.in-addr.arpa
ttl = 2797 (46 mins 37 secs)
primary name server = sjoki.uta.fi
responsible mail addr = vg.sjoki.uta.fi
serial = 2019030709
refresh = 28800 (8 hours)
retry = 7200 (2 hours)
expire = 1209600 (14 days)
default TTL = 86400 (1 day)

------------
Server: UnKnown
Address: 192.98.49.8

------------
Got answer:
HEADER:
opcode = QUERY, id = 2, rcode = NOERROR
header flags: response, want recursion, recursion avail.
questions = 1, answers = 1, authority records = 2, additional = 0

QUESTIONS:
roo.ee, type = SOA, class = IN
ANSWERS:
-> roo.ee
ttl = 13889 (3 hours 51 mins 29 secs)
primary name server = ns1.dbweb.ee
responsible mail addr = hostmaster.roo.ee
serial = 2017102701
refresh = 14400 (4 hours)
retry = 3600 (1 hour)
expire = 1209600 (14 days)
default TTL = 86400 (1 day)
AUTHORITY RECORDS:
-> roo.ee
nameserver = ns1.dbweb.ee
ttl = 3272 (54 mins 32 secs)
-> roo.ee
nameserver = ns2.dbweb.ee
ttl = 3272 (54 mins 32 secs)

------------
roo.ee
ttl = 13889 (3 hours 51 mins 29 secs)
primary name server = ns1.dbweb.ee
responsible mail addr = hostmaster.roo.ee
serial = 2017102701
refresh = 14400 (4 hours)
retry = 3600 (1 hour)
expire = 1209600 (14 days)
default TTL = 86400 (1 day)

roo.ee
nameserver = ns1.dbweb.ee
ttl = 3272 (54 mins 32 secs)
roo.ee
nameserver = ns2.dbweb.ee
ttl = 3272 (54 mins 32 secs)

RF power amplifier

Nüüd kus mul on 1MHz colpitts signaali generaator valmis tuleks genereeritavat signaali hakata võimendama. Kogun siia power amplifier (PA) kohta informatsiooni.

Küsimused, millele ma praegu vastust otsin:

  • Kui suur on hetkel signaaligeneraatrori väljundvõimsus?
  • Mul on ilmselt vaja kõik komponendid varjestada
  • Millist antenni ma vajan?

Hea video PA kohta

https://www.electronics-tutorials.ws/amplifier/amp_1.html

Determine Line of Flight for jump run

When you look at the winds aloft report the wind direction usually varies at 3, 6, 9, and 12 thousand feet. Average the wind direction from the winds aloft report and the surface wind. Use that average as a guide. Example:

AltitudeDirection
Surface240
3000260
6000270
9000270
12000290

1330 / 5 = 266 Degree

Skydiving exit point equation

Freefall Drift=Average wind during freefall/duration of freefall x 5280 feet

Example:

AltitudeVelocity(knots)
300015
600022
900028
1200035

100 / 4 = 25 knots25 knots/60 seconds x 5280 feet = 2,165 feetRounded to 2,000 feet of approximate Freefall Drift

GSSException: Failure unspecified at GSS-API level (Mechanism level: Checksum failed)

Software: Hortonworks HDF

OS: RHEL 7.x

Set up two Schema Registries. Modified schema registries configuration in a way that Kerberos SPN are similar. Defaul Ambari set up SPN as SERVICE/FQDN@REALM.

Set up AWS ELB.

When requesting a resource I got on success response and one Error 403 GSSException: Failure unspecified at GSS-API level (Mechanism level: Checksum failed)

After shut down one schema registry turned out all request were ok, so second schema registry responded every time GSSException: Failure unspecified at GSS-API level (Mechanism level: Checksum failed)

Used kvno for debugging

In first server:

[root@ip-10-113-86-26 ~]# kvno -k /etc/security/keytabs/spnego.service.keytab HTTP/registry.dp.example.net
HTTP/registry.dp.example.net@DP.EXAMPLE.NET: kvno = 3, keytab entry valid

In second server:

[root@ip-10-113-86-4 ~]# kvno -k /etc/security/keytabs/spnego.service.keytab HTTP/registry.dp.example.net
HTTP/registry.dp.example.net@DP.EXAMPLE.NET: kvno = 3, keytab entry invalid

[root@ip-10-113-86-4 ~]# klist -kte /etc/security/keytabs/spnego.service.keytab
Keytab name: FILE:/etc/security/keytabs/spnego.service.keytab
KVNO Timestamp Principal
—- ——————- ——————————————————
2 05/22/2019 13:56:14 HTTP/ip-10-113-86-4.eu-central-1.compute.internal@DP.EXAMPLE.NET (aes128-cts-hmac-sha1-96)
2 05/22/2019 13:56:14 HTTP/ip-10-113-86-4.eu-central-1.compute.internal@DP.EXAMPLE.NET (aes256-cts-hmac-sha1-96)
2 05/22/2019 13:56:14 HTTP/ip-10-113-86-4.eu-central-1.compute.internal@DP.EXAMPLE.NET (arcfour-hmac)
2 05/22/2019 13:56:14 HTTP/ip-10-113-86-4.eu-central-1.compute.internal@DP.EXAMPLE.NET (des3-cbc-sha1)
2 05/22/2019 13:56:14 HTTP/ip-10-113-86-4.eu-central-1.compute.internal@DP.EXAMPLE.NET (des-cbc-md5)
2 05/22/2019 14:16:11 HTTP/registry.dp.example.net@DP.EXAMPLE.NET (aes256-cts-hmac-sha1-96)
2 05/22/2019 14:16:11 HTTP/registry.dp.example.net@DP.EXAMPLE.NET (aes128-cts-hmac-sha1-96)

[root@ip-10-113-86-4 ~]# kadmin -s 10.113.86.28 -p admin/admin
Authenticating as principal admin/admin with password.
Password for admin/admin@DP.EXAMPLE.NET:
kadmin: getprinc HTTP/registry.dp.example.net@DP.EXAMPLE.NET
Principal: HTTP/registry.dp.example.net@DP.EXAMPLE.NET
Expiration date: [never]
Last password change: Wed May 22 14:16:48 UTC 2019
Password expiration date: [never]
Maximum ticket life: 1 day 00:00:00
Maximum renewable life: 0 days 00:00:00
Last modified: Wed May 22 14:16:48 UTC 2019 (admin/admin@DP.EXAMPLE.NET)
Last successful authentication: [never]
Last failed authentication: [never]
Failed password attempts: 0
Number of keys: 2
Key: vno 3, aes256-cts-hmac-sha1-96
Key: vno 3, aes128-cts-hmac-sha1-96
MKey: vno 1
Attributes:
Policy: [none]
kadmin:

The problem is that in case you use kadmin ktadd it will increase printcipal KVO

{{ variable }} in Ambari

I have always problem how to know where defined variables I can see via Ambari GUI – {{ some text }}

First this pattern is called Jinja Template framework

Lets learn via example

I have HDF schema registry and I don’t like in example kerberos.principal value Ambari puts there HTTP/[hostname]@REALM. I put two schema registries behind AWS EBL and I need static SPN.

Jinja template is found /var/lib/ambari-agent/cache/common-services/REGISTRY/0.3.0/package/templates/registry.yaml.j2

From template I can find {{registry_ui_jaas_principal}}

Ambari uses lots of params.py files to generate variables. The one I am interested in is /var/lib/ambari-agent/cache/common-services/REGISTRY/0.3.0/package/scripts/params.py and it is copy of /var/lib/ambari-server/resources/mpacks/hdf-ambari-mpack-3.3.1.0-10/common-services/REGISTRY/0.3.0/package/scripts/params.py

Do not change file under cache because after ambari restart static one will overwrites this so change
/var/lib/ambari-server/resources/mpacks/hdf-ambari-mpack-3.3.1.0-10/common-services/REGISTRY/0.3.0/package/scripts/params.py

Debug remote port using *nix shell

(echo >/dev/tcp/[FQDN]/[port]) &>/dev/null && echo “open” || echo “close”

Test it.

Open in one terminal port (in example 8081) with

nc -l 8081

In second terminal

cat > /dev/tcp/localhost/8081

margusja@IRack:~$ cat </dev/tcp/[ssh server]/22

SSH-2.0-OpenSSH_7.4

Common emitter transistor gain

Juhtusin lugema ühte ülilihtsat selgitust, mis seletas nn “Common Emitter” transistori kasutegurit (gain).

Allikas: https://www.electronics-tutorials.ws/transistor/tran_1.html

Antud juhul võimendatakse voolu e väike hulk voolu, mis liigub baasist emitteri kaudu lubab palju suuremal voolul liikuda kollektorist (C) liikuda emiterisse (E) ehk “voltage gain” beeta on harilikult 50 kuni 200.

Kui me nüüd lepime kokku, et beeta on 100, siis ühe elektroni liikumisel B -> E liigub 100 elektroni C -> E.

 

Kui teemaks on transistor ja võimendus e transistor töötab oma nn aktiivalas, siis on väga oluline mida ja kui palju anda baasile peale e base  “transistor biasing”

https://www.electrical4u.com/common-emitter-amplifier/

Emoncms to Grafana

Mul on kodus üksjagu sensoreid. Osad on ise kokku tinutatud/ostetud/hackitud. Teised on Sonoff POW’id, mis oskavad WIFI võrgus asuvad kaugjuhitavad lülitid ja lisaks ka energiamonitoorimise võimekusega:

Sinna olen ma ise laadinud tarkvara https://github.com/arendst/Sonoff-Tasmota.

Andmed kogusin emoncms.org keskkonda. Lisaks olin seadistanud Domoticz (https://www.domoticz.com/) tarkvara, millega sain samuti lüliteid kontrollida:

Kuna emancms.org hakkas raha küsima ja mina ei tahtnud raha anda, aga ma tahtsin oma graafikuid näha, siis tuli leida lahendus.

Esimese asjana lasin ühe Raspberry Pi2 peale oma emoncms’i kokku (https://github.com/emoncms/emoncms/blob/master/docs/RaspberryPi/readme.md) Toimis.

 

Samas olnud näinud Hortonworks HDP/HDF raamistikus Grafana’t, siis ei süda ei andnud rahu ja lasin sina samasse Raspberry Pi2 masinasse InfluxDB (https://gist.github.com/boseji/bb71910d43283a1b84ab200bcce43c26) ja Grafana (https://www.circuits.dk/install-grafana-influxdb-raspberry/)

Nüüd sai süsteem selline:

Sensor -> Domoticz -> Influxdb -> Grafana

Domoticz saadab Data Push -> InfluxDB kaudu andmed InfluxDB’sse, mis on seadistatud nn “Data Source” Grafanas.

Paar asja, mille taha komistasin. Domotocz seadme (Device) lisades valitakse seadme tüüp:

Paari seadmetüübiga oli selline lugu, Domoticz InfluxLink ei suutnud andmeid InfluxDB’sse saata. Minu puhul ühe faasilise ampri ja alert tüüpidega oli probleem. Tuli lihtsalt valida mõni teine tüüp. Olemasolevaid muutsin Domoticz andmebaasis sqlite3 kliendiga:

 

Kõiki sensoreid pole veel jõudnud üle tõsta, aga mulle juba meeldib: