I’ve inherited some systems that runs on the FreeBSD operating system and inside jails. Basically the services running are old versions of qmail, spamd, Dovecot, etc. None of the versions are up to date or even maintainable any more.
At present we can’t move from these systems but I would at least like to be able to troubleshoot them.
My question:
Normally I would be able to run for example service qmail status and get some info about the top level process. How do I do this inside a jail? In the case of the qmail process I can use qmailctl but what would be the equivalent for spamd or Dovecot?
Also how do you go about troubleshooting these types of services? The logs don’t really give a very good steer on what could be going wrong.
jls(8)andjexec(8). Usejlsto query the name or ID number of the jail you're interested in, and then you can usejexecto launch a shell within that particular jail. Once you're in, it's just like managing any other qmail/spamd/dovecot installation. Also, theservice(8)utility itself is jail-aware. See the man page and note the-jcommand line switch.service name commandcan be directed into jailNby usingservice -j N name command.