mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fix CP stats generation for concurrent users. Fixes #3225
This commit is contained in:
parent
9e768dafa4
commit
428ea19f8a
@ -800,7 +800,7 @@ function enable_rrd_graphing() {
|
||||
/* the Captive Portal stats gathering function. */
|
||||
$rrdupdatesh .= "\n";
|
||||
$rrdupdatesh .= "# polling Captive Portal for number of concurrent users\n";
|
||||
$rrdupdatesh .= "CP=`$php -q $captiveportal_gather '$cpkey' $concurrent`\n";
|
||||
$rrdupdatesh .= "CP=`${php} -q ${captiveportal_gather} '${cpkey}' 'concurrent'`\n";
|
||||
$rrdupdatesh .= "$rrdtool update $concurrent_filename \${CP}\n";
|
||||
|
||||
$loggedin_filename = $rrddbpath . $ifname . '-' . $cpkey . $captiveportalloggedin;
|
||||
@ -836,7 +836,7 @@ function enable_rrd_graphing() {
|
||||
/* the Captive Portal stats gathering function. */
|
||||
$rrdupdatesh .= "\n";
|
||||
$rrdupdatesh .= "# polling Captive Portal for number of logged in users\n";
|
||||
$rrdupdatesh .= "CP=`$php -q $captiveportal_gather $cpkey loggedin`\n";
|
||||
$rrdupdatesh .= "CP=`${php} -q ${captiveportal_gather} '${cpkey}' 'loggedin'`\n";
|
||||
$rrdupdatesh .= "$rrdtool update $loggedin_filename \${CP}\n";
|
||||
|
||||
}
|
||||
|
||||
@ -55,6 +55,7 @@ if(empty($type))
|
||||
|
||||
/* echo the rrd required syntax */
|
||||
echo "N:";
|
||||
$result = "NaN";
|
||||
|
||||
if ($type == "loggedin") {
|
||||
|
||||
@ -101,7 +102,7 @@ if ($type == "loggedin") {
|
||||
else {
|
||||
$result = $current_user_count;
|
||||
}
|
||||
} else
|
||||
} elseif ($type == "concurrent")
|
||||
$result = $no_users;
|
||||
|
||||
echo "$result";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user