Mono(mono-service)
π mono-service β Mono(mono-service) π
okay bestie, sit down, grab a boba, because we're talking about the Mono ServiceProcess host and honestly? it's giving backend royalty. π
β¨ NAME β¨
mono-service, mono-service2 β the Mono ServiceProcess host, aka the little program that lets your service live its truth in the background. π«Ά
πΈ SYNOPSIS πΈ
mono-service [options] program.exe
π¦ DESCRIPTION π¦
So. mono-service is a host β it's the thing that runs services built with the ServiceProcess assembly. It's not the service itself, it's the stage the service performs on. main character energy, but for a daemon. π
Which one do you use? Depends on your assembly vibe:
- Use
mono-serviceto run services that use the 1.0 assemblies. - Use
mono-service2to run services that use the 2.0 assemblies.
Now, the control situation. You talk to your service with signals, and she WILL listen:
- Send the
SIGUSR1signal to the process β the service gets paused βΈοΈ - Send the
SIGUSR2signal β execution resumes βΆοΈ - Send the
SIGTERMsignal β the service shuts down cleanly π§Όβ¨
The following options can be used to control the service:
-d:DIRECTORYβ use this to set the working directory for the service. the default is the current directory. π-l:LOCKFILEβ specifies the file to use for locking. the default is a filename constructed in/tmpbased on the name of the program that hosts the service. π-m:MESSAGEβ the name to show in the syslog. π-n:NAMEβ use this to specify which service to launch (in case your program contains more than one service). the default is to run the first defined service. π₯--debugβ use this to stopmono-servicefrom redirectingstdinandstdout, and to prevent the program from being sent to the background. Equivalent to--no-daemon. π--no-daemonβ use this to stopmono-servicefrom redirectingstdinandstdout, and to prevent the program from being sent to the background. Equivalent to--debug. π
ngl the--debug/--no-daemonduo is literally the same thing twice and that's iconic of them honestly π
π CONTROL π
You can control the service by sending signals to the process. here are the commands, bestie:
Pausing service:
kill -USR1 `cat <lock file>`
Resuming service:
kill -USR2 `cat <lock file>`
Stopping the service:
kill `cat <lock file>`
the backticks matter!!cat <lock file>is reading your lock file to get the PID, and thekillis doing the actual slaying. don't skip the backticks or you'll be yelling at a file that doesn't exist. π
π EXAMPLES π
Start the MyService.exe assembly, with a lock in /root/service-lock:
mono-service -l:/root/service-lock MyService.exe
look at her go. so clean, so simple. obsessed. β¨
π DEBUGGING π
Messages produced by the service are logged on syslog. that's it, that's the whole section β go check your syslog. π
π MAILING LISTS π
Want to talk to the mono people? Visit http://lists.ximian.com/mailman/listinfo/mono-list for details. π¬
π WEB SITE π
Visit: http://www.mono-project.com for details. πΈοΈ
π SEE ALSO π
mono(1)N:System.ServiceProcess
that's the whole page, bestie β every flag, every signal, every command, untouched, just with β¨flavorβ¨. fr fr, no cap. π
and that's a wrap on this Mono(mono-service) manual page β same manual name as up top, same footer energy down here. go run some services, you absolute legend. ππ¦π
π¦ where this page comes from
- alpine 3.24: mono-doc 6.14.1-r1 Β· MIT
- epel 10: mono-extras 6.14.1-1.el10_2 Β· MIT
- fedora 44: mono-extras 6.14.1-3.fc44 Β· MIT
- fedora 44: mono-extras 6.14.1-4.fc44 Β· MIT
- nixos 26.05: mono 6.14.1
- nixpkgs unstable: mono 6.14.1
- (C) 2005 Novell, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms