softlimit(8)

πŸ“¦
version 0.76 Β· 2 versions
  • 0.76 Β· debian bookworm, debian trixie, nixpkgs unstable, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.11 Β· alpine 3.24
, in debian bookworm, debian trixie, nixpkgs unstable, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ softlimit(8) ✨

okay bestie, this is the manual page for softlimit, from the System Manager's Manual β€” she's an 8, which means she's a system-admin girlie, not your average little user command. sit down, grab a strawberry πŸ“, and let's get into it.


πŸ’– NAME πŸ’–

softlimit β€” runs another program with new resource limits.

that's it. that's her whole job. she puts a little leash on your program and then sends it out into the world. iconic honestly.


πŸ¦‹ SYNOPSIS πŸ¦‹

softlimit [ opts ] child

🌸 DESCRIPTION 🌸

opts is a series of getopt-style options. child consists of one or more arguments.

softlimit sets soft resource limits as specified by opts. It then runs child.

so like β€” the way that it works is, she does the limiting thing first, and then she hands off to child. no cap. the limit is already in place by the time your program even breathes its first breath. πŸ’…


πŸ‘‘ OPTIONS πŸ‘‘

okay so this is the part where you have to actually pay attention, bestie. in each of the following opts, n may be =, indicating that the soft limit should be set equal to the hard limit.

yes, literally the character =. it's giving "just give me the max, I'm not doing math". πŸŽ€

🧠 opts controlling memory use

  • -m n β€” Same as -d n -s n -l n -a n. it's the girlboss combo option, sets a whole bunch at once.
  • -d n β€” Limit the data segment per process to n bytes.
  • -s n β€” Limit the stack segment per process to n bytes.
  • -l n β€” Limit the locked physical pages per process to n bytes. This option has no effect on some operating systems. πŸ™ˆ
  • -a n β€” Limit the total of all segments per process to n bytes. This option has no effect on some operating systems. yeah, same situation, she's just not universally respected.
  • -o n β€” Limit the number of open file descriptors per process to n. This option has no effect on some operating systems.
  • -p n β€” Limit the number of processes per uid to n.

πŸ“ opts controlling file sizes

  • -f n β€” Limit output file sizes to n bytes.
  • -c n β€” Limit core file sizes to n bytes.

⚑ Efficiency opts

  • -r n β€” Limit the resident set size to n bytes. This limit is not enforced unless physical memory is full. so like, she's technically there but only shows up when things get real. πŸ’€
  • -t n β€” Limit the CPU time to n seconds. This limit is not enforced except that the process receives a SIGXCPU signal after n seconds. so she doesn't hard-stop you, she just sends a little signal to let you know your time is up. ✨

🌈 SEE ALSO 🌈

the whole friend group, fr fr β€” go read these next:

supervise(8), svc(8), svok(8), svstat(8), svscanboot(8), svscan(8), readproctitle(8), fghack(8), pgrphack(8), multilog(8), tai64n(8), tai64nlocal(8), setuidgid(8), envuidgid(8), envdir(8), setlock(8)

and if you wanna go straight to the source: http://cr.yp.to/daemontools.html 🫢


and that's the whole page, bestie πŸ’œ this one came out of the System Manager's Manual, it's softlimit(8), and if you ever need to look her up again just search that exact name. mwah. πŸ’…πŸŽ€βœ¨

πŸ“¦ where this page comes from