示例#1
0
文件: condor.py 项目: bbockelm/gip
def main():
    """
    Main wrapper for the Condor batch system GIP information.
    """
    try:
        cp = config()
        condor_path = cp_get(cp, "condor", "condor_path", None)
	condor_location = cp_get(cp, "condor", "condor_location", None)
	condor_config = cp_get(cp, "condor", "condor_config", None)

        if condor_path != None:
		addToPath(condor_path)

	if condor_location != None:
		addToPath('%s/bin' % condor_location)
		if not condor_config:
			condor_config = '%s/etc/condor_config' % condor_location

	if condor_config:
		os.environ['CONDOR_CONFIG'] = condor_config

        #vo_map = VoMapper(cp)
        getLrmsInfo(cp) 
        print_CE(cp)
        print_VOViewLocal(cp)
    except Exception, e:
        log.exception(e)
        raise
示例#2
0
def main():
    """
    Main wrapper for the Condor batch system GIP information.
    """
    try:
        cp = config()
        doPath(cp)

        #vo_map = VoMapper(cp)
        getLrmsInfo(cp)
        print_CE(cp)
        print_VOViewLocal(cp)
    except Exception, e:
        log.exception(e)
        raise
示例#3
0
文件: condor.py 项目: holzman/gip
def main():
    """
    Main wrapper for the Condor batch system GIP information.
    """
    try:
        cp = config()
	doPath(cp)

        #vo_map = VoMapper(cp)
        getLrmsInfo(cp) 
        print_CE(cp)
        print_VOViewLocal(cp)
    except Exception, e:
        log.exception(e)
        raise
示例#4
0
def print_CE(cp):
    """
    Print out the CE(s) for Condor

    Config options used:
       * ce.name.  The name of the CE.  Defaults to "".
       * condor.status.  The status of the condor LRMS.  Defaults to
          "Production".
       * ce.globus_version.  The used Globus version.  Defaults to 4.0.6
       * ce.hosting_cluster.  The attached cluster name.  Defaults to ce.name
       * ce.host_name.  The CE's host name.  Default to ce.name
       * condor.preemption.  Whether or not condor allows preemption.  Defaults
          to False
       * condor.max_wall.  The maximum allowed wall time for Condor.  Defaults
          to 1440 (in minutes)
       * osg_dirs.app.  The $OSG_APP directory.  Defaults to "/Unknown".
       * osg_dirs.data.  The $OSG_DATA directory.  Defaults to "/Unknown".
       * se.name.  The human-readable name of the closest SE
       * bdii.endpoint.  The endpoint of the BDII this will show up in.

    @param cp: The GIP configuration
    @type cp: ConfigParser.ConfigParser
    """
    ce_template = getTemplate("GlueCE", "GlueCEUniqueID")
    ce_name = cp_get(cp, "ce", "name", "UNKNOWN_CE")

    status = cp_get(cp, "condor", "status", "Production")

    # Get condor version
    try:
        condorVersion = getLrmsInfo(cp)
    except:
        condorVersion = "Unknown"

    # Get the node information for condor
    try:
        total_nodes, claimed, unclaimed = parseNodes(cp)
    except Exception, e:
        log.exception(e)
        total_nodes, claimed, unclaimed = 0, 0, 0
示例#5
0
文件: condor.py 项目: holzman/gip
def print_CE(cp):
    """
    Print out the CE(s) for Condor

    Config options used:
       * ce.name.  The name of the CE.  Defaults to "".
       * condor.status.  The status of the condor LRMS.  Defaults to
          "Production".
       * ce.globus_version.  The used Globus version.  Defaults to 4.0.6
       * ce.hosting_cluster.  The attached cluster name.  Defaults to ce.name
       * ce.host_name.  The CE's host name.  Default to ce.name
       * condor.preemption.  Whether or not condor allows preemption.  Defaults
          to False
       * condor.max_wall.  The maximum allowed wall time for Condor.  Defaults
          to 1440 (in minutes)
       * osg_dirs.app.  The $OSG_APP directory.  Defaults to "/Unknown".
       * osg_dirs.data.  The $OSG_DATA directory.  Defaults to "/Unknown".
       * se.name.  The human-readable name of the closest SE
       * bdii.endpoint.  The endpoint of the BDII this will show up in.

    @param cp: The GIP configuration
    @type cp: ConfigParser.ConfigParser
    """
    ce_template = getTemplate("GlueCE", "GlueCEUniqueID")
    ce_name = cp_get(cp, "ce", "name", "UNKNOWN_CE")

    status = cp_get(cp, "condor", "status", "Production")
    
    # Get condor version
    try:
        condorVersion = getLrmsInfo(cp)
    except:
        condorVersion = "Unknown"

    # Get the node information for condor
    try:
        total_nodes, claimed, unclaimed = parseNodes(cp)
    except Exception, e:
        log.exception(e)
        total_nodes, claimed, unclaimed = 0, 0, 0