Пример #1
0
def main():
    '''
    Run DTrace...
    '''
    thr = DTraceConsumerThread(SCRIPT, walk_func=my_walk, sleep=1)
    thr.start()

    # we will stop the thread after some time...
    time.sleep(5)

    # stop and wait for join...
    thr.stop()
    thr.join()
Пример #2
0
def run_dtrace(script):
    '''
    Run DTrace till Ctrl+C is pressed...
    '''
    thr = DTraceConsumerThread(script, False, walk_func=pretty_print)
    thr.start()
    brendan()
    try:
        while True:
            pass
    except (KeyboardInterrupt, SystemExit):
        thr.stop()
        thr.join()
Пример #3
0
def run_dtrace(script):
    '''
    Run DTrace till Ctrl+C is pressed...
    '''
    thr = DTraceConsumerThread(script, False, walk_func=pretty_print)
    thr.start()
    brendan()
    try:
        while True:
            pass
    except (KeyboardInterrupt, SystemExit):
        thr.stop()
        thr.join()
Пример #4
0
def main():
    """
    Run DTrace...
    """
    thr = DTraceConsumerThread(SCRIPT, walk_func=my_walk, sleep=1)
    thr.start()

    # we will stop the thread after some time...
    time.sleep(5)

    # stop and wait for join...
    thr.stop()
    thr.join()
def main():
    '''
    Run DTrace...
    '''
    thr = DTraceConsumerThread(SCRIPT)
    thr.start()

    # we will stop the thread after some time...
    time.sleep(5)

    # stop and wait for join...
    thr.stop()
    thr.join()