/* Generated by Pyrex 0.9.5.1a on Fri Jul 13 23:28:24 2007 */ #include "Python.h" #include "structmember.h" #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif __PYX_EXTERN_C double pow(double, double); #include "statgrab.h" typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/ typedef struct {PyObject **p; char *s; long n;} __Pyx_StringTabEntry; /*proto*/ static PyObject *__pyx_m; static PyObject *__pyx_b; static int __pyx_lineno; static char *__pyx_filename; static char **__pyx_f; static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, char *modname); /*proto*/ static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ static void __Pyx_AddTraceback(char *funcname); /*proto*/ /* Declarations from _statgrab */ /* Implementation of _statgrab */ static PyObject *__pyx_n_py_SG_ERROR_NONE; static PyObject *__pyx_n_py_SG_ERROR_ASPRINTF; static PyObject *__pyx_n_py_SG_ERROR_DEVSTAT_GETDEVS; static PyObject *__pyx_n_py_SG_ERROR_DEVSTAT_SELECTDEVS; static PyObject *__pyx_n_py_SG_ERROR_ENOENT; static PyObject *__pyx_n_py_SG_ERROR_GETIFADDRS; static PyObject *__pyx_n_py_SG_ERROR_GETMNTINFO; static PyObject *__pyx_n_py_SG_ERROR_GETPAGESIZE; static PyObject *__pyx_n_py_SG_ERROR_KSTAT_DATA_LOOKUP; static PyObject *__pyx_n_py_SG_ERROR_KSTAT_LOOKUP; static PyObject *__pyx_n_py_SG_ERROR_KSTAT_OPEN; static PyObject *__pyx_n_py_SG_ERROR_KSTAT_READ; static PyObject *__pyx_n_py_SG_ERROR_KVM_GETSWAPINFO; static PyObject *__pyx_n_py_SG_ERROR_KVM_OPENFILES; static PyObject *__pyx_n_py_SG_ERROR_MALLOC; static PyObject *__pyx_n_py_SG_ERROR_OPEN; static PyObject *__pyx_n_py_SG_ERROR_OPENDIR; static PyObject *__pyx_n_py_SG_ERROR_PARSE; static PyObject *__pyx_n_py_SG_ERROR_SETEGID; static PyObject *__pyx_n_py_SG_ERROR_SETEUID; static PyObject *__pyx_n_py_SG_ERROR_SETMNTENT; static PyObject *__pyx_n_py_SG_ERROR_SOCKET; static PyObject *__pyx_n_py_SG_ERROR_SWAPCTL; static PyObject *__pyx_n_py_SG_ERROR_SYSCONF; static PyObject *__pyx_n_py_SG_ERROR_SYSCTL; static PyObject *__pyx_n_py_SG_ERROR_SYSCTLBYNAME; static PyObject *__pyx_n_py_SG_ERROR_SYSCTLNAMETOMIB; static PyObject *__pyx_n_py_SG_ERROR_UNAME; static PyObject *__pyx_n_py_SG_ERROR_UNSUPPORTED; static PyObject *__pyx_n_py_SG_ERROR_XSW_VER_MISMATCH; static PyObject *__pyx_n_py_SG_IFACE_DUPLEX_FULL; static PyObject *__pyx_n_py_SG_IFACE_DUPLEX_HALF; static PyObject *__pyx_n_py_SG_IFACE_DUPLEX_UNKNOWN; static PyObject *__pyx_n_py_SG_PROCESS_STATE_RUNNING; static PyObject *__pyx_n_py_SG_PROCESS_STATE_SLEEPING; static PyObject *__pyx_n_py_SG_PROCESS_STATE_STOPPED; static PyObject *__pyx_n_py_SG_PROCESS_STATE_ZOMBIE; static PyObject *__pyx_n_py_SG_PROCESS_STATE_UNKNOWN; static PyObject *__pyx_n_Result; static PyObject *__pyx_n_StatgrabException; static PyObject *__pyx_n_py_sg_init; static PyObject *__pyx_n_py_sg_shutdown; static PyObject *__pyx_n_py_sg_snapshot; static PyObject *__pyx_n_py_sg_drop_privileges; static PyObject *__pyx_n_py_sg_set_error; static PyObject *__pyx_n_py_sg_set_error_with_errno; static PyObject *__pyx_n_py_sg_get_error; static PyObject *__pyx_n_py_sg_get_error_arg; static PyObject *__pyx_n_py_sg_get_error_errno; static PyObject *__pyx_n_py_sg_str_error; static PyObject *__pyx_n_py_sg_get_host_info; static PyObject *__pyx_n_py_sg_get_cpu_stats; static PyObject *__pyx_n_py_sg_get_cpu_stats_diff; static PyObject *__pyx_n_py_sg_get_cpu_percents; static PyObject *__pyx_n_py_sg_get_mem_stats; static PyObject *__pyx_n_py_sg_get_load_stats; static PyObject *__pyx_n_py_sg_get_user_stats; static PyObject *__pyx_n_py_sg_get_swap_stats; static PyObject *__pyx_n_py_sg_get_fs_stats; static PyObject *__pyx_n_py_sg_get_disk_io_stats; static PyObject *__pyx_n_py_sg_get_disk_io_stats_diff; static PyObject *__pyx_n_py_sg_get_network_io_stats; static PyObject *__pyx_n_py_sg_get_network_io_stats_diff; static PyObject *__pyx_n_py_sg_get_network_iface_stats; static PyObject *__pyx_n_py_sg_get_page_stats; static PyObject *__pyx_n_py_sg_get_page_stats_diff; static PyObject *__pyx_n_py_sg_get_process_stats; static PyObject *__pyx_n_py_sg_get_process_count; static PyObject *__pyx_n___init__; static PyObject *__pyx_n___getitem__; static PyObject *__pyx_n___repr__; static PyObject *__pyx_n_Exception; static PyObject *__pyx_n___str__; static PyObject *__pyx_n_attrs; static PyObject *__pyx_n_setattr; static PyObject *__pyx_f_9_statgrab_6Result___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9_statgrab_6Result___init__ = {"__init__", (PyCFunction)__pyx_f_9_statgrab_6Result___init__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_f_9_statgrab_6Result___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_attrs = 0; PyObject *__pyx_v_attr; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"self","attrs",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_self, &__pyx_v_attrs)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_attrs); __pyx_v_attr = Py_None; Py_INCREF(Py_None); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":279 */ if (PyObject_SetAttr(__pyx_v_self, __pyx_n_attrs, __pyx_v_attrs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; goto __pyx_L1;} /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":280 */ __pyx_1 = PyObject_GetIter(__pyx_v_attrs); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;} for (;;) { __pyx_2 = PyIter_Next(__pyx_1); if (!__pyx_2) { if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;} break; } Py_DECREF(__pyx_v_attr); __pyx_v_attr = __pyx_2; __pyx_2 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":281 */ __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_setattr); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_attrs, __pyx_v_attr); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; goto __pyx_L1;} Py_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_self); Py_INCREF(__pyx_v_attr); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_attr); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; } Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("_statgrab.Result.__init__"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_attr); Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_attrs); return __pyx_r; } static PyObject *__pyx_n_getattr; static PyObject *__pyx_f_9_statgrab_6Result___getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9_statgrab_6Result___getitem__ = {"__getitem__", (PyCFunction)__pyx_f_9_statgrab_6Result___getitem__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_f_9_statgrab_6Result___getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_item = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"self","item",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_self, &__pyx_v_item)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_item); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":283 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_getattr); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; goto __pyx_L1;} __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; goto __pyx_L1;} Py_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_self); Py_INCREF(__pyx_v_item); PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_item); __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("_statgrab.Result.__getitem__"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_item); return __pyx_r; } static PyObject *__pyx_n_str; static PyObject *__pyx_f_9_statgrab_6Result___repr__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9_statgrab_6Result___repr__ = {"__repr__", (PyCFunction)__pyx_f_9_statgrab_6Result___repr__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_f_9_statgrab_6Result___repr__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"self",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) return 0; Py_INCREF(__pyx_v_self); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":285 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; goto __pyx_L1;} __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_attrs); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("_statgrab.Result.__repr__"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_n_value; static PyObject *__pyx_f_9_statgrab_17StatgrabException___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9_statgrab_17StatgrabException___init__ = {"__init__", (PyCFunction)__pyx_f_9_statgrab_17StatgrabException___init__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_f_9_statgrab_17StatgrabException___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_r; static char *__pyx_argnames[] = {"self","value",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_self, &__pyx_v_value)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_value); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":289 */ if (PyObject_SetAttr(__pyx_v_self, __pyx_n_value, __pyx_v_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L1;} __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("_statgrab.StatgrabException.__init__"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_value); return __pyx_r; } static PyObject *__pyx_n_repr; static PyObject *__pyx_f_9_statgrab_17StatgrabException___str__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_9_statgrab_17StatgrabException___str__ = {"__str__", (PyCFunction)__pyx_f_9_statgrab_17StatgrabException___str__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_f_9_statgrab_17StatgrabException___str__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"self",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) return 0; Py_INCREF(__pyx_v_self); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":291 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_repr); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; goto __pyx_L1;} __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_value); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("_statgrab.StatgrabException.__str__"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_n_True; static PyObject *__pyx_n_False; static PyObject *__pyx_f_9_statgrab_py_sg_init(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_init(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":295 */ __pyx_1 = (sg_init() == 0); if (__pyx_1) { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":296 */ __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; goto __pyx_L2; } /*else*/ { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":298 */ __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); __Pyx_AddTraceback("_statgrab.py_sg_init"); __pyx_r = 0; __pyx_L0:; return __pyx_r; } static PyObject *__pyx_f_9_statgrab_py_sg_shutdown(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_shutdown(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":301 */ __pyx_1 = (sg_shutdown() == 0); if (__pyx_1) { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":302 */ __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; goto __pyx_L2; } /*else*/ { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":304 */ __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); __Pyx_AddTraceback("_statgrab.py_sg_shutdown"); __pyx_r = 0; __pyx_L0:; return __pyx_r; } static PyObject *__pyx_f_9_statgrab_py_sg_snapshot(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_snapshot(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":307 */ __pyx_1 = (sg_snapshot() == 0); if (__pyx_1) { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":308 */ __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; goto __pyx_L2; } /*else*/ { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":310 */ __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); __Pyx_AddTraceback("_statgrab.py_sg_snapshot"); __pyx_r = 0; __pyx_L0:; return __pyx_r; } static PyObject *__pyx_f_9_statgrab_py_sg_drop_privileges(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_drop_privileges(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":313 */ __pyx_1 = (sg_drop_privileges() == 0); if (__pyx_1) { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":314 */ __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; goto __pyx_L2; } /*else*/ { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":316 */ __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); __Pyx_AddTraceback("_statgrab.py_sg_drop_privileges"); __pyx_r = 0; __pyx_L0:; return __pyx_r; } static PyObject *__pyx_f_9_statgrab_py_sg_set_error(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_set_error(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_code = 0; PyObject *__pyx_v_arg = 0; PyObject *__pyx_r; sg_error __pyx_1; char (*__pyx_2); static char *__pyx_argnames[] = {"code","arg",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_code, &__pyx_v_arg)) return 0; Py_INCREF(__pyx_v_code); Py_INCREF(__pyx_v_arg); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":319 */ __pyx_1 = ((sg_error )PyInt_AsLong(__pyx_v_code)); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; goto __pyx_L1;} __pyx_2 = PyString_AsString(__pyx_v_arg); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; goto __pyx_L1;} sg_set_error(__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("_statgrab.py_sg_set_error"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_code); Py_DECREF(__pyx_v_arg); return __pyx_r; } static PyObject *__pyx_f_9_statgrab_py_sg_set_error_with_errno(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_set_error_with_errno(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_code = 0; PyObject *__pyx_v_arg = 0; PyObject *__pyx_r; sg_error __pyx_1; char (*__pyx_2); static char *__pyx_argnames[] = {"code","arg",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_code, &__pyx_v_arg)) return 0; Py_INCREF(__pyx_v_code); Py_INCREF(__pyx_v_arg); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":322 */ __pyx_1 = ((sg_error )PyInt_AsLong(__pyx_v_code)); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; goto __pyx_L1;} __pyx_2 = PyString_AsString(__pyx_v_arg); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; goto __pyx_L1;} sg_set_error_with_errno(__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("_statgrab.py_sg_set_error_with_errno"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_code); Py_DECREF(__pyx_v_arg); return __pyx_r; } static PyObject *__pyx_f_9_statgrab_py_sg_get_error(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_get_error(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { sg_error __pyx_v_s; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":326 */ __pyx_v_s = sg_get_error(); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":327 */ __pyx_1 = PyInt_FromLong(__pyx_v_s); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("_statgrab.py_sg_get_error"); __pyx_r = 0; __pyx_L0:; return __pyx_r; } static PyObject *__pyx_f_9_statgrab_py_sg_get_error_arg(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_get_error_arg(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_s; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; __pyx_v_s = Py_None; Py_INCREF(Py_None); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":330 */ __pyx_1 = PyString_FromString(sg_get_error_arg()); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; goto __pyx_L1;} Py_DECREF(__pyx_v_s); __pyx_v_s = __pyx_1; __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":331 */ Py_INCREF(__pyx_v_s); __pyx_r = __pyx_v_s; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("_statgrab.py_sg_get_error_arg"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_s); return __pyx_r; } static PyObject *__pyx_f_9_statgrab_py_sg_get_error_errno(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_get_error_errno(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_s; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; __pyx_v_s = Py_None; Py_INCREF(Py_None); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":334 */ __pyx_1 = PyInt_FromLong(sg_get_error_errno()); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; goto __pyx_L1;} Py_DECREF(__pyx_v_s); __pyx_v_s = __pyx_1; __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":335 */ Py_INCREF(__pyx_v_s); __pyx_r = __pyx_v_s; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("_statgrab.py_sg_get_error_errno"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_s); return __pyx_r; } static PyObject *__pyx_f_9_statgrab_py_sg_str_error(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_str_error(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_code = 0; PyObject *__pyx_v_s; PyObject *__pyx_r; sg_error __pyx_1; PyObject *__pyx_2 = 0; static char *__pyx_argnames[] = {"code",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_code)) return 0; Py_INCREF(__pyx_v_code); __pyx_v_s = Py_None; Py_INCREF(Py_None); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":338 */ __pyx_1 = ((sg_error )PyInt_AsLong(__pyx_v_code)); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; goto __pyx_L1;} __pyx_2 = PyString_FromString(sg_str_error(__pyx_1)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; goto __pyx_L1;} Py_DECREF(__pyx_v_s); __pyx_v_s = __pyx_2; __pyx_2 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":339 */ Py_INCREF(__pyx_v_s); __pyx_r = __pyx_v_s; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); __Pyx_AddTraceback("_statgrab.py_sg_str_error"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_s); Py_DECREF(__pyx_v_code); return __pyx_r; } static PyObject *__pyx_n_os_name; static PyObject *__pyx_n_os_release; static PyObject *__pyx_n_os_version; static PyObject *__pyx_n_platform; static PyObject *__pyx_n_hostname; static PyObject *__pyx_n_uptime; static PyObject *__pyx_k3p; static char (__pyx_k3[]) = "sg_get_host_info() returned NULL"; static PyObject *__pyx_f_9_statgrab_py_sg_get_host_info(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_get_host_info(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { sg_host_info (*__pyx_v_s); PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":343 */ __pyx_v_s = sg_get_host_info(); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":344 */ __pyx_1 = (__pyx_v_s == NULL); if (__pyx_1) { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":345 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_StatgrabException); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_k3p, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":346 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_Result); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; goto __pyx_L1;} __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;} __pyx_4 = PyString_FromString(__pyx_v_s->os_name); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_os_name, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyString_FromString(__pyx_v_s->os_release); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_os_release, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyString_FromString(__pyx_v_s->os_version); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_os_version, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyString_FromString(__pyx_v_s->platform); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_platform, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyString_FromString(__pyx_v_s->hostname); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_hostname, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyInt_FromLong(__pyx_v_s->uptime); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_uptime, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("_statgrab.py_sg_get_host_info"); __pyx_r = 0; __pyx_L0:; return __pyx_r; } static PyObject *__pyx_n_user; static PyObject *__pyx_n_kernel; static PyObject *__pyx_n_idle; static PyObject *__pyx_n_iowait; static PyObject *__pyx_n_swap; static PyObject *__pyx_n_nice; static PyObject *__pyx_n_total; static PyObject *__pyx_n_systime; static PyObject *__pyx_k10p; static char (__pyx_k10[]) = "sg_get_cpu_stats() returned NULL"; static PyObject *__pyx_f_9_statgrab_py_sg_get_cpu_stats(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_get_cpu_stats(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { sg_cpu_stats (*__pyx_v_s); PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":358 */ __pyx_v_s = sg_get_cpu_stats(); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":359 */ __pyx_1 = (__pyx_v_s == NULL); if (__pyx_1) { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":360 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_StatgrabException); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_k10p, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":361 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_Result); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; goto __pyx_L1;} __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; goto __pyx_L1;} __pyx_4 = PyLong_FromLongLong(__pyx_v_s->user); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_user, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyLong_FromLongLong(__pyx_v_s->kernel); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_kernel, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyLong_FromLongLong(__pyx_v_s->idle); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_idle, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyLong_FromLongLong(__pyx_v_s->iowait); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_iowait, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyLong_FromLongLong(__pyx_v_s->swap); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_swap, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyLong_FromLongLong(__pyx_v_s->nice); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_nice, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyLong_FromLongLong(__pyx_v_s->total); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_total, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyInt_FromLong(__pyx_v_s->systime); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_systime, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("_statgrab.py_sg_get_cpu_stats"); __pyx_r = 0; __pyx_L0:; return __pyx_r; } static PyObject *__pyx_k19p; static char (__pyx_k19[]) = "sg_get_cpu_stats_diff() returned NULL"; static PyObject *__pyx_f_9_statgrab_py_sg_get_cpu_stats_diff(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_get_cpu_stats_diff(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { sg_cpu_stats (*__pyx_v_s); PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":375 */ __pyx_v_s = sg_get_cpu_stats_diff(); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":376 */ __pyx_1 = (__pyx_v_s == NULL); if (__pyx_1) { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":377 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_StatgrabException); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_k19p, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":378 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_Result); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; goto __pyx_L1;} __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; goto __pyx_L1;} __pyx_4 = PyLong_FromLongLong(__pyx_v_s->user); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_user, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyLong_FromLongLong(__pyx_v_s->kernel); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_kernel, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyLong_FromLongLong(__pyx_v_s->idle); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_idle, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyLong_FromLongLong(__pyx_v_s->iowait); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_iowait, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyLong_FromLongLong(__pyx_v_s->swap); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_swap, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyLong_FromLongLong(__pyx_v_s->nice); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_nice, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyLong_FromLongLong(__pyx_v_s->total); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_total, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyInt_FromLong(__pyx_v_s->systime); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_systime, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("_statgrab.py_sg_get_cpu_stats_diff"); __pyx_r = 0; __pyx_L0:; return __pyx_r; } static PyObject *__pyx_n_time_taken; static PyObject *__pyx_k28p; static char (__pyx_k28[]) = "sg_get_cpu_percents() returned NULL"; static PyObject *__pyx_f_9_statgrab_py_sg_get_cpu_percents(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_get_cpu_percents(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { sg_cpu_percents (*__pyx_v_s); PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":392 */ __pyx_v_s = sg_get_cpu_percents(); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":393 */ __pyx_1 = (__pyx_v_s == NULL); if (__pyx_1) { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":394 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_StatgrabException); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_k28p, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":395 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_Result); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; goto __pyx_L1;} __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble(__pyx_v_s->user); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_user, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyFloat_FromDouble(__pyx_v_s->kernel); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_kernel, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyFloat_FromDouble(__pyx_v_s->idle); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_idle, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyFloat_FromDouble(__pyx_v_s->iowait); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_iowait, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyFloat_FromDouble(__pyx_v_s->swap); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_swap, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyFloat_FromDouble(__pyx_v_s->nice); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_nice, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyInt_FromLong(__pyx_v_s->time_taken); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_time_taken, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("_statgrab.py_sg_get_cpu_percents"); __pyx_r = 0; __pyx_L0:; return __pyx_r; } static PyObject *__pyx_n_used; static PyObject *__pyx_n_free; static PyObject *__pyx_n_cache; static PyObject *__pyx_k36p; static char (__pyx_k36[]) = "sg_get_mem_stats() returned NULL"; static PyObject *__pyx_f_9_statgrab_py_sg_get_mem_stats(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_get_mem_stats(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { sg_mem_stats (*__pyx_v_s); PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":408 */ __pyx_v_s = sg_get_mem_stats(); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":409 */ __pyx_1 = (__pyx_v_s == NULL); if (__pyx_1) { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":410 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_StatgrabException); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_k36p, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":411 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_Result); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; goto __pyx_L1;} __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;} __pyx_4 = PyLong_FromLongLong(__pyx_v_s->total); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_total, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyLong_FromLongLong(__pyx_v_s->used); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_used, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyLong_FromLongLong(__pyx_v_s->free); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_free, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyLong_FromLongLong(__pyx_v_s->cache); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_cache, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("_statgrab.py_sg_get_mem_stats"); __pyx_r = 0; __pyx_L0:; return __pyx_r; } static PyObject *__pyx_n_min1; static PyObject *__pyx_n_min5; static PyObject *__pyx_n_min15; static PyObject *__pyx_k41p; static char (__pyx_k41[]) = "sg_get_load_stats() returned NULL"; static PyObject *__pyx_f_9_statgrab_py_sg_get_load_stats(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_get_load_stats(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { sg_load_stats (*__pyx_v_s); PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":421 */ __pyx_v_s = sg_get_load_stats(); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":422 */ __pyx_1 = (__pyx_v_s == NULL); if (__pyx_1) { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":423 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_StatgrabException); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_k41p, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":424 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_Result); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; goto __pyx_L1;} __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble(__pyx_v_s->min1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_min1, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyFloat_FromDouble(__pyx_v_s->min5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_min5, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyFloat_FromDouble(__pyx_v_s->min15); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_min15, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("_statgrab.py_sg_get_load_stats"); __pyx_r = 0; __pyx_L0:; return __pyx_r; } static PyObject *__pyx_n_name_list; static PyObject *__pyx_n_num_entries; static PyObject *__pyx_k45p; static char (__pyx_k45[]) = "sg_get_user_stats() returned NULL"; static PyObject *__pyx_f_9_statgrab_py_sg_get_user_stats(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_get_user_stats(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { sg_user_stats (*__pyx_v_s); PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":433 */ __pyx_v_s = sg_get_user_stats(); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":434 */ __pyx_1 = (__pyx_v_s == NULL); if (__pyx_1) { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":435 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_StatgrabException); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_k45p, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":436 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_Result); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; goto __pyx_L1;} __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; goto __pyx_L1;} __pyx_4 = PyString_FromString(__pyx_v_s->name_list); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_name_list, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyInt_FromLong(__pyx_v_s->num_entries); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_num_entries, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("_statgrab.py_sg_get_user_stats"); __pyx_r = 0; __pyx_L0:; return __pyx_r; } static PyObject *__pyx_k48p; static char (__pyx_k48[]) = "sg_get_swap_stats() returned NULL"; static PyObject *__pyx_f_9_statgrab_py_sg_get_swap_stats(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_get_swap_stats(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { sg_swap_stats (*__pyx_v_s); PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":444 */ __pyx_v_s = sg_get_swap_stats(); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":445 */ __pyx_1 = (__pyx_v_s == NULL); if (__pyx_1) { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":446 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_StatgrabException); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_k48p, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":447 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_Result); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; goto __pyx_L1;} __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; goto __pyx_L1;} __pyx_4 = PyLong_FromLongLong(__pyx_v_s->total); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_total, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyLong_FromLongLong(__pyx_v_s->used); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_used, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyLong_FromLongLong(__pyx_v_s->free); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_free, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("_statgrab.py_sg_get_swap_stats"); __pyx_r = 0; __pyx_L0:; return __pyx_r; } static PyObject *__pyx_n_append; static PyObject *__pyx_n_device_name; static PyObject *__pyx_n_fs_type; static PyObject *__pyx_n_mnt_point; static PyObject *__pyx_n_size; static PyObject *__pyx_n_avail; static PyObject *__pyx_n_total_inodes; static PyObject *__pyx_n_used_inodes; static PyObject *__pyx_n_free_inodes; static PyObject *__pyx_n_avail_inodes; static PyObject *__pyx_n_io_size; static PyObject *__pyx_n_block_size; static PyObject *__pyx_n_total_blocks; static PyObject *__pyx_n_free_blocks; static PyObject *__pyx_n_used_blocks; static PyObject *__pyx_n_avail_blocks; static PyObject *__pyx_k52p; static char (__pyx_k52[]) = "sg_get_fs_stats() returned NULL"; static PyObject *__pyx_f_9_statgrab_py_sg_get_fs_stats(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_get_fs_stats(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { sg_fs_stats (*__pyx_v_s); int __pyx_v_entries; PyObject *__pyx_v_list; PyObject *__pyx_v_i; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; long __pyx_3; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; PyObject *__pyx_6 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; __pyx_v_list = Py_None; Py_INCREF(Py_None); __pyx_v_i = Py_None; Py_INCREF(Py_None); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":457 */ __pyx_v_s = sg_get_fs_stats((&__pyx_v_entries)); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":458 */ __pyx_1 = (__pyx_v_s == NULL); if (__pyx_1) { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":459 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_StatgrabException); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_k52p, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":460 */ __pyx_2 = PyList_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; goto __pyx_L1;} Py_DECREF(__pyx_v_list); __pyx_v_list = __pyx_2; __pyx_2 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":461 */ for (__pyx_3 = 0; __pyx_3 < __pyx_v_entries; ++__pyx_3) { __pyx_2 = PyInt_FromLong(__pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; goto __pyx_L1;} Py_DECREF(__pyx_v_i); __pyx_v_i = __pyx_2; __pyx_2 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":462 */ __pyx_2 = PyObject_GetAttr(__pyx_v_list, __pyx_n_append); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; goto __pyx_L1;} __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_Result); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; goto __pyx_L1;} __pyx_5 = PyDict_New(); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; goto __pyx_L1;} __pyx_6 = PyString_FromString(__pyx_v_s->device_name); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_device_name, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyString_FromString(__pyx_v_s->fs_type); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_fs_type, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyString_FromString(__pyx_v_s->mnt_point); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_mnt_point, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->size); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_size, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->used); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_used, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->avail); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_avail, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->total_inodes); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_total_inodes, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->used_inodes); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_used_inodes, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->free_inodes); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_free_inodes, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->avail_inodes); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_avail_inodes, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->io_size); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_io_size, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->block_size); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_block_size, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->total_blocks); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_total_blocks, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->free_blocks); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_free_blocks, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->used_blocks); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_used_blocks, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->avail_blocks); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_avail_blocks, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_6, 0, __pyx_5); __pyx_5 = 0; __pyx_5 = PyObject_CallObject(__pyx_4, __pyx_6); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_5); __pyx_5 = 0; __pyx_6 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_6); __pyx_6 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":481 */ __pyx_v_s = (__pyx_v_s + 1); } /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":482 */ Py_INCREF(__pyx_v_list); __pyx_r = __pyx_v_list; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); Py_XDECREF(__pyx_6); __Pyx_AddTraceback("_statgrab.py_sg_get_fs_stats"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_list); Py_DECREF(__pyx_v_i); return __pyx_r; } static PyObject *__pyx_n_disk_name; static PyObject *__pyx_n_read_bytes; static PyObject *__pyx_n_write_bytes; static PyObject *__pyx_k69p; static char (__pyx_k69[]) = "sg_get_disk_io_stats() returned NULL"; static PyObject *__pyx_f_9_statgrab_py_sg_get_disk_io_stats(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_get_disk_io_stats(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { sg_disk_io_stats (*__pyx_v_s); int __pyx_v_entries; PyObject *__pyx_v_list; PyObject *__pyx_v_i; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; long __pyx_3; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; PyObject *__pyx_6 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; __pyx_v_list = Py_None; Py_INCREF(Py_None); __pyx_v_i = Py_None; Py_INCREF(Py_None); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":487 */ __pyx_v_s = sg_get_disk_io_stats((&__pyx_v_entries)); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":488 */ __pyx_1 = (__pyx_v_s == NULL); if (__pyx_1) { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":489 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_StatgrabException); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_k69p, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":490 */ __pyx_2 = PyList_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; goto __pyx_L1;} Py_DECREF(__pyx_v_list); __pyx_v_list = __pyx_2; __pyx_2 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":491 */ for (__pyx_3 = 0; __pyx_3 < __pyx_v_entries; ++__pyx_3) { __pyx_2 = PyInt_FromLong(__pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; goto __pyx_L1;} Py_DECREF(__pyx_v_i); __pyx_v_i = __pyx_2; __pyx_2 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":492 */ __pyx_2 = PyObject_GetAttr(__pyx_v_list, __pyx_n_append); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; goto __pyx_L1;} __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_Result); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; goto __pyx_L1;} __pyx_5 = PyDict_New(); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; goto __pyx_L1;} __pyx_6 = PyString_FromString(__pyx_v_s->disk_name); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_disk_name, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->read_bytes); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_read_bytes, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->write_bytes); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_write_bytes, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyInt_FromLong(__pyx_v_s->systime); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_systime, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_6, 0, __pyx_5); __pyx_5 = 0; __pyx_5 = PyObject_CallObject(__pyx_4, __pyx_6); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_5); __pyx_5 = 0; __pyx_6 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_6); __pyx_6 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":499 */ __pyx_v_s = (__pyx_v_s + 1); } /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":500 */ Py_INCREF(__pyx_v_list); __pyx_r = __pyx_v_list; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); Py_XDECREF(__pyx_6); __Pyx_AddTraceback("_statgrab.py_sg_get_disk_io_stats"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_list); Py_DECREF(__pyx_v_i); return __pyx_r; } static PyObject *__pyx_k74p; static char (__pyx_k74[]) = "sg_get_disk_io_stats_diff() returned NULL"; static PyObject *__pyx_f_9_statgrab_py_sg_get_disk_io_stats_diff(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_get_disk_io_stats_diff(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { sg_disk_io_stats (*__pyx_v_s); int __pyx_v_entries; PyObject *__pyx_v_list; PyObject *__pyx_v_i; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; long __pyx_3; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; PyObject *__pyx_6 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; __pyx_v_list = Py_None; Py_INCREF(Py_None); __pyx_v_i = Py_None; Py_INCREF(Py_None); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":505 */ __pyx_v_s = sg_get_disk_io_stats_diff((&__pyx_v_entries)); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":506 */ __pyx_1 = (__pyx_v_s == NULL); if (__pyx_1) { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":507 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_StatgrabException); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_k74p, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":508 */ __pyx_2 = PyList_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; goto __pyx_L1;} Py_DECREF(__pyx_v_list); __pyx_v_list = __pyx_2; __pyx_2 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":509 */ for (__pyx_3 = 0; __pyx_3 < __pyx_v_entries; ++__pyx_3) { __pyx_2 = PyInt_FromLong(__pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; goto __pyx_L1;} Py_DECREF(__pyx_v_i); __pyx_v_i = __pyx_2; __pyx_2 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":510 */ __pyx_2 = PyObject_GetAttr(__pyx_v_list, __pyx_n_append); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; goto __pyx_L1;} __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_Result); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; goto __pyx_L1;} __pyx_5 = PyDict_New(); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; goto __pyx_L1;} __pyx_6 = PyString_FromString(__pyx_v_s->disk_name); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_disk_name, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->read_bytes); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_read_bytes, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->write_bytes); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_write_bytes, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyInt_FromLong(__pyx_v_s->systime); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_systime, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_6, 0, __pyx_5); __pyx_5 = 0; __pyx_5 = PyObject_CallObject(__pyx_4, __pyx_6); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_5); __pyx_5 = 0; __pyx_6 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_6); __pyx_6 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":517 */ __pyx_v_s = (__pyx_v_s + 1); } /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":518 */ Py_INCREF(__pyx_v_list); __pyx_r = __pyx_v_list; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); Py_XDECREF(__pyx_6); __Pyx_AddTraceback("_statgrab.py_sg_get_disk_io_stats_diff"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_list); Py_DECREF(__pyx_v_i); return __pyx_r; } static PyObject *__pyx_n_interface_name; static PyObject *__pyx_n_tx; static PyObject *__pyx_n_rx; static PyObject *__pyx_n_ipackets; static PyObject *__pyx_n_opackets; static PyObject *__pyx_n_ierrors; static PyObject *__pyx_n_oerrors; static PyObject *__pyx_n_collisions; static PyObject *__pyx_k79p; static char (__pyx_k79[]) = "sg_get_network_io_stats() returned NULL"; static PyObject *__pyx_f_9_statgrab_py_sg_get_network_io_stats(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_get_network_io_stats(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { sg_network_io_stats (*__pyx_v_s); int __pyx_v_entries; PyObject *__pyx_v_list; PyObject *__pyx_v_i; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; long __pyx_3; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; PyObject *__pyx_6 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; __pyx_v_list = Py_None; Py_INCREF(Py_None); __pyx_v_i = Py_None; Py_INCREF(Py_None); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":523 */ __pyx_v_s = sg_get_network_io_stats((&__pyx_v_entries)); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":524 */ __pyx_1 = (__pyx_v_s == NULL); if (__pyx_1) { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":525 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_StatgrabException); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_k79p, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":526 */ __pyx_2 = PyList_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; goto __pyx_L1;} Py_DECREF(__pyx_v_list); __pyx_v_list = __pyx_2; __pyx_2 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":527 */ for (__pyx_3 = 0; __pyx_3 < __pyx_v_entries; ++__pyx_3) { __pyx_2 = PyInt_FromLong(__pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; goto __pyx_L1;} Py_DECREF(__pyx_v_i); __pyx_v_i = __pyx_2; __pyx_2 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":528 */ __pyx_2 = PyObject_GetAttr(__pyx_v_list, __pyx_n_append); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; goto __pyx_L1;} __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_Result); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; goto __pyx_L1;} __pyx_5 = PyDict_New(); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; goto __pyx_L1;} __pyx_6 = PyString_FromString(__pyx_v_s->interface_name); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_interface_name, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->tx); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_tx, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->rx); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_rx, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->ipackets); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_ipackets, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->opackets); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_opackets, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->ierrors); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_ierrors, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->oerrors); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_oerrors, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->collisions); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_collisions, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyInt_FromLong(__pyx_v_s->systime); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_systime, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_6, 0, __pyx_5); __pyx_5 = 0; __pyx_5 = PyObject_CallObject(__pyx_4, __pyx_6); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_5); __pyx_5 = 0; __pyx_6 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_6); __pyx_6 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":540 */ __pyx_v_s = (__pyx_v_s + 1); } /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":541 */ Py_INCREF(__pyx_v_list); __pyx_r = __pyx_v_list; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); Py_XDECREF(__pyx_6); __Pyx_AddTraceback("_statgrab.py_sg_get_network_io_stats"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_list); Py_DECREF(__pyx_v_i); return __pyx_r; } static PyObject *__pyx_k89p; static char (__pyx_k89[]) = "sg_get_network_io_stats_diff() returned NULL"; static PyObject *__pyx_f_9_statgrab_py_sg_get_network_io_stats_diff(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_get_network_io_stats_diff(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { sg_network_io_stats (*__pyx_v_s); int __pyx_v_entries; PyObject *__pyx_v_list; PyObject *__pyx_v_i; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; long __pyx_3; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; PyObject *__pyx_6 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; __pyx_v_list = Py_None; Py_INCREF(Py_None); __pyx_v_i = Py_None; Py_INCREF(Py_None); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":546 */ __pyx_v_s = sg_get_network_io_stats_diff((&__pyx_v_entries)); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":547 */ __pyx_1 = (__pyx_v_s == NULL); if (__pyx_1) { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":548 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_StatgrabException); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_k89p, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":549 */ __pyx_2 = PyList_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; goto __pyx_L1;} Py_DECREF(__pyx_v_list); __pyx_v_list = __pyx_2; __pyx_2 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":550 */ for (__pyx_3 = 0; __pyx_3 < __pyx_v_entries; ++__pyx_3) { __pyx_2 = PyInt_FromLong(__pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;} Py_DECREF(__pyx_v_i); __pyx_v_i = __pyx_2; __pyx_2 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":551 */ __pyx_2 = PyObject_GetAttr(__pyx_v_list, __pyx_n_append); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; goto __pyx_L1;} __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_Result); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; goto __pyx_L1;} __pyx_5 = PyDict_New(); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; goto __pyx_L1;} __pyx_6 = PyString_FromString(__pyx_v_s->interface_name); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_interface_name, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->tx); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_tx, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->rx); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_rx, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->ipackets); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_ipackets, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->opackets); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_opackets, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->ierrors); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_ierrors, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->oerrors); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_oerrors, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromLongLong(__pyx_v_s->collisions); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_collisions, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyInt_FromLong(__pyx_v_s->systime); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_systime, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_6, 0, __pyx_5); __pyx_5 = 0; __pyx_5 = PyObject_CallObject(__pyx_4, __pyx_6); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_5); __pyx_5 = 0; __pyx_6 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_6); __pyx_6 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":563 */ __pyx_v_s = (__pyx_v_s + 1); } /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":564 */ Py_INCREF(__pyx_v_list); __pyx_r = __pyx_v_list; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); Py_XDECREF(__pyx_6); __Pyx_AddTraceback("_statgrab.py_sg_get_network_io_stats_diff"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_list); Py_DECREF(__pyx_v_i); return __pyx_r; } static PyObject *__pyx_n_speed; static PyObject *__pyx_n_duplex; static PyObject *__pyx_n_up; static PyObject *__pyx_k99p; static char (__pyx_k99[]) = "sg_get_network_iface_stats() returned NULL"; static PyObject *__pyx_f_9_statgrab_py_sg_get_network_iface_stats(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_get_network_iface_stats(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { sg_network_iface_stats (*__pyx_v_s); int __pyx_v_entries; PyObject *__pyx_v_list; PyObject *__pyx_v_i; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; long __pyx_3; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; PyObject *__pyx_6 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; __pyx_v_list = Py_None; Py_INCREF(Py_None); __pyx_v_i = Py_None; Py_INCREF(Py_None); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":569 */ __pyx_v_s = sg_get_network_iface_stats((&__pyx_v_entries)); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":570 */ __pyx_1 = (__pyx_v_s == NULL); if (__pyx_1) { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":571 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_StatgrabException); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_k99p, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":572 */ __pyx_2 = PyList_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; goto __pyx_L1;} Py_DECREF(__pyx_v_list); __pyx_v_list = __pyx_2; __pyx_2 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":573 */ for (__pyx_3 = 0; __pyx_3 < __pyx_v_entries; ++__pyx_3) { __pyx_2 = PyInt_FromLong(__pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; goto __pyx_L1;} Py_DECREF(__pyx_v_i); __pyx_v_i = __pyx_2; __pyx_2 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":574 */ __pyx_2 = PyObject_GetAttr(__pyx_v_list, __pyx_n_append); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; goto __pyx_L1;} __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_Result); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; goto __pyx_L1;} __pyx_5 = PyDict_New(); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; goto __pyx_L1;} __pyx_6 = PyString_FromString(__pyx_v_s->interface_name); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_interface_name, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyInt_FromLong(__pyx_v_s->speed); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_speed, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyInt_FromLong(__pyx_v_s->duplex); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_duplex, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyInt_FromLong(__pyx_v_s->up); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_up, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_6, 0, __pyx_5); __pyx_5 = 0; __pyx_5 = PyObject_CallObject(__pyx_4, __pyx_6); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_5); __pyx_5 = 0; __pyx_6 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_6); __pyx_6 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":581 */ __pyx_v_s = (__pyx_v_s + 1); } /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":582 */ Py_INCREF(__pyx_v_list); __pyx_r = __pyx_v_list; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); Py_XDECREF(__pyx_6); __Pyx_AddTraceback("_statgrab.py_sg_get_network_iface_stats"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_list); Py_DECREF(__pyx_v_i); return __pyx_r; } static PyObject *__pyx_n_pages_pagein; static PyObject *__pyx_n_pages_pageout; static PyObject *__pyx_k104p; static char (__pyx_k104[]) = "sg_get_page_stats() returned NULL"; static PyObject *__pyx_f_9_statgrab_py_sg_get_page_stats(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_get_page_stats(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { sg_page_stats (*__pyx_v_s); PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":586 */ __pyx_v_s = sg_get_page_stats(); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":587 */ __pyx_1 = (__pyx_v_s == NULL); if (__pyx_1) { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":588 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_StatgrabException); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_k104p, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":589 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_Result); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; goto __pyx_L1;} __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; goto __pyx_L1;} __pyx_4 = PyLong_FromLongLong(__pyx_v_s->pages_pagein); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_pages_pagein, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyLong_FromLongLong(__pyx_v_s->pages_pageout); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_pages_pageout, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("_statgrab.py_sg_get_page_stats"); __pyx_r = 0; __pyx_L0:; return __pyx_r; } static PyObject *__pyx_k107p; static char (__pyx_k107[]) = "sg_get_page_stats_diff() returned NULL"; static PyObject *__pyx_f_9_statgrab_py_sg_get_page_stats_diff(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_get_page_stats_diff(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { sg_page_stats (*__pyx_v_s); PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":597 */ __pyx_v_s = sg_get_page_stats_diff(); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":598 */ __pyx_1 = (__pyx_v_s == NULL); if (__pyx_1) { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":599 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_StatgrabException); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_k107p, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":600 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_Result); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; goto __pyx_L1;} __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; goto __pyx_L1;} __pyx_4 = PyLong_FromLongLong(__pyx_v_s->pages_pagein); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_pages_pagein, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyLong_FromLongLong(__pyx_v_s->pages_pageout); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_pages_pageout, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("_statgrab.py_sg_get_page_stats_diff"); __pyx_r = 0; __pyx_L0:; return __pyx_r; } static PyObject *__pyx_n_process_name; static PyObject *__pyx_n_proctitle; static PyObject *__pyx_n_pid; static PyObject *__pyx_n_parent; static PyObject *__pyx_n_pgid; static PyObject *__pyx_n_uid; static PyObject *__pyx_n_euid; static PyObject *__pyx_n_gid; static PyObject *__pyx_n_egid; static PyObject *__pyx_n_proc_size; static PyObject *__pyx_n_proc_resident; static PyObject *__pyx_n_time_spent; static PyObject *__pyx_n_cpu_percent; static PyObject *__pyx_n_state; static PyObject *__pyx_k110p; static PyObject *__pyx_k111p; static PyObject *__pyx_k112p; static char (__pyx_k110[]) = "sg_get_process_stats() returned NULL"; static char (__pyx_k111[]) = ""; static char (__pyx_k112[]) = ""; static PyObject *__pyx_f_9_statgrab_py_sg_get_process_stats(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_get_process_stats(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { sg_process_stats (*__pyx_v_s); int __pyx_v_entries; PyObject *__pyx_v_list; PyObject *__pyx_v_i; PyObject *__pyx_v_process_name; PyObject *__pyx_v_proctitle; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; long __pyx_3; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; PyObject *__pyx_6 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; __pyx_v_list = Py_None; Py_INCREF(Py_None); __pyx_v_i = Py_None; Py_INCREF(Py_None); __pyx_v_process_name = Py_None; Py_INCREF(Py_None); __pyx_v_proctitle = Py_None; Py_INCREF(Py_None); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":609 */ __pyx_v_s = sg_get_process_stats((&__pyx_v_entries)); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":610 */ __pyx_1 = (__pyx_v_s == NULL); if (__pyx_1) { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":611 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_StatgrabException); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_k110p, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":612 */ __pyx_2 = PyList_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; goto __pyx_L1;} Py_DECREF(__pyx_v_list); __pyx_v_list = __pyx_2; __pyx_2 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":613 */ for (__pyx_3 = 0; __pyx_3 < __pyx_v_entries; ++__pyx_3) { __pyx_2 = PyInt_FromLong(__pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; goto __pyx_L1;} Py_DECREF(__pyx_v_i); __pyx_v_i = __pyx_2; __pyx_2 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":614 */ __pyx_1 = (__pyx_v_s->process_name == NULL); if (__pyx_1) { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":615 */ Py_INCREF(__pyx_k111p); Py_DECREF(__pyx_v_process_name); __pyx_v_process_name = __pyx_k111p; goto __pyx_L5; } /*else*/ { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":617 */ __pyx_2 = PyString_FromString(__pyx_v_s->process_name); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; goto __pyx_L1;} Py_DECREF(__pyx_v_process_name); __pyx_v_process_name = __pyx_2; __pyx_2 = 0; } __pyx_L5:; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":618 */ __pyx_1 = (__pyx_v_s->proctitle == NULL); if (__pyx_1) { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":619 */ Py_INCREF(__pyx_k112p); Py_DECREF(__pyx_v_proctitle); __pyx_v_proctitle = __pyx_k112p; goto __pyx_L6; } /*else*/ { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":621 */ __pyx_2 = PyString_FromString(__pyx_v_s->proctitle); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; goto __pyx_L1;} Py_DECREF(__pyx_v_proctitle); __pyx_v_proctitle = __pyx_2; __pyx_2 = 0; } __pyx_L6:; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":622 */ __pyx_2 = PyObject_GetAttr(__pyx_v_list, __pyx_n_append); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; goto __pyx_L1;} __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_Result); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; goto __pyx_L1;} __pyx_5 = PyDict_New(); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_process_name, __pyx_v_process_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_proctitle, __pyx_v_proctitle) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; goto __pyx_L1;} __pyx_6 = PyInt_FromLong(__pyx_v_s->pid); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_pid, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyInt_FromLong(__pyx_v_s->parent); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_parent, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyInt_FromLong(__pyx_v_s->pgid); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_pgid, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyInt_FromLong(__pyx_v_s->uid); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_uid, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyInt_FromLong(__pyx_v_s->euid); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_euid, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyInt_FromLong(__pyx_v_s->gid); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_gid, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyInt_FromLong(__pyx_v_s->egid); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_egid, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromUnsignedLongLong(__pyx_v_s->proc_size); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_proc_size, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyLong_FromUnsignedLongLong(__pyx_v_s->proc_resident); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_proc_resident, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyInt_FromLong(__pyx_v_s->time_spent); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_time_spent, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyFloat_FromDouble(__pyx_v_s->cpu_percent); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_cpu_percent, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyInt_FromLong(__pyx_v_s->nice); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_nice, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyInt_FromLong(__pyx_v_s->state); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; goto __pyx_L1;} if (PyDict_SetItem(__pyx_5, __pyx_n_state, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_6, 0, __pyx_5); __pyx_5 = 0; __pyx_5 = PyObject_CallObject(__pyx_4, __pyx_6); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_6); __pyx_6 = 0; __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_5); __pyx_5 = 0; __pyx_6 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_6); __pyx_6 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":640 */ __pyx_v_s = (__pyx_v_s + 1); } /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":641 */ Py_INCREF(__pyx_v_list); __pyx_r = __pyx_v_list; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); Py_XDECREF(__pyx_6); __Pyx_AddTraceback("_statgrab.py_sg_get_process_stats"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_list); Py_DECREF(__pyx_v_i); Py_DECREF(__pyx_v_process_name); Py_DECREF(__pyx_v_proctitle); return __pyx_r; } static PyObject *__pyx_n_running; static PyObject *__pyx_n_sleeping; static PyObject *__pyx_n_stopped; static PyObject *__pyx_n_zombie; static PyObject *__pyx_k128p; static char (__pyx_k128[]) = "sg_get_process_count() returned NULL"; static PyObject *__pyx_f_9_statgrab_py_sg_get_process_count(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9_statgrab_py_sg_get_process_count(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { sg_process_count (*__pyx_v_s); PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":645 */ __pyx_v_s = sg_get_process_count(); /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":646 */ __pyx_1 = (__pyx_v_s == NULL); if (__pyx_1) { /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":647 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_StatgrabException); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_k128p, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":648 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_Result); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; goto __pyx_L1;} __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; goto __pyx_L1;} __pyx_4 = PyInt_FromLong(__pyx_v_s->total); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_total, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyInt_FromLong(__pyx_v_s->running); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_running, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyInt_FromLong(__pyx_v_s->sleeping); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_sleeping, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyInt_FromLong(__pyx_v_s->stopped); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_stopped, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyInt_FromLong(__pyx_v_s->zombie); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; goto __pyx_L1;} if (PyDict_SetItem(__pyx_3, __pyx_n_zombie, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("_statgrab.py_sg_get_process_count"); __pyx_r = 0; __pyx_L0:; return __pyx_r; } static __Pyx_InternTabEntry __pyx_intern_tab[] = { {&__pyx_n_Exception, "Exception"}, {&__pyx_n_False, "False"}, {&__pyx_n_Result, "Result"}, {&__pyx_n_StatgrabException, "StatgrabException"}, {&__pyx_n_True, "True"}, {&__pyx_n___getitem__, "__getitem__"}, {&__pyx_n___init__, "__init__"}, {&__pyx_n___repr__, "__repr__"}, {&__pyx_n___str__, "__str__"}, {&__pyx_n_append, "append"}, {&__pyx_n_attrs, "attrs"}, {&__pyx_n_avail, "avail"}, {&__pyx_n_avail_blocks, "avail_blocks"}, {&__pyx_n_avail_inodes, "avail_inodes"}, {&__pyx_n_block_size, "block_size"}, {&__pyx_n_cache, "cache"}, {&__pyx_n_collisions, "collisions"}, {&__pyx_n_cpu_percent, "cpu_percent"}, {&__pyx_n_device_name, "device_name"}, {&__pyx_n_disk_name, "disk_name"}, {&__pyx_n_duplex, "duplex"}, {&__pyx_n_egid, "egid"}, {&__pyx_n_euid, "euid"}, {&__pyx_n_free, "free"}, {&__pyx_n_free_blocks, "free_blocks"}, {&__pyx_n_free_inodes, "free_inodes"}, {&__pyx_n_fs_type, "fs_type"}, {&__pyx_n_getattr, "getattr"}, {&__pyx_n_gid, "gid"}, {&__pyx_n_hostname, "hostname"}, {&__pyx_n_idle, "idle"}, {&__pyx_n_ierrors, "ierrors"}, {&__pyx_n_interface_name, "interface_name"}, {&__pyx_n_io_size, "io_size"}, {&__pyx_n_iowait, "iowait"}, {&__pyx_n_ipackets, "ipackets"}, {&__pyx_n_kernel, "kernel"}, {&__pyx_n_min1, "min1"}, {&__pyx_n_min15, "min15"}, {&__pyx_n_min5, "min5"}, {&__pyx_n_mnt_point, "mnt_point"}, {&__pyx_n_name_list, "name_list"}, {&__pyx_n_nice, "nice"}, {&__pyx_n_num_entries, "num_entries"}, {&__pyx_n_oerrors, "oerrors"}, {&__pyx_n_opackets, "opackets"}, {&__pyx_n_os_name, "os_name"}, {&__pyx_n_os_release, "os_release"}, {&__pyx_n_os_version, "os_version"}, {&__pyx_n_pages_pagein, "pages_pagein"}, {&__pyx_n_pages_pageout, "pages_pageout"}, {&__pyx_n_parent, "parent"}, {&__pyx_n_pgid, "pgid"}, {&__pyx_n_pid, "pid"}, {&__pyx_n_platform, "platform"}, {&__pyx_n_proc_resident, "proc_resident"}, {&__pyx_n_proc_size, "proc_size"}, {&__pyx_n_process_name, "process_name"}, {&__pyx_n_proctitle, "proctitle"}, {&__pyx_n_py_SG_ERROR_ASPRINTF, "py_SG_ERROR_ASPRINTF"}, {&__pyx_n_py_SG_ERROR_DEVSTAT_GETDEVS, "py_SG_ERROR_DEVSTAT_GETDEVS"}, {&__pyx_n_py_SG_ERROR_DEVSTAT_SELECTDEVS, "py_SG_ERROR_DEVSTAT_SELECTDEVS"}, {&__pyx_n_py_SG_ERROR_ENOENT, "py_SG_ERROR_ENOENT"}, {&__pyx_n_py_SG_ERROR_GETIFADDRS, "py_SG_ERROR_GETIFADDRS"}, {&__pyx_n_py_SG_ERROR_GETMNTINFO, "py_SG_ERROR_GETMNTINFO"}, {&__pyx_n_py_SG_ERROR_GETPAGESIZE, "py_SG_ERROR_GETPAGESIZE"}, {&__pyx_n_py_SG_ERROR_KSTAT_DATA_LOOKUP, "py_SG_ERROR_KSTAT_DATA_LOOKUP"}, {&__pyx_n_py_SG_ERROR_KSTAT_LOOKUP, "py_SG_ERROR_KSTAT_LOOKUP"}, {&__pyx_n_py_SG_ERROR_KSTAT_OPEN, "py_SG_ERROR_KSTAT_OPEN"}, {&__pyx_n_py_SG_ERROR_KSTAT_READ, "py_SG_ERROR_KSTAT_READ"}, {&__pyx_n_py_SG_ERROR_KVM_GETSWAPINFO, "py_SG_ERROR_KVM_GETSWAPINFO"}, {&__pyx_n_py_SG_ERROR_KVM_OPENFILES, "py_SG_ERROR_KVM_OPENFILES"}, {&__pyx_n_py_SG_ERROR_MALLOC, "py_SG_ERROR_MALLOC"}, {&__pyx_n_py_SG_ERROR_NONE, "py_SG_ERROR_NONE"}, {&__pyx_n_py_SG_ERROR_OPEN, "py_SG_ERROR_OPEN"}, {&__pyx_n_py_SG_ERROR_OPENDIR, "py_SG_ERROR_OPENDIR"}, {&__pyx_n_py_SG_ERROR_PARSE, "py_SG_ERROR_PARSE"}, {&__pyx_n_py_SG_ERROR_SETEGID, "py_SG_ERROR_SETEGID"}, {&__pyx_n_py_SG_ERROR_SETEUID, "py_SG_ERROR_SETEUID"}, {&__pyx_n_py_SG_ERROR_SETMNTENT, "py_SG_ERROR_SETMNTENT"}, {&__pyx_n_py_SG_ERROR_SOCKET, "py_SG_ERROR_SOCKET"}, {&__pyx_n_py_SG_ERROR_SWAPCTL, "py_SG_ERROR_SWAPCTL"}, {&__pyx_n_py_SG_ERROR_SYSCONF, "py_SG_ERROR_SYSCONF"}, {&__pyx_n_py_SG_ERROR_SYSCTL, "py_SG_ERROR_SYSCTL"}, {&__pyx_n_py_SG_ERROR_SYSCTLBYNAME, "py_SG_ERROR_SYSCTLBYNAME"}, {&__pyx_n_py_SG_ERROR_SYSCTLNAMETOMIB, "py_SG_ERROR_SYSCTLNAMETOMIB"}, {&__pyx_n_py_SG_ERROR_UNAME, "py_SG_ERROR_UNAME"}, {&__pyx_n_py_SG_ERROR_UNSUPPORTED, "py_SG_ERROR_UNSUPPORTED"}, {&__pyx_n_py_SG_ERROR_XSW_VER_MISMATCH, "py_SG_ERROR_XSW_VER_MISMATCH"}, {&__pyx_n_py_SG_IFACE_DUPLEX_FULL, "py_SG_IFACE_DUPLEX_FULL"}, {&__pyx_n_py_SG_IFACE_DUPLEX_HALF, "py_SG_IFACE_DUPLEX_HALF"}, {&__pyx_n_py_SG_IFACE_DUPLEX_UNKNOWN, "py_SG_IFACE_DUPLEX_UNKNOWN"}, {&__pyx_n_py_SG_PROCESS_STATE_RUNNING, "py_SG_PROCESS_STATE_RUNNING"}, {&__pyx_n_py_SG_PROCESS_STATE_SLEEPING, "py_SG_PROCESS_STATE_SLEEPING"}, {&__pyx_n_py_SG_PROCESS_STATE_STOPPED, "py_SG_PROCESS_STATE_STOPPED"}, {&__pyx_n_py_SG_PROCESS_STATE_UNKNOWN, "py_SG_PROCESS_STATE_UNKNOWN"}, {&__pyx_n_py_SG_PROCESS_STATE_ZOMBIE, "py_SG_PROCESS_STATE_ZOMBIE"}, {&__pyx_n_py_sg_drop_privileges, "py_sg_drop_privileges"}, {&__pyx_n_py_sg_get_cpu_percents, "py_sg_get_cpu_percents"}, {&__pyx_n_py_sg_get_cpu_stats, "py_sg_get_cpu_stats"}, {&__pyx_n_py_sg_get_cpu_stats_diff, "py_sg_get_cpu_stats_diff"}, {&__pyx_n_py_sg_get_disk_io_stats, "py_sg_get_disk_io_stats"}, {&__pyx_n_py_sg_get_disk_io_stats_diff, "py_sg_get_disk_io_stats_diff"}, {&__pyx_n_py_sg_get_error, "py_sg_get_error"}, {&__pyx_n_py_sg_get_error_arg, "py_sg_get_error_arg"}, {&__pyx_n_py_sg_get_error_errno, "py_sg_get_error_errno"}, {&__pyx_n_py_sg_get_fs_stats, "py_sg_get_fs_stats"}, {&__pyx_n_py_sg_get_host_info, "py_sg_get_host_info"}, {&__pyx_n_py_sg_get_load_stats, "py_sg_get_load_stats"}, {&__pyx_n_py_sg_get_mem_stats, "py_sg_get_mem_stats"}, {&__pyx_n_py_sg_get_network_iface_stats, "py_sg_get_network_iface_stats"}, {&__pyx_n_py_sg_get_network_io_stats, "py_sg_get_network_io_stats"}, {&__pyx_n_py_sg_get_network_io_stats_diff, "py_sg_get_network_io_stats_diff"}, {&__pyx_n_py_sg_get_page_stats, "py_sg_get_page_stats"}, {&__pyx_n_py_sg_get_page_stats_diff, "py_sg_get_page_stats_diff"}, {&__pyx_n_py_sg_get_process_count, "py_sg_get_process_count"}, {&__pyx_n_py_sg_get_process_stats, "py_sg_get_process_stats"}, {&__pyx_n_py_sg_get_swap_stats, "py_sg_get_swap_stats"}, {&__pyx_n_py_sg_get_user_stats, "py_sg_get_user_stats"}, {&__pyx_n_py_sg_init, "py_sg_init"}, {&__pyx_n_py_sg_set_error, "py_sg_set_error"}, {&__pyx_n_py_sg_set_error_with_errno, "py_sg_set_error_with_errno"}, {&__pyx_n_py_sg_shutdown, "py_sg_shutdown"}, {&__pyx_n_py_sg_snapshot, "py_sg_snapshot"}, {&__pyx_n_py_sg_str_error, "py_sg_str_error"}, {&__pyx_n_read_bytes, "read_bytes"}, {&__pyx_n_repr, "repr"}, {&__pyx_n_running, "running"}, {&__pyx_n_rx, "rx"}, {&__pyx_n_setattr, "setattr"}, {&__pyx_n_size, "size"}, {&__pyx_n_sleeping, "sleeping"}, {&__pyx_n_speed, "speed"}, {&__pyx_n_state, "state"}, {&__pyx_n_stopped, "stopped"}, {&__pyx_n_str, "str"}, {&__pyx_n_swap, "swap"}, {&__pyx_n_systime, "systime"}, {&__pyx_n_time_spent, "time_spent"}, {&__pyx_n_time_taken, "time_taken"}, {&__pyx_n_total, "total"}, {&__pyx_n_total_blocks, "total_blocks"}, {&__pyx_n_total_inodes, "total_inodes"}, {&__pyx_n_tx, "tx"}, {&__pyx_n_uid, "uid"}, {&__pyx_n_up, "up"}, {&__pyx_n_uptime, "uptime"}, {&__pyx_n_used, "used"}, {&__pyx_n_used_blocks, "used_blocks"}, {&__pyx_n_used_inodes, "used_inodes"}, {&__pyx_n_user, "user"}, {&__pyx_n_value, "value"}, {&__pyx_n_write_bytes, "write_bytes"}, {&__pyx_n_zombie, "zombie"}, {0, 0} }; static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_k3p, __pyx_k3, sizeof(__pyx_k3)}, {&__pyx_k10p, __pyx_k10, sizeof(__pyx_k10)}, {&__pyx_k19p, __pyx_k19, sizeof(__pyx_k19)}, {&__pyx_k28p, __pyx_k28, sizeof(__pyx_k28)}, {&__pyx_k36p, __pyx_k36, sizeof(__pyx_k36)}, {&__pyx_k41p, __pyx_k41, sizeof(__pyx_k41)}, {&__pyx_k45p, __pyx_k45, sizeof(__pyx_k45)}, {&__pyx_k48p, __pyx_k48, sizeof(__pyx_k48)}, {&__pyx_k52p, __pyx_k52, sizeof(__pyx_k52)}, {&__pyx_k69p, __pyx_k69, sizeof(__pyx_k69)}, {&__pyx_k74p, __pyx_k74, sizeof(__pyx_k74)}, {&__pyx_k79p, __pyx_k79, sizeof(__pyx_k79)}, {&__pyx_k89p, __pyx_k89, sizeof(__pyx_k89)}, {&__pyx_k99p, __pyx_k99, sizeof(__pyx_k99)}, {&__pyx_k104p, __pyx_k104, sizeof(__pyx_k104)}, {&__pyx_k107p, __pyx_k107, sizeof(__pyx_k107)}, {&__pyx_k110p, __pyx_k110, sizeof(__pyx_k110)}, {&__pyx_k111p, __pyx_k111, sizeof(__pyx_k111)}, {&__pyx_k112p, __pyx_k112, sizeof(__pyx_k112)}, {&__pyx_k128p, __pyx_k128, sizeof(__pyx_k128)}, {0, 0, 0} }; static struct PyMethodDef __pyx_methods[] = { {"py_sg_init", (PyCFunction)__pyx_f_9_statgrab_py_sg_init, METH_VARARGS|METH_KEYWORDS, 0}, {"py_sg_shutdown", (PyCFunction)__pyx_f_9_statgrab_py_sg_shutdown, METH_VARARGS|METH_KEYWORDS, 0}, {"py_sg_snapshot", (PyCFunction)__pyx_f_9_statgrab_py_sg_snapshot, METH_VARARGS|METH_KEYWORDS, 0}, {"py_sg_drop_privileges", (PyCFunction)__pyx_f_9_statgrab_py_sg_drop_privileges, METH_VARARGS|METH_KEYWORDS, 0}, {"py_sg_set_error", (PyCFunction)__pyx_f_9_statgrab_py_sg_set_error, METH_VARARGS|METH_KEYWORDS, 0}, {"py_sg_set_error_with_errno", (PyCFunction)__pyx_f_9_statgrab_py_sg_set_error_with_errno, METH_VARARGS|METH_KEYWORDS, 0}, {"py_sg_get_error", (PyCFunction)__pyx_f_9_statgrab_py_sg_get_error, METH_VARARGS|METH_KEYWORDS, 0}, {"py_sg_get_error_arg", (PyCFunction)__pyx_f_9_statgrab_py_sg_get_error_arg, METH_VARARGS|METH_KEYWORDS, 0}, {"py_sg_get_error_errno", (PyCFunction)__pyx_f_9_statgrab_py_sg_get_error_errno, METH_VARARGS|METH_KEYWORDS, 0}, {"py_sg_str_error", (PyCFunction)__pyx_f_9_statgrab_py_sg_str_error, METH_VARARGS|METH_KEYWORDS, 0}, {"py_sg_get_host_info", (PyCFunction)__pyx_f_9_statgrab_py_sg_get_host_info, METH_VARARGS|METH_KEYWORDS, 0}, {"py_sg_get_cpu_stats", (PyCFunction)__pyx_f_9_statgrab_py_sg_get_cpu_stats, METH_VARARGS|METH_KEYWORDS, 0}, {"py_sg_get_cpu_stats_diff", (PyCFunction)__pyx_f_9_statgrab_py_sg_get_cpu_stats_diff, METH_VARARGS|METH_KEYWORDS, 0}, {"py_sg_get_cpu_percents", (PyCFunction)__pyx_f_9_statgrab_py_sg_get_cpu_percents, METH_VARARGS|METH_KEYWORDS, 0}, {"py_sg_get_mem_stats", (PyCFunction)__pyx_f_9_statgrab_py_sg_get_mem_stats, METH_VARARGS|METH_KEYWORDS, 0}, {"py_sg_get_load_stats", (PyCFunction)__pyx_f_9_statgrab_py_sg_get_load_stats, METH_VARARGS|METH_KEYWORDS, 0}, {"py_sg_get_user_stats", (PyCFunction)__pyx_f_9_statgrab_py_sg_get_user_stats, METH_VARARGS|METH_KEYWORDS, 0}, {"py_sg_get_swap_stats", (PyCFunction)__pyx_f_9_statgrab_py_sg_get_swap_stats, METH_VARARGS|METH_KEYWORDS, 0}, {"py_sg_get_fs_stats", (PyCFunction)__pyx_f_9_statgrab_py_sg_get_fs_stats, METH_VARARGS|METH_KEYWORDS, 0}, {"py_sg_get_disk_io_stats", (PyCFunction)__pyx_f_9_statgrab_py_sg_get_disk_io_stats, METH_VARARGS|METH_KEYWORDS, 0}, {"py_sg_get_disk_io_stats_diff", (PyCFunction)__pyx_f_9_statgrab_py_sg_get_disk_io_stats_diff, METH_VARARGS|METH_KEYWORDS, 0}, {"py_sg_get_network_io_stats", (PyCFunction)__pyx_f_9_statgrab_py_sg_get_network_io_stats, METH_VARARGS|METH_KEYWORDS, 0}, {"py_sg_get_network_io_stats_diff", (PyCFunction)__pyx_f_9_statgrab_py_sg_get_network_io_stats_diff, METH_VARARGS|METH_KEYWORDS, 0}, {"py_sg_get_network_iface_stats", (PyCFunction)__pyx_f_9_statgrab_py_sg_get_network_iface_stats, METH_VARARGS|METH_KEYWORDS, 0}, {"py_sg_get_page_stats", (PyCFunction)__pyx_f_9_statgrab_py_sg_get_page_stats, METH_VARARGS|METH_KEYWORDS, 0}, {"py_sg_get_page_stats_diff", (PyCFunction)__pyx_f_9_statgrab_py_sg_get_page_stats_diff, METH_VARARGS|METH_KEYWORDS, 0}, {"py_sg_get_process_stats", (PyCFunction)__pyx_f_9_statgrab_py_sg_get_process_stats, METH_VARARGS|METH_KEYWORDS, 0}, {"py_sg_get_process_count", (PyCFunction)__pyx_f_9_statgrab_py_sg_get_process_count, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static void __pyx_init_filenames(void); /*proto*/ PyMODINIT_FUNC init_statgrab(void); /*proto*/ PyMODINIT_FUNC init_statgrab(void) { PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; __pyx_init_filenames(); __pyx_m = Py_InitModule4("_statgrab", __pyx_methods, 0, 0, PYTHON_API_VERSION); if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; goto __pyx_L1;}; __pyx_b = PyImport_AddModule("__builtin__"); if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; goto __pyx_L1;}; if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; goto __pyx_L1;}; if (__Pyx_InternStrings(__pyx_intern_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; goto __pyx_L1;}; if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; goto __pyx_L1;}; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":235 */ __pyx_1 = PyInt_FromLong(SG_ERROR_NONE); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_NONE, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":236 */ __pyx_1 = PyInt_FromLong(SG_ERROR_ASPRINTF); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_ASPRINTF, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":237 */ __pyx_1 = PyInt_FromLong(SG_ERROR_DEVSTAT_GETDEVS); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_DEVSTAT_GETDEVS, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":238 */ __pyx_1 = PyInt_FromLong(SG_ERROR_DEVSTAT_SELECTDEVS); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_DEVSTAT_SELECTDEVS, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":239 */ __pyx_1 = PyInt_FromLong(SG_ERROR_ENOENT); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_ENOENT, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":240 */ __pyx_1 = PyInt_FromLong(SG_ERROR_GETIFADDRS); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_GETIFADDRS, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":241 */ __pyx_1 = PyInt_FromLong(SG_ERROR_GETMNTINFO); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_GETMNTINFO, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":242 */ __pyx_1 = PyInt_FromLong(SG_ERROR_GETPAGESIZE); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_GETPAGESIZE, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":243 */ __pyx_1 = PyInt_FromLong(SG_ERROR_KSTAT_DATA_LOOKUP); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_KSTAT_DATA_LOOKUP, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":244 */ __pyx_1 = PyInt_FromLong(SG_ERROR_KSTAT_LOOKUP); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_KSTAT_LOOKUP, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":245 */ __pyx_1 = PyInt_FromLong(SG_ERROR_KSTAT_OPEN); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_KSTAT_OPEN, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":246 */ __pyx_1 = PyInt_FromLong(SG_ERROR_KSTAT_READ); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_KSTAT_READ, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":247 */ __pyx_1 = PyInt_FromLong(SG_ERROR_KVM_GETSWAPINFO); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_KVM_GETSWAPINFO, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":248 */ __pyx_1 = PyInt_FromLong(SG_ERROR_KVM_OPENFILES); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_KVM_OPENFILES, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":249 */ __pyx_1 = PyInt_FromLong(SG_ERROR_MALLOC); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_MALLOC, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":250 */ __pyx_1 = PyInt_FromLong(SG_ERROR_OPEN); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_OPEN, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":251 */ __pyx_1 = PyInt_FromLong(SG_ERROR_OPENDIR); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_OPENDIR, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":252 */ __pyx_1 = PyInt_FromLong(SG_ERROR_PARSE); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_PARSE, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":253 */ __pyx_1 = PyInt_FromLong(SG_ERROR_SETEGID); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_SETEGID, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":254 */ __pyx_1 = PyInt_FromLong(SG_ERROR_SETEUID); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_SETEUID, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":255 */ __pyx_1 = PyInt_FromLong(SG_ERROR_SETMNTENT); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_SETMNTENT, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":256 */ __pyx_1 = PyInt_FromLong(SG_ERROR_SOCKET); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_SOCKET, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":257 */ __pyx_1 = PyInt_FromLong(SG_ERROR_SWAPCTL); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_SWAPCTL, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":258 */ __pyx_1 = PyInt_FromLong(SG_ERROR_SYSCONF); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_SYSCONF, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":259 */ __pyx_1 = PyInt_FromLong(SG_ERROR_SYSCTL); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_SYSCTL, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":260 */ __pyx_1 = PyInt_FromLong(SG_ERROR_SYSCTLBYNAME); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_SYSCTLBYNAME, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":261 */ __pyx_1 = PyInt_FromLong(SG_ERROR_SYSCTLNAMETOMIB); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_SYSCTLNAMETOMIB, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":262 */ __pyx_1 = PyInt_FromLong(SG_ERROR_UNAME); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_UNAME, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":263 */ __pyx_1 = PyInt_FromLong(SG_ERROR_UNSUPPORTED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_UNSUPPORTED, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":264 */ __pyx_1 = PyInt_FromLong(SG_ERROR_XSW_VER_MISMATCH); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_ERROR_XSW_VER_MISMATCH, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":266 */ __pyx_1 = PyInt_FromLong(SG_IFACE_DUPLEX_FULL); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_IFACE_DUPLEX_FULL, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":267 */ __pyx_1 = PyInt_FromLong(SG_IFACE_DUPLEX_HALF); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_IFACE_DUPLEX_HALF, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":268 */ __pyx_1 = PyInt_FromLong(SG_IFACE_DUPLEX_UNKNOWN); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_IFACE_DUPLEX_UNKNOWN, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":270 */ __pyx_1 = PyInt_FromLong(SG_PROCESS_STATE_RUNNING); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_PROCESS_STATE_RUNNING, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":271 */ __pyx_1 = PyInt_FromLong(SG_PROCESS_STATE_SLEEPING); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_PROCESS_STATE_SLEEPING, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":272 */ __pyx_1 = PyInt_FromLong(SG_PROCESS_STATE_STOPPED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_PROCESS_STATE_STOPPED, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":273 */ __pyx_1 = PyInt_FromLong(SG_PROCESS_STATE_ZOMBIE); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_PROCESS_STATE_ZOMBIE, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":274 */ __pyx_1 = PyInt_FromLong(SG_PROCESS_STATE_UNKNOWN); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_py_SG_PROCESS_STATE_UNKNOWN, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":277 */ __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; goto __pyx_L1;} __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; goto __pyx_L1;} __pyx_3 = __Pyx_CreateClass(__pyx_2, __pyx_1, __pyx_n_Result, "_statgrab"); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":278 */ __pyx_2 = PyCFunction_New(&__pyx_mdef_9_statgrab_6Result___init__, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; goto __pyx_L1;} __pyx_4 = PyMethod_New(__pyx_2, 0, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; if (PyObject_SetAttr(__pyx_3, __pyx_n___init__, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":282 */ __pyx_2 = PyCFunction_New(&__pyx_mdef_9_statgrab_6Result___getitem__, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; goto __pyx_L1;} __pyx_4 = PyMethod_New(__pyx_2, 0, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; if (PyObject_SetAttr(__pyx_3, __pyx_n___getitem__, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":284 */ __pyx_2 = PyCFunction_New(&__pyx_mdef_9_statgrab_6Result___repr__, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; goto __pyx_L1;} __pyx_4 = PyMethod_New(__pyx_2, 0, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; if (PyObject_SetAttr(__pyx_3, __pyx_n___repr__, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; if (PyObject_SetAttr(__pyx_m, __pyx_n_Result, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":287 */ __pyx_2 = PyDict_New(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; goto __pyx_L1;} __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4); __pyx_4 = 0; __pyx_1 = __Pyx_CreateClass(__pyx_3, __pyx_2, __pyx_n_StatgrabException, "_statgrab"); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":288 */ __pyx_4 = PyCFunction_New(&__pyx_mdef_9_statgrab_17StatgrabException___init__, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; goto __pyx_L1;} __pyx_3 = PyMethod_New(__pyx_4, 0, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; if (PyObject_SetAttr(__pyx_1, __pyx_n___init__, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":290 */ __pyx_4 = PyCFunction_New(&__pyx_mdef_9_statgrab_17StatgrabException___str__, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L1;} __pyx_3 = PyMethod_New(__pyx_4, 0, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; if (PyObject_SetAttr(__pyx_1, __pyx_n___str__, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; if (PyObject_SetAttr(__pyx_m, __pyx_n_StatgrabException, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; /* "/u1/i-scream/staging/projects/pystatgrab/_statgrab.pyx":643 */ return; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("_statgrab"); } static char *__pyx_filenames[] = { "_statgrab.pyx", }; /* Runtime support code */ static void __pyx_init_filenames(void) { __pyx_f = __pyx_filenames; } static PyObject *__Pyx_CreateClass( PyObject *bases, PyObject *dict, PyObject *name, char *modname) { PyObject *py_modname; PyObject *result = 0; py_modname = PyString_FromString(modname); if (!py_modname) goto bad; if (PyDict_SetItemString(dict, "__module__", py_modname) < 0) goto bad; result = PyClass_New(bases, dict, name); bad: Py_XDECREF(py_modname); return result; } static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) { PyObject *result; result = PyObject_GetAttr(dict, name); if (!result) PyErr_SetObject(PyExc_NameError, name); return result; } static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) { Py_XINCREF(type); Py_XINCREF(value); Py_XINCREF(tb); /* First, check the traceback argument, replacing None with NULL. */ if (tb == Py_None) { Py_DECREF(tb); tb = 0; } else if (tb != NULL && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } /* Next, replace a missing value with None */ if (value == NULL) { value = Py_None; Py_INCREF(value); } /* Next, repeatedly, replace a tuple exception with its first item */ while (PyTuple_Check(type) && PyTuple_Size(type) > 0) { PyObject *tmp = type; type = PyTuple_GET_ITEM(type, 0); Py_INCREF(type); Py_DECREF(tmp); } if (PyString_Check(type)) { if (PyErr_Warn(PyExc_DeprecationWarning, "raising a string exception is deprecated")) goto raise_error; } else if (PyType_Check(type) || PyClass_Check(type)) ; /*PyErr_NormalizeException(&type, &value, &tb);*/ else { /* Raising an instance. The value should be a dummy. */ if (value != Py_None) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } /* Normalize to raise , */ Py_DECREF(value); value = type; if (PyInstance_Check(type)) type = (PyObject*) ((PyInstanceObject*)type)->in_class; else type = (PyObject*) type->ob_type; Py_INCREF(type); } PyErr_Restore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } static int __Pyx_InternStrings(__Pyx_InternTabEntry *t) { while (t->p) { *t->p = PyString_InternFromString(t->s); if (!*t->p) return -1; ++t; } return 0; } static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); if (!*t->p) return -1; ++t; } return 0; } #include "compile.h" #include "frameobject.h" #include "traceback.h" static void __Pyx_AddTraceback(char *funcname) { PyObject *py_srcfile = 0; PyObject *py_funcname = 0; PyObject *py_globals = 0; PyObject *empty_tuple = 0; PyObject *empty_string = 0; PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; py_srcfile = PyString_FromString(__pyx_filename); if (!py_srcfile) goto bad; py_funcname = PyString_FromString(funcname); if (!py_funcname) goto bad; py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; empty_tuple = PyTuple_New(0); if (!empty_tuple) goto bad; empty_string = PyString_FromString(""); if (!empty_string) goto bad; py_code = PyCode_New( 0, /*int argcount,*/ 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ empty_string, /*PyObject *code,*/ empty_tuple, /*PyObject *consts,*/ empty_tuple, /*PyObject *names,*/ empty_tuple, /*PyObject *varnames,*/ empty_tuple, /*PyObject *freevars,*/ empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ __pyx_lineno, /*int firstlineno,*/ empty_string /*PyObject *lnotab*/ ); if (!py_code) goto bad; py_frame = PyFrame_New( PyThreadState_Get(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ py_globals, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = __pyx_lineno; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); Py_XDECREF(empty_tuple); Py_XDECREF(empty_string); Py_XDECREF(py_code); Py_XDECREF(py_frame); }