MDATA-GET(1)
β¨ MDATA-GET β¨
ok so bestie, let me put you onto mdata-get β it's a lil metadata-fetching icon from the Metadata Commands squad π
π NAME π
mdata-get β go grab the value of a metadata key-value pair. that's it, that's the job π«Ά
πΈ SYNOPSIS πΈ
/usr/sbin/mdata-get keyname
π¦ DESCRIPTION π¦
okay so here's the vibe: mdata-get lets you β or a script, scripts are valid too π β query the metadata for a guest instance that's living its best life inside a SmartDataCenter (SDC) cloud. it's giving main character energy for automation, fr fr.
where does this metadata even come from, you ask? great question bestie:
- generally it's set programmatically via CloudAPI β¨
- or during interactive provisioning through a Web Portal π
- and you can also set it from inside the instance itself with the
mdata-putcommand π
the value of the keyname you asked for gets printed to stdout β no cap. now here's the part you gotta know:
if the metadata service is unavailable when you make the request, this command will block, just sitting there waiting for it to become available. patient queen. π§ββοΈ
non-transient failures β like, say, the keyname you asked for literally doesn't exist β will make the program exit with a non-zero status. and depending on the nature of the error, some diagnostic output may get printed to stderr. not me being messy on stderr π
π EXIT STATUS π
the following exit values are returned β memorize these, iykyk:
0β Successful completion. the keyname you wanted was available and its value was emitted to stdout. slay! π1β Metadata value not found. the requested keyname was not found in the metadata. it's simply not there, bestie π2β An error occurred. an unexpected error condition happened, and it's believed to be a non-transient condition. retrying the request is not expected to resolve it β either a software bug or a misconfiguration exists. so likeβ¦ it's not a you-problem you can retry your way out of π₯3β A usage error occurred. malformed arguments were passed to the program. go check the usage instructions and make sure you're supplying valid arguments, bestie, because that one's on you π«
π SEE ALSO π
mdata-delete(1), mdata-list(1), mdata-put(1) β the whole friend group, go say hi π
and that's the tea, bestie π this page came to you courtesy of Joyent SmartDataCenter, dated October 2013 β a vintage queen serving looks since forever πβ¨π
π¦ where this page comes from
- ubuntu jammy: joyent-mdata-client 0.0.1-0ubuntu5 Β· MIT
- ubuntu noble: joyent-mdata-client 0.0.1-0ubuntu6 Β· MIT
- ubuntu questing: joyent-mdata-client 0.0.1-0ubuntu7
- ubuntu resolute: triton-mdata-client 20151001-0ubuntu3 Β· MIT
- ubuntu stonking: triton-mdata-client 20151001-0ubuntu3 Β· MIT
- Copyright (c) 2013, Joyent, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms