Skip to content

Instantly share code, notes, and snippets.

@langseth
langseth / file_rename.py
Created February 10, 2012 05:18
simple example of kevent in python. Simply notes when a monitored file is deleted or renamed.
#!/usr/local/bin/python
import select
from select import kqueue, kevent
import os
import sys
filename = "access.log"
fd = os.open(filename,os.O_RDONLY)
kq = kqueue()
@langseth
langseth / gist:3920288
Created October 19, 2012 19:46
varnishd cli "stats" command output
stats
200 355
1 N struct sess_mem
15 N struct smf
15 N large free smf
26999016 N worker threads limited
1 N backends
5 SHM records
5 SHM writes