qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [questions]_about_qemu_log


From: Zhang Haoyu
Subject: Re: [Qemu-devel] [questions]_about_qemu_log
Date: Sat, 26 Jul 2014 11:03:47 +0800

>>>>> Hi, all
>>>>>
>>>>> If I use qemu command directly to run vm, bypass libvirt, how to 
>>>>> configure qemu to assure that each vm has its own log file, like 
>>>>> vmname.log?
>>>>> For example, VM: rhel7-net has its own log file, rhel7-net.log,
>>>>> VM:rhel7-stor has its own log file, rhel7-stor.log.
>>>>
>>>> -D /path/to/unique/file/name.log
>>>>
>>> -D option is to configure qemu_logfile for the output logs which are 
>>> controlled by qmp command "logfile", which can be enabled/disabled on run 
>>> time.
>>> 
>>> I want to configure the log file for the output of fprintf(stderr, fmt, 
>>> ...), .etc,
>>> i.e., how to redirect the output of fprintf(stderr, fmt, ...), or some 
>>> other log-interface to a specified file?
>>
>>In a shell you would write something like:
>>
>>2> stderr.log
>>
>>You may also want to toggle QEMU's -msg timestamp=on option.
>>
>I think the "-msg -msg timestamp=on" option will add timestamp to the output 
>of error_report(fmt, ...),
>but where is the output? Which file saves the output?
If during the qmp operation, error_report will output to current monitor, but 
my concern is to stderr, which file saves the output?
>And where is the output of fprintf(stderr, fmt, ...)?
>Should I redirect of stderr to specified log file?
>
>In libvirt code, when start a vm(qemuProcessStart), it will create a qemu log 
>file named /var/log/libvirt/qemu/vmname.log,
>and redirect the stderr and stdout to file descriptor of this qemu log file.
>
>But if I run a vm directly by qemu command, bypass libvirt, then how to 
>configure qemu to assure that each vm has its own log file,
>and how to redirect the stderr, stdout to each vm's own log file?
>
>Thanks,
>Zhang Haoyu
>
>>Cheers,
>>Andreas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]