From Linux-VServer

Revision as of 19:06, 10 February 2007 by Pflanze (Talk | contribs)

Jump to: navigation, search

Accessing vserver startup output

Where is the startup output of vservers going?

(A) when using init styles others than "plain" (for example without any style setting):

  • "vserver <name> <command>" by itself will not do any redirection, thus print and read to/from the current terminal/whatever.
  • /etc/init.d/vservers will typically run lib/util-vserver/vserver-wrapper which will redirect stdin/out/err from/to the value at /etc/vservers/guest/apps/init/tty, /etc/vservers/.defaults/apps/init/tty or if neither is set, /dev/null. NOTE: just linking to a normal file will log to that file, but currently also open stdin from that file, which may have bad consequences if some programs actually reads from stdin (it may even create an endless loop appending and reading from the file).

You have to keep this in mind: if for some reason a vserver does not start upon host reboot, but starts without problems with "vserver <name> start", that could be because a program in your vserver's scripts/* directory depends on having access to a terminal. This is (like it is with every system service) one of the differences between starting vservers from host's init process or from a login shell (others being resource limits and environment variables).

Personal tools