2014年6月26日 星期四

How to attach to running container?



If you want to attach to running container, it's possible. First, use `sudo docker ps--no-trunc` to find your container full id. And use `sudo lxc-attach --name your_id` to attach. The way seems to be dangerous. Look before you leap.

2014年6月22日 星期日

introduce to call_seq.

    A tool to help you trace code efficiently. call_seq record the program how to run and save the result to file with json format.


Quick start to try it.
                $ pip install pyside pyqode.core pyqode.python
                $ git clone https://github.com/ya790206/call_seq
                $ python demo.py
                $ python -m call_seq.browser output.json        

How to record the program how to run.
    if __name__ == '__main__':
        with CallSeq(name='output.json'):
            test() #  the code you want to trace

After the file `output.json` created, then you run the below command.
python -m call_seq.browser output.json
Now you can trace code using call_seq.browser. Enjoy it.