IBM-LoadLeveler

 view release on metacpan or  search on metacpan

examples/rss-llq  view on Meta::CPAN


   #
   # Free up space allocated by LoadLeveler
   #

   ll_free_objs($query);
   ll_deallocate($query);

   $title_string = "Jobs: R=$jobs_run, I=$jobs_idle, H=$jobs_held, NQ=$jobs_not_queued";

   $nodes_busy = 0;
   $nodes_idle = 0;
   $nodes_running = 0;
   $nodes_down = 0;

   #
   # Query Job Status information
   #

   $query = ll_query(MACHINES);
   $return=ll_set_request($query,QUERY_ALL,undef,ALL_DATA);

examples/rss-llq  view on Meta::CPAN


   $machine=ll_get_objs($query,LL_CM,NULL,$number,$err);
   while($machine)
   {
      #
      # Get the startd status for each machine
      #

      $sts=ll_get_data($machine,LL_MachineStartdState);

      $nodes_busy++    if ($sts =~ /^Busy/);
      $nodes_idle++    if ($sts =~ /^Idle/);
      $nodes_running++ if ($sts =~ /^Running/);
      $nodes_down++    if ($sts =~ /^Down/);

      $machine=ll_next_obj($query);
   }

   #
   # Free up space allocated by LoadLeveler
   #

   ll_free_objs($query);
   ll_deallocate($query);


   $title_string .= ". Nodes: B=$nodes_busy, R=$nodes_running, I=$nodes_idle, D=$nodes_down";

   open (RDF,">/web/htdocs/loadl.rdf");
   print RDF  "<?xml version=\"1.0\"?>\n";
   print RDF  "   <!DOCTYPE rss PUBLIC \"-//Netscape Communications//DTD RSS 0.91//EN\"\n";
   print RDF  "             \"http://my.netscape.com/publish/formats/rss-0.91.dtd\" >\n";
   print RDF  "   <rss version=\"0.91\">\n";
   print RDF  "   <channel>\n";
   print RDF  "   <title>Cluster 1A</title>\n";
   print RDF  "   <description>Cluster 1A Web Server </description>\n\n";
   print RDF  "   <item>\n";

examples/xmlrss-llq  view on Meta::CPAN


   #
   # Free up space allocated by LoadLeveler
   #

   ll_free_objs($job);
   ll_deallocate($query);

   $title_string = "Jobs: R=$jobs_run, I=$jobs_idle, H=$jobs_held, NQ=$jobs_not_queued E=$jobs_preempt";

   $nodes_busy = 0;
   $nodes_idle = 0;
   $nodes_running = 0;
   $nodes_down = 0;

   #
   # Query Job Status information
   #

   $query = ll_query(MACHINES);
   $return=ll_set_request($query,QUERY_ALL,undef,ALL_DATA);

examples/xmlrss-llq  view on Meta::CPAN


   $machine=ll_get_objs($query,LL_CM,NULL,$number,$err);
   while($machine)
   {
      #
      # Get the startd status for each machine
      #

      $sts=ll_get_data($machine,LL_MachineStartdState);

      $nodes_busy++    if ($sts =~ /^Busy/);
      $nodes_idle++    if ($sts =~ /^Idle/);
      $nodes_running++ if ($sts =~ /^Running/);
      $nodes_down++    if ($sts =~ /^Down/);

      $machine=ll_next_obj($query);
   }

   #
   # Free up space allocated by LoadLeveler
   #

   ll_free_objs($machine);
   ll_deallocate($query);

   # Generate the RSS feed file

   $rss_file = "/web/htdocs/LoadL.rdf";
   $title_string .= ". Nodes: B=$nodes_busy, R=$nodes_running, I=$nodes_idle, D=$nodes_down";

   $rss = XML::RSS->new(version=>'0.99');
   $rss->channel(
                title        => "LoadLeveler Status",
                link         => "http://www.somecluster/",
                description  => "LoadLeveler Status.");

   $rss->add_item( title => $title_string, link => $link);
   $rss->save($rss_file);



( run in 0.433 second using v1.01-cache-2.11-cpan-87723dcf8b7 )