OpenVZ Forum


Home » General » Support » Logging for several VMs
Logging for several VMs [message #2399] Mon, 03 April 2006 12:14 Go to next message
norbertk is currently offline  norbertk
Messages: 2
Registered: April 2006
Location: Erftstadt near Cologne in...
Junior Member
Hello all,
I have several virtual machines running and at the moment they do nothing special in respect to logging. All messages end up in the hardware node.
I would prefer a separate logging file for each VM.

How do other people handle this ?

Any tips and Hints for best practises ?



Best Regards

Norbert Klamann
Re: Logging for several VMs [message #2402 is a reply to message #2399] Mon, 03 April 2006 15:05 Go to previous messageGo to next message
Tellerdreher is currently offline  Tellerdreher
Messages: 13
Registered: October 2005
Junior Member
I don't quite understand what you mean with logging?
Each VPS runs its own syslog daemon so SYSLOGGING is separated. And if you mean "dmesg"/kernel ring buffer logging there will be no separate logging because the HW node is responsible for hardware controlling.
Re: Logging for several VMs [message #2406 is a reply to message #2402] Mon, 03 April 2006 16:55 Go to previous messageGo to next message
norbertk is currently offline  norbertk
Messages: 2
Registered: April 2006
Location: Erftstadt near Cologne in...
Junior Member
The Idea is to collect the logs of all VMs in one directory on the hardware node but on different files.

Norbert


Best Regards

Norbert Klamann
Re: Logging for several VMs [message #2409 is a reply to message #2406] Mon, 03 April 2006 22:40 Go to previous message
dowdle is currently offline  dowdle
Messages: 261
Registered: December 2005
Location: Bozeman, Montana
Senior Member
Your intial post is in stark contrast to your later clarification... but now that we understand what you want...

Remember that you do have access (as root anyway) to all of the files under /vz/private/nnn/var/log/. I guess you could create symlinks to the desired files and have them appear in /var/log/ on the hardware host with the desired name. For example:

ln -s /vz/private/101/var/log/messages /var/log/101-messages

Lather, rinse, repeat. Did that meet your criteria?

Heck, you could make a directory for each VPS in /var/log and then symlink everything if you wanted to organize by directory.

mkdir /var/log/vps101
ln -s /vz/private/101/var/log/messages /var/log/vps101/messages

Was there something you wanted to do with all of the logs from all of the VPSes?


--
TYL, Scott Dowdle
Belgrade, Montana, USA
Previous Topic: Kernel Panic on SATA LapTOP
Next Topic: (SOLVED) unable to start mysql in Centos 4.3 vps
Goto Forum:
  


Current Time: Sat Oct 05 17:37:13 GMT 2024

Total time taken to generate the page: 0.03693 seconds