def kill_remote_process_with_pid_file(pid_file):
    '''
       | Description: | 
       | Arguments:   | 
       | Returns:     | 
       | Exceptions:  |
    '''
    proc_pid, error = cream_regression.get_remote_command_result("cat %s" % pid_file)
    command = "/bin/kill %s" % proc_pid
    output, error = cream_regression.get_remote_command_result(command)
Exemplo n.º 2
0
def kill_remote_process_with_pid_file(pid_file):
    '''
       | Description: | 
       | Arguments:   | 
       | Returns:     | 
       | Exceptions:  |
    '''
    proc_pid, error = cream_regression.get_remote_command_result("cat %s" %
                                                                 pid_file)
    command = "/bin/kill %s" % proc_pid
    output, error = cream_regression.get_remote_command_result(command)
def get_remote_proc_RSS(process_name):
    '''
       | Description: | 
       | Arguments:   | 
       | Returns:     | 
       | Exceptions:  |
    '''
    process_PID = get_remote_process_pid(process_name)
    process_rss = cream_regression.get_remote_command_result("/bin/ps -o rss " + process_PID)
    process_rss = "".join(process_rss)
    first, sep, last = process_rss.partition("RSS")
    process_rss = last.strip(" \n")
    print "process_rss = #" + process_rss + "#"

    return  process_rss
Exemplo n.º 4
0
def get_remote_proc_RSS(process_name):
    '''
       | Description: | 
       | Arguments:   | 
       | Returns:     | 
       | Exceptions:  |
    '''
    process_PID = get_remote_process_pid(process_name)
    process_rss = cream_regression.get_remote_command_result(
        "/bin/ps -o rss " + process_PID)
    process_rss = "".join(process_rss)
    first, sep, last = process_rss.partition("RSS")
    process_rss = last.strip(" \n")
    print "process_rss = #" + process_rss + "#"

    return process_rss
Exemplo n.º 5
0
import cream_regression, blah_regression
import re

blparser_with_updater_and_notifier = cream_regression.get_yaim_param(
    "BLPARSER_WITH_UPDATER_NOTIFIER")

print "blparser_with_updater_and_notifier = " + blparser_with_updater_and_notifier

if not blparser_with_updater_and_notifier:
    print "Changing configuration parameter ... "
    cream_regression.change_conf_param_in_file(
        "/root/sarab_devel/siteinfo/services/glite-creamce",
        "BLPARSER_WITH_UPDATER_NOTIFIER", "true")
    cream_regression.configure_ce_by_yaim(
        "/root/sarab_devel/siteinfo/site-info.def")

output, error = cream_regression.get_remote_command_result(
    'service gLite restart')

print "=============================================="
print "OUTPUT:"
print output
print "=============================================="
print "ERROR:"
print error
print "=============================================="

result = blah_regression.check_error_for_bug_84261(error)

print result
#service gLite restart
#It shouldn't report the error message:
#Starting BNotifier: /opt/glite/bin/BNotifier: Error creating and binding socket: Address already in use

import cream_regression, blah_regression
import re

blparser_with_updater_and_notifier = cream_regression.get_yaim_param("BLPARSER_WITH_UPDATER_NOTIFIER")

print "blparser_with_updater_and_notifier = " + blparser_with_updater_and_notifier

if not blparser_with_updater_and_notifier:
    print "Changing configuration parameter ... "
    cream_regression.change_conf_param_in_file("/root/sarab_devel/siteinfo/services/glite-creamce", "BLPARSER_WITH_UPDATER_NOTIFIER", "true")
    cream_regression.configure_ce_by_yaim("/root/sarab_devel/siteinfo/site-info.def")

output, error = cream_regression.get_remote_command_result('service gLite restart')

print "=============================================="
print "OUTPUT:"
print output
print "=============================================="
print "ERROR:"
print error
print "=============================================="

result = blah_regression.check_error_for_bug_84261(error)

print result