You can use strace on a specific pid to figure out what a specific process is doing, e.g.:
strace -fp <pid>
You might see something like:
select(9, [3 5 8], [], [], {0, 999999}) = 0 (Timeout)
(core)~ $ ifconfig -A | |
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 32768 | |
priority: 0 | |
groups: lo | |
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 | |
inet6 ::1 prefixlen 128 | |
inet 127.0.0.1 netmask 0xff000000 | |
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 | |
lladdr 00:0c:29:81:a7:db | |
priority: 0 |
# $OpenBSD: pf.conf,v 1.54 2014/08/23 05:49:42 deraadt Exp $ | |
# | |
# See pf.conf(5) and /etc/examples/pf.conf | |
set skip on lo | |
block return # block stateless traffic | |
pass # establish keep-state | |
# By default, do not permit remote connections to X11 |
;;; auto-rsync-mode -- minor mode for auto rsync | |
;; | |
;; Author: @l3msh0 | |
;; | |
;;; Example | |
;; | |
;; (require 'auto-rsync) | |
;; (auto-rsync-mode t) | |
;; (setq auto-rsync-dir-alist |
;; Surround option words with quotes | |
;; It's helpful for making javascript work with IE. | |
;; i.e.: | |
;; | |
;; title: { | |
;; text: "highcharts example" | |
;; }, | |
;; exporting: { | |
;; enabled: false | |
;; }, |
#!/usr/bin/env python | |
import argparse | |
from wordnik import * | |
parser = argparse.ArgumentParser() | |
parser.add_argument("word", help="word to look for") | |
parser.add_argument("--example", "-i", action="store_true", |
#!/usr/bin/env python | |
# Archive old Maildir type messages | |
# Wu Jiang ([email protected]) | |
import argparse | |
from datetime import timedelta | |
import mailbox | |
import time |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!