Author: arkurth Date: Fri Mar 5 16:57:57 2010 New Revision: 919493 URL: http://svn.apache.org/viewvc?rev=919493&view=rev Log: VCL-127 Updated utils.pm::rename_vcld_process() to include the computer, image, and user name in the process name. Removed Perl class name because it's useless, the state name is already included. Removed code that sets the $ENV{class_name} variable from State.pm and blockrequest.pm because it was only being used by rename_vcld_process().
Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm incubator/vcl/trunk/managementnode/lib/VCL/blockrequest.pm incubator/vcl/trunk/managementnode/lib/VCL/utils.pm Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm?rev=919493&r1=919492&r2=919493&view=diff ============================================================================== --- incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm (original) +++ incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm Fri Mar 5 16:57:57 2010 @@ -102,9 +102,6 @@ my $os_perl_package = $self->data->get_image_os_module_perl_package(); #my $predictive_perl_package = $self->data->get_management_node_predictive_module_perl_package(); - # Store the name of this class in an environment variable - $ENV{class_name} = ref($self); - # Rename this process to include some request info rename_vcld_process($self->data); Modified: incubator/vcl/trunk/managementnode/lib/VCL/blockrequest.pm URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/blockrequest.pm?rev=919493&r1=919492&r2=919493&view=diff ============================================================================== --- incubator/vcl/trunk/managementnode/lib/VCL/blockrequest.pm (original) +++ incubator/vcl/trunk/managementnode/lib/VCL/blockrequest.pm Fri Mar 5 16:57:57 2010 @@ -88,9 +88,6 @@ notify($ERRORS{'WARNING'}, 0, "unable to obtain a database handle for this state process"); } - # Store the name of this class in an environment variable - $ENV{class_name} = ref($self); - # Rename this process to include some request info rename_vcld_process($self->data); Modified: incubator/vcl/trunk/managementnode/lib/VCL/utils.pm URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/utils.pm?rev=919493&r1=919492&r2=919493&view=diff ============================================================================== --- incubator/vcl/trunk/managementnode/lib/VCL/utils.pm (original) +++ incubator/vcl/trunk/managementnode/lib/VCL/utils.pm Fri Mar 5 16:57:57 2010 @@ -7523,30 +7523,28 @@ # Begin assembling a new process name my $new_process_name = "$PROCESSNAME"; - # Append the class name or file name to the process name - if (defined($ENV{class_name})) { - $new_process_name .= (" " . $ENV{class_name}); - } - elsif ($filename) { - $new_process_name .= " $filename"; - } - # Check if DataStructure, assemble process name with additional information if (defined $data_structure) { my $state_name = $data_structure->get_state_name(); if ($state_name ne 'blockrequest') { my $request_id = $data_structure->get_request_id(); - my $request_state_name = $data_structure->get_request_state_name(); my $reservation_id = $data_structure->get_reservation_id(); + my $request_state_name = $data_structure->get_request_state_name(); + my $computer_short_name = $data_structure->get_computer_short_name(); + my $image_name = $data_structure->get_image_name(); + my $user_login_id = $data_structure->get_user_login_id(); my $request_forimaging = $data_structure->get_request_forimaging(); my $reservation_count = $data_structure->get_reservation_count(); my $reservation_is_parent = $data_structure->is_parent_reservation(); - + # Append the request and reservation IDs if they are set $new_process_name .= " $request_id:$reservation_id"; - $new_process_name .= " $request_state_name" if $request_state_name; - $new_process_name .= " imaging" if $request_forimaging; + $new_process_name .= " $request_state_name" if ($request_state_name); + $new_process_name .= " $computer_short_name" if ($computer_short_name); + $new_process_name .= " $image_name" if ($image_name); + $new_process_name .= " $user_login_id" if ($user_login_id); + $new_process_name .= " (imaging)" if $request_forimaging; # Append cluster if there are multiple reservations for this request notify($ERRORS{'DEBUG'}, 0, "reservation count: $reservation_count"); @@ -7555,12 +7553,12 @@ if ($reservation_is_parent) { $data_structure->get_request_data->{PARENTIMAGE} = 1; $data_structure->get_request_data->{SUBIMAGE} = 0; - $new_process_name .= " cluster=parent"; + $new_process_name .= " (cluster=parent)"; } else { $data_structure->get_request_data->{PARENTIMAGE} = 0; $data_structure->get_request_data->{SUBIMAGE} = 1; - $new_process_name .= " cluster=child"; + $new_process_name .= " (cluster=child)"; } } ## end if ($reservation_count > 1) else {