[issue13405] Add DTrace probes

2011-11-22 Thread Chris Miles

Changes by Chris Miles miles.ch...@gmail.com:


--
nosy:  -chrismiles

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13405
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2320] Race condition in subprocess using stdin

2009-09-07 Thread Chris Miles

Changes by Chris Miles miles.ch...@gmail.com:


--
nosy: +chrismiles

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2320
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4111] Add DTrace probes

2009-02-22 Thread Chris Miles

Changes by Chris Miles miles.ch...@gmail.com:


--
nosy: +chrismiles

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4111
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



EDDIE-Tool 0.36 Released

2007-12-07 Thread Chris Miles
EDDIE-Tool 0.36 has just been released.
http://eddie-tool.net/

What is it ?
The EDDIE-Tool is an intelligent cross-platform monitoring
agent written entirely in Python.  It provides system, network
and security monitoring features, with an extensive
configuration facility for defining customized monitoring
and data collection rules.

What is new ?
This version has been a long time coming, but has been well
tested over that time.  This version features many
enhancements and bugfixes, some of them listed below.
A special thanks to Zac Stevens and Mark Taylor for their
contributions.

* Added support for Spread messaging as an alternative to Elvin.
* Implemented a DiskStatistics data collector for Linux.
* More command-line options and support for running as daemon.
* Added a log action.  Use it to append to a log file, log
   via syslog, or print on the eddie tty.
* Variables can be set in directives, which can then be used
   in rule evaluation.  For example, if the directive has
   maxcpu=30, then the rule can address this as
   rule='pcpu  _maxcpu'.
* HTTP checks support cookie persistence.
* Added DBI directive, for database query checking.
* Added Solaris SMF method/manifest files to contrib.
* Many more enhancements and bugfixes - see
   http://dev.eddie-tool.net/trac/browser/eddie/trunk/doc/CHANGES.txt

Why is it interesting to Python users ?
Besides system and network administrators, Python users may
find EDDIE-Tool interesting as it is an example of a threaded,
multi-platform software package, providing easy access to
system statistics and using Python's power to offer a dynamic
and programmable rules engine.

Regards,
Chris Miles

-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations.html


PyObject_Print in gdb

2007-05-15 Thread Chris Miles
I've been using gdb to debug some Python extension modules lately,
which has been very handy, but cannot get PyObject_Print() to work
from within gdb, as recommended by 
http://wingware.com/doc/howtos/debugging-extension-modules-on-linux

It recommends using p PyObject_Print (obj, stderr, 0) but stderr
(and stdout) symbols are never available for me.

(gdb) p args
$2 = (PyObject *) 0x405030
(gdb) p PyObject_Print (args, stderr, 0)
No symbol stderr in current context.
(gdb) p PyObject_Print (args, stdout, 0)
No symbol stdout in current context.

Any tips on how to reference the stdout/stderr file pointers within
gdb?

Cheers,
Chris

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PyObject_Print in gdb

2007-05-15 Thread Chris Miles
I'm still not sure about PyObject_Print, but I found a better
solution, using the Misc/gdbinit file from the Python source tree,
which defines a pyo macro.

Example:
(gdb) pyo some_object
object : []
type : list
refcount: 1
address : 0x4b5940
$3 = void

Cheers,
Chris


On May 15, 2:15 pm, Chris Miles [EMAIL PROTECTED] wrote:
 I've been using gdb to debug some Python extension modules lately,
 which has been very handy, but cannot get PyObject_Print() to work
 from within gdb, as recommended 
 byhttp://wingware.com/doc/howtos/debugging-extension-modules-on-linux

 It recommends using p PyObject_Print (obj, stderr, 0) but stderr
 (and stdout) symbols are never available for me.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: freeze and problem with static libraries

2007-04-25 Thread Chris Miles
What command are you using to freeze your source?

On Apr 24, 4:23 pm, Flyzone [EMAIL PROTECTED] wrote:
 Hi, i need to compile a python source (2.3.6) to make it standalone
 on Solaris 9.
 I get this warning on freezing my source:

 Warning: unknown modules remain: _locale _random _socket array
 binascii cStringIO datetime fcntl math pwd select strop termios time

 in the source i have: import os, stat, re, datetime, time, glob
 and running the frozen application I get: ImportError: No module
 named datetime

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python speed on Solaris 10

2006-11-15 Thread Chris Miles
Since my post I have compiled Python 2.4.3 with Sun Studio 11 with 
-fast option (on Solaris 10) which has produced the fastest version of 
Python I've been able to test on this hardware, including the CentOS 
Linux version (which I'm pleased about).

I haven't looked into more optimal gcc build options yet, so that may 
produce a faster build, but I am probably satisfied with what Sun Studio 
has given me for now.

Cheers,
Chris

[EMAIL PROTECTED] wrote:

 I noticed that speed difference, too. After running ./configure, I
 edited the resulting Makefile to pass -march=athlon-mp to the C
 compiler. ./configure seems to ignore CFLAGS, for example, so I just
 edited Makefile to suit my environment. You should set the values
 appropriate for you system, of course.
 
 I've also compiled Python using the Sun Studio compiler. Some tests
 were faster, some tests were slower.

-- 
http://chrismiles.info/

-- 
http://mail.python.org/mailman/listinfo/python-list


Python speed on Solaris 10

2006-11-14 Thread Chris Miles
I have found that the sunfreeware.com build of Python 2.4.3 for Solaris 
10 is faster than one I can build myself, on the same system. 
sunfreeware.com doesn't bother showing the options they used to 
configure and build the software, so does anyone know what the optimal 
build options are for Solaris 10 (x86)?

Here are some pybench/pystone results, and I include the same comparison 
of Python2.4.3 running on CentOS 4.3 on the same hardware (which is what 
prompted me to find a faster Python build in the first place).

Python 2.4.3:
   System   pybench  Pystone (pystones/s)

   Sol10 my build   3836.00 ms   37313.4
   Sol10 sunfreeware3235.00 ms   43859.6
   CentOS   3569.00 ms   44247.8


My build:
Python 2.4.3 (#1, Oct 15 2006, 16:00:33)
[GCC 3.4.3 (csl-sol210-3_4-branch+sol_rpath)] on sunos5

sunfreeware.com build:
Python 2.4.3 (#1, Jul 31 2006, 05:14:51)
[GCC 3.4.6] on sunos5

My build on CentOS 4.3:
Python 2.4.3 (#1, Jul 19 2006, 17:52:43)
[GCC 3.4.5 20051201 (Red Hat 3.4.5-2)] on linux2


is the difference purely gcc minor version?


-- 
http://chrismiles.info/

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Cannot force configure/setup.py to pick up location of readline (SFWrline) on Solaris 10

2006-10-15 Thread Chris Miles
Thanks to those who offered suggestions for this.

It appears that building Python 2.4.3 on Solaris 10 with readline 
(SFWrline package) support is a little long-winded but possible, using 
the following steps:

$ ./configure --prefix=/opt/python-2.4.3 --enable-shared
$ vi Modules/Setup.local
--- add one line: ---
readline readline.c -I/opt/sfw/include -L/opt/sfw/lib -lreadline -ltermcap
-
$ make
### will fail with ld error: ###
Undefined   first referenced
symbol in file
initreadline./libpython2.4.so
ld: fatal: Symbol referencing errors. No output written to python
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `python'

### however, just running make again ends up building fine ... ###
$ make
$ make install  # might need root access (sudo/su)

I hope this process can be improved, and if I have time I'll look at why 
make fails half way but works fine when kicked off a second time.

I'd like to get /opt/sfw/ added to the standard lib/include path for 
Solaris (10 at least) as this is where Sun's open-source packages get 
installed.  Is this just a matter of raising a ticket?

Cheers,
Chris


Chris Miles wrote:
 On a standard Solaris 10 installation with Sun-supplied open-source 
 packages installed (like SFWrline for readline libs) I cannot seem to 
 force Python configure/setup.py to build with readline support.

-- 
http://chrismiles.info/

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Cannot force configure/setup.py to pick up location of readline (SFWrline) on Solaris 10

2006-10-15 Thread Chris Miles
Martin v. Löwis wrote:
 You need to use GNU make for that to work. The build regenerates the
 makefile, but Sun make doesn't recognize the change. There was a message
 telling you so.

Thanks Martin, you are totally correct.  Using gmake avoids the problem.

 Also, your original complaint wasn't that readline isn't considered,
 but that setup.py didn't find it even though configure did. A patch
 fixing that has a higher chance of being accepted than a patch adding
 /opt/sfw to the standard search path (which is really a decision
 Sun should take, not the Python maintainers - in absence of a Sun
 change, it's then the local administrator who decides).

Fair point.  If time permits I'll look into constructing such a patch.

Cheers,
Chris

-- 
http://chrismiles.info/

-- 
http://mail.python.org/mailman/listinfo/python-list


Cannot force configure/setup.py to pick up location of readline (SFWrline) on Solaris 10

2006-10-13 Thread Chris Miles
On a standard Solaris 10 installation with Sun-supplied open-source 
packages installed (like SFWrline for readline libs) I cannot seem to 
force Python configure/setup.py to build with readline support.

SFWrline installs readline in /opt/sfw/lib  /opt/sfw/include

(This is all attempted with Python-2.4.3 on Solaris 10 06/06 i386)

With this configure:
./configure --prefix=/opt/python-2.4.3 --enable-shared 
CPPFLAGS=-I/opt/sfw/include CFLAGS=-I/opt/sfw/include LDFLAGS=-L/opt/sfw/lib

The resulting output includes:
...
checking for rl_callback_handler_install in -lreadline... yes
checking for rl_pre_input_hook in -lreadline... yes
checking for rl_completion_matches in -lreadline... yes
...


and config.log contains:
...
ac_cv_lib_readline_rl_callback_handler_install=yes
ac_cv_lib_readline_rl_completion_matches=yes
ac_cv_lib_readline_rl_pre_input_hook=yes
...


However, make doesn't build a readline module and I think this is 
because setup.py is not taking the custom *FLAGS into account.  Even if 
I export them as environment variables, I get no readline module.

How do I force the build to use the custom paths?

And/or: can we teach configure/setup.py to include /opt/sfw/ when on 
Solaris, as this is the standard location for Sun's supplied open-source 
packages (ie: on the Companion disc) ?

btw: an answer to this is not to install other 3rd party readline 
packages such as from sunfreeware.com or blastwave, as that should not 
be necessary when Sun supply the packages themselves (and some 
organisations will not allow those packages).

Cheers,
Chris

-- 
http://chrismiles.info/

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: heartbeats

2005-12-12 Thread Chris Miles
Hi Yves,

You could try using EDDIE Tool's PORT directive to periodically make TCP 
connections to your clients and check the result matches what is 
expected.  The alert engine will make it easy for you to define actions 
to perform for failure conditions.

http://eddie-tool.net/

You could also do actual (icmp) pings and/or HTTP requests from it also, 
if that helps.

Cheers,
Chris

Yves Glodt wrote:
 I need to write a heartbeat solution to monitor some external clients, 
 and what is different as in the examples that I have seen so far is that 
 I want my central server to poll the clients, and not the clients 
 pinging the central server.
 
 In detail I need a daemon on my central server which e.g. which in a 
 loop pings (not really ping but you know what I mean) each 20 seconds 
 one of the clients.

-- 
http://chrismiles.info/

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to ping in Python?

2005-12-08 Thread Chris Miles
You could also try the ping module that the Eddie monitoring tool has 
been using successfully, cross-platform, for many years.

http://dev.eddie-tool.net/trac/browser/eddie/trunk/lib/common/Directives/pinger.py

Cheers,
Chris

Nico Grubert wrote:
 I could not find any ping Class or Handler in python (2.3.5) to ping a 
 machine.
 I just need to ping a machine to see if its answering. What's the best 
 way to do it?

-- 
http://chrismiles.info/

-- 
http://mail.python.org/mailman/listinfo/python-list