Skip to content

Instantly share code, notes, and snippets.

Incremental
As per stress testing, 2800$/month of server cost supports maximum 250 machines( 5 sensors ). This includes server cost of storage and computation.
per machine cost ~ 11$ per month
Network bandwidth cost is excluded. Network bandwidth cost for current infrastructure of all development and production servers is <3% of total bill.
Current Infrastructure Cost(cloud only)
Last billing for development and production(mvp + beta) infrastructure is ~6500$
@neerajnagi
neerajnagi / autobaseline.md
Last active July 19, 2016 08:45
autobaseline testing instructions
DATETIME = autobaseline datetime set in viewer, value set is 24hr
NO_BATCH = number of batches used for autobaseline, starting from DATETIME, value set is 20.

Autobaseline calculation look for data in range of [DATETIME , DATETIME+24hr] . From this data first NO_BATCH of points are takes and there mean is used as autobaseline value.From vmart if you see that starting from DATETIME to DATETIME+24hr , there are not a minimum 20 points in vmart autobaseline will fail.

Checks to be made

1) DATETIME is set for respective gauge in dataviewer
@neerajnagi
neerajnagi / gauge.md
Last active July 11, 2016 06:07
spectrum based gauge

directory structure

map.txt
1.wav,2.wav,.......

map.txt will contain label for each wav file

146583845232.wav, 0
1465838452998.wav, 1
@neerajnagi
neerajnagi / vmart.md
Created June 17, 2016 08:52
vmart variable descriptions
XYZ-R.M.S.
  X vs Y = x-rms/y-rms
  Y vs Z = y-rms/z-rms
  Z vs X = z-rms/x-rms
XYZ-Variance
 X vs Y = x-variance/y-variance
@neerajnagi
neerajnagi / RPI.md
Last active May 18, 2016 09:28
RPI

stop redis-server

/etc/init.d/redis-server stop

copy redis.sh to /admin forever start --uid "redis" -c /bin/bash /admin/redis.sh

Your shell script (/admin/redis.sh) looks like

1 machine-b02f1d80-94d9-11e5-80ea-95059447c08b Kolkata02 MVP-10 Machine02 VPDB OEMeditdelete
2 machine-b5a98cf0-94d9-11e5-80ea-95059447c08b Kolkata03 MVP-10 Machine03 VPDB Healthtrackereditdelete
3 machine-bbc59390-94d9-11e5-80ea-95059447c08b Kolkata04 MVP-7.5 Machine04 pump undefinededitdelete
4 machine-c2671de0-94d9-11e5-80ea-95059447c08b Kolkata05 SVP-3 Machine05 pump undefinededitdelete
5 machine-4828fe30-9a52-11e5-bb95-3f0d91e17cb9 Bangalore01 vacuum-pump BMac01 pump undefinededitdelete
6 machine-ec6adff0-9ff1-11e5-9a8a-978576a34036 kolkol07 vacuum-pump mac32 pump undefinededitdelete
7 machine-377f1d00-b5df-11e5-a5af-4dcd7c5ac4cb kolkata01 VPDB-10 dummy VPDB undefinededitdelete
8 machine-daff9bb0-bf7d-11e5-a1ef-b7744ee9037a shelbyZone2 VPDB-10 10hp_2ndSensor VPDB Healthtrackereditdelete
9 machine-be7ecdd0-cb58-11e5-a0aa-bbe07856a743 shelbyZone2 VPDB-10 shelby3 VPDB OEMeditdelete
10 machine-2a1484a0-d035-11e5-a1ec-5357c4231fa7 shelbyZone2 VPDB-10 railCar VPDB OEMeditdelete
###HellerMann
```
cda 2 -> machine-313a3300-df9f-11e5-89cb-3373002fab06
cda 1 -> machine-3bdef610-df9f-11e5-89cb-3373002fab06
dryer -> machine-21c85780-df9f-11e5-89cb-3373002fab06
```
###RPC
###install
```
yum install -y libcgroup
chkconfig cgconfig on
/etc/init.d/cgconfig start
cgcreate -g memory:/bigcouch
echo $(( 2500 * 1024 * 1024 )) > /cgroup/memory/bigcouch/memory.limit_in_bytes
```
###sample upstart using cgconfig
Sumana - PF/PQ
from PP to Everyone:
Devraj - Machine Health tracker
from PP to Everyone:
Anirban - OEM
from PP to Everyone:
Gayathri - OnSpot
from PP to Everyone:
Nootan - crystalball + MODBUS
@neerajnagi
neerajnagi / format.md
Last active May 16, 2016 09:00
format for different sensor types

AC

{"sensor_id":"B0:B4:48:BE:96:85","data":{ "index":1,datatype"=7, "type":"AC","content":{"x":"-0.022","y":"-0.026","z":"-1.083"}},"t":"2015-10-28T06:09:26.583-0400","source":"ble"}

MG

{"sensor_id":"B0:B4:48:BE:96:85","data":{ "index":1,datatype"=8,  "type":"MG","content":{"x":"+47.500","y":"+8.667","z":"+132.333"}},"t":"2015-10-28T06:09:26.587-0400","source":"ble"}