OpenVZ Forum



Members   Search      Help    Register    Login    Home
Home » Mailing lists » Devel » capturing init output
capturing init output [message #24938] Wed, 12 December 2007 06:19
Dietmar Maurer is currently offline Dietmar Maurer
Messages: 52
Registered: March 2007
Member
From: openvz.org
Hi all,

here is an init wrapper to capture the output from init. It uses a named
pipe, and an additional logging process to read that named pipe and
writes it into a file.

(sysvinit uses open without O_APPEND, so setting CONSOLE=filename will
never
work)


compile with:
> gcc -O2 -Wall -lc vzinit.c -o vzinit

Copy it into the VE:
> mv VPSDIR/sbin/init VPSDIR/sbin/init.org
> cp vzinit VPSDIR/sbin/init 

the start the VE:

> vzctl start 777
> tail -100f VPSDIR/var/log/init.log

What do you think? Should I write a patch to vzctl, or is there a better
way to do it?

- Dietmar
  • Attachment: vzinit.c
    (Size: 3.02KB, Downloaded 154 times)
Previous Topic:[patch 0/2][NETNS][RFD] moving fl_net to dst_entry
Next Topic:[PATCH 2/4] pid: Make next_pidmap static again
Goto Forum:
  


Current Time: Thu May 23 09:30:17 EDT 2013
Powered by FUDforum Powered by Parallels Virtuozzo Containers