S6-INSTANCE-CREATE(8)
β¨ S6-INSTANCE-CREATE β¨
okay so this is s6-instance-create(8) from the System Manager's Manual, and bestie, it's literally the birth-certificate tool for instances. let's get into it π
πΈ NAME πΈ
s6-instance-create β create a brand-new instance of a currently supervised s6-instanced-service(7). that's it, that's the whole vibe. one job, iconic behavior π
π SYNOPSIS π
s6-instance-create [-d | -D] [-P] [-f] [-t timeout] servicedir name
π¦ DESCRIPTION π¦
so s6-instance-create expects a running, supervised s6-instanced-service(7) sitting in servicedir. this service typically got there by linking the result of an s6-instance-maker(8) invocation into an existing s6-scan-directory(7). ikyk how that pipeline goes β¨
then s6-instance-create creates a new instance of that service, named name. depending on which options you pass, it may start it immediately, or keep it down until a later s6-instance-control(8) invocation. your call, main character π
it waits for the new instance to be ready to take commands from s6-instance-control(8).
and then it exits 0. slay.
ngl, s6-instance-create is giving similar to s6-svlink(8), because it uses the same underlying library functions. under the hood, an instance is a regular service running on a supervision tree that is specific to the instanced service β and s6-instance-create adds a service directory to that tree and ensures it gets supervised. like adding a new member to the group chat and making sure they actually get the notifs π«Ά
lowkey important: if the template for the service is logged, then s6-instance-create will wait until supervisors have been spawned for both the instance and its logger. both. no skipping π
okay listen, real talk:s6-instance-createands6-instance-delete(8)are relatively expensive operations, because they have to recursively copy or delete directories and use thes6-ftrigr(7)synchronization mechanism with the instance supervisor. compare that tos6-instance-control(8), which only has to send commands to already existing supervisors. so if you're gonna turn instances on and off on a regular basis, it is way more efficient to keep the instance existing and control it withs6-instance-control(8)than to repeatedly create and delete it. fr fr, don't do the expensive thing on a loop π
π OPTIONS π
-dβ Down. the instance supervisor will be started, but the instance itself will remain down. anydownfile for the instance will be deleted. by default, if neither the-dnor-Doptions have been given, the supervisor auto-starts the instance as soon as it runs. π-Dβ Down, and stay down. the instance supervisor will be started, but the instance itself will remain down. adownfile will be created for the instance. by default, if neither the-dnor-Doptions have been given, the supervisor auto-starts the instance as soon as it runs. this one's committed to the nap π΄-Pβ Public. everyone will be able to subscribe to the instance supervisor's notification. by default, only processes running with the same gid as the instanced service can subscribe to it. open invite, no bouncer π-fβ Force permissions. you should never need to use this option, it is only there for testing purposes. like, genuinely, hands off π-ttimeout β if the instance supervisor has not started after timeout milliseconds,s6-instance-createwill print a message tostderrand exit99. by default, timeout is0, which means no time limit. no clock, no stress β°
β EXIT STATUS β
0β Success. we ate. π₯99β Timeout while waiting for the instance supervisor to start. π100β Wrong usage. bestie what did you type π111β System call failed. not our fault, the kernel said no π«
π SEE ALSO π
s6-instanced-service(7), s6-instance-control(8), s6-instance-delete(8), s6-instance-list(8), s6-instance-maker(8), s6-instance-status(8) β the whole friend group, go say hi πΈ
π AUTHORS π
Laurent Bercot Alexis <flexibeast@gmail.com> (man page port)
okay bye bestie, go forth and create instances responsibly π§ββοΈπ« this page is from Debian, dated January 11, 2023 β thank you for coming to my Ted Talk, mwah π
π¦ where this page comes from
- nixpkgs unstable: s6 2.15.1.0
- nixpkgs unstable: s6-man-pages 2.14.0.1.4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms