Extensions to the Joyent Smart Datacenter API for the financially minded.
npm install smartdc-cost -g
totals:hour: '0.12'day: '3.12'month: '82.80'year: '1051.20'devices:name: 'Host1'ip: '18.104.22.168'type: 'Extra Small 512 MB'prices:day: '0.72'year: '262.80'month: '22.32'hour: '0.03'name: 'Host2'ip: '22.214.171.124'type: 'Small 1GB'prices:day: '2.04'year: '744.60'month: '61.20'hour: '0.085'
sdc-listmachines-cost --format=human --sort=price --period=day
Devices:> Host2 @ 126.96.36.199 (Small 1GB) => $2.04/day> Host1 @ 188.8.131.52 (Extra Small 512 MB) => $0.72/dayTotal:> $0.12/hr> $3.12/day> $82.80/month> $1051.20/year
Prices for current images are retrived from Joyent's public listing. There are some packages which joyent no longer lists prices for. These prices are either coppied from earlier data, or assumed based on the most similar current package. These prices are stored in
/lib/old-prices.json. If prices are returned from Joyent's public listing, those results will be used rather than those in
All prices are for open-source servers (smartOS, Ubuntu, etc). The prices of your induvidual machines will be higher than listed for licensed servers (windows, zeus, etc).
Currently, the binary package(s) assume you will be running the commands from bash, and have the following environment variables set for the normal smartdc API:
SDC_URLurl for the Joyent API (something like
SDC_ACCOUNTyour joyent account name
SDC_KEY_IDthe fingerprint of your SSH key
If you are upgrading from
smartdc v6x, note the name change for the required ENV variables, and click visit https://npmjs.org/package/smartdc to learn how to generate your ssh fingerprint