feisky

云计算、虚拟化与Linux技术笔记
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

xend的调试方法

Posted on 2011-11-12 20:32  feisky  阅读(559)  评论(0编辑  收藏  举报

* Export necessary system variables:
# export XEND_DEBUG=1
# export XEND_DAEMONIZE=0

* Start xend tracing:
# /usr/sbin/xend trace_start

The trace file will be available at /var/log/xen/xend.trace.

* Debug xend using the Python Debugger:
# python -m pdb /usr/sbin/xend trace_start

You'll drop to a debugging shell. You can set breakpoints and continue.

* Profile xend using the Python Profiler:
# python -m profile /usr/sbin/xend start >xend.profile

To generate the profile result:
# kill -INT <pid of xend>
# kill -USR1 <pid of xend>

The profiling log is available at xend.profile.

无觅相关文章插件,快速提升流量