[GE users] Problem running load sensor in python

rayson rayrayson at gmail.com
Tue Mar 17 15:53:49 GMT 2009

1) First thing, shouldn't a load sensor loop until it receives "quit" by SGE??

Like this: http://gridengine.sunsource.net/howto/loadsensor.html

2) I'm not very good at Python, but if you are sure that the
equivalent scipt written in bash or Perl works, then you can try to
unbuffer the Python I/O stream:



On 3/17/09, sumyee <sum-yee.lai at hp.com> wrote:
> Hello,
> I am running SGE6.2, and I have a problem with running a load sensor written in python.  The values written out by the load sensor doesn't seem to get "picked up" by SGE.  The python script echoes the following when I run it manually:
> begin
> cviant39.cv.hp.com:mem_free_s:1.2G
> cviant39.cv.hp.com:mem_free_h:1.5G
> end
> Running qhost -F on cviant39 gives me:
>   hf:mem_free_h=1.915G
>   hf:mem_free_s=1.915G
> Instead of using the mem_free_s and mem_free_h values printed out by the python script, Grid uses the maximum values set on the host.  When I run the same statements in bash or perl, Grid seems to pick up the values without problem.  Has anyone seen this problem before?
> My python script (that doesn't work) is very simple:
> #!/usr/bin/env python
> import os
> hostname = str(os.environ.get('HOSTNAME'))
> print hostname + ":mem_free_s:1.2G"
> print hostname + ":mem_free_h:1.5G"
> Sum Yee Lai
> ------------------------------------------------------
> http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=38&dsMessageId=134375
> To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net].


To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net].

More information about the gridengine-users mailing list