OpenVZ Forum


Home » Mailing lists » Devel » capturing init output
capturing init output [message #24938] Wed, 12 December 2007 11:19
Dietmar Maurer is currently offline  Dietmar Maurer
Messages: 52
Registered: March 2007
Member
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 300 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: Fri Jun 20 16:51:13 GMT 2025

Total time taken to generate the page: 0.05680 seconds