Skip to content

Commit

Permalink
Update ss_grid_jobs.php
Browse files Browse the repository at this point in the history
patch that disables the query cache for the Cacti Data Collectors - IBM#10

Signed-off-by: Stephanie Buser <[email protected]>
  • Loading branch information
sbuser-git authored Dec 1, 2022
1 parent 0b446e3 commit b419b4a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cacti/scripts/ss_grid_jobs.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
// $Id$
// $Id: e49c0a9204a932b821630062c85b0b5c49d24134 $
/*
+-------------------------------------------------------------------------+
| Copyright IBM Corp. 2006, 2022 |
Expand Down Expand Up @@ -30,13 +30,13 @@
function ss_grid_jobs($hostname = '', $clusterid = 0, $summary='no') {
if ($hostname == '' || $hostname == 'localhost' || $summary == 'yes') {
if ($clusterid == 0) {
$job_stats = db_fetch_row("SELECT SUM(maxJobs) as t_maxJobs, SUM(numJobs) as t_numJobs,
$job_stats = db_fetch_row("SELECT " . SQL_NO_CACHE . " SUM(maxJobs) as t_maxJobs, SUM(numJobs) as t_numJobs,
SUM(numRun) as t_numRun, SUM(numSSUSP) as t_numSSUSP, SUM(numUSUSP) as t_numUSUSP,
SUM(numRESERVE) as t_numRESERVE
FROM grid_hosts
WHERE status != 'Closed-Admin'");
} else {
$job_stats = db_fetch_row_prepared("SELECT SUM(maxJobs) as t_maxJobs, SUM(numJobs) as t_numJobs,
$job_stats = db_fetch_row_prepared("SELECT " . SQL_NO_CACHE . " SUM(maxJobs) as t_maxJobs, SUM(numJobs) as t_numJobs,
SUM(numRun) as t_numRun, SUM(numSSUSP) as t_numSSUSP, SUM(numUSUSP) as t_numUSUSP,
SUM(numRESERVE) as t_numRESERVE
FROM grid_hosts
Expand All @@ -46,20 +46,20 @@ function ss_grid_jobs($hostname = '', $clusterid = 0, $summary='no') {
}
} else {
if ($clusterid == 0) {
$job_stats = db_fetch_row_prepared("SELECT SUM(maxJobs) as t_maxJobs, SUM(numJobs) as t_numJobs,
$job_stats = db_fetch_row_prepared("SELECT " . SQL_NO_CACHE . " SUM(maxJobs) as t_maxJobs, SUM(numJobs) as t_numJobs,
SUM(numRun) as t_numRun, SUM(numSSUSP) as t_numSSUSP, SUM(numUSUSP) as t_numUSUSP,
SUM(numRESERVE) as t_numRESERVE
FROM grid_hosts
WHERE host = ?
AND status != 'Closed-Admin'",
array($hostname));
} else {
$job_stats = db_fetch_row_prepared('SELECT maxJobs as t_maxJobs, numJobs as t_numJobs,
$job_stats = db_fetch_row_prepared("SELECT " . SQL_NO_CACHE . " maxJobs as t_maxJobs, numJobs as t_numJobs,
numRun as t_numRun, numSSUSP as t_numSSUSP, numUSUSP as t_numUSUSP,
numRESERVE as t_numRESERVE
FROM grid_hosts
WHERE clusterid = ?
AND host = ?',
AND host = ?",
array($clusterid, $hostname));
}
}
Expand Down

0 comments on commit b419b4a

Please sign in to comment.