File: sql.php

package info (click to toggle)
cacti 1.2.30%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 67,176 kB
  • sloc: php: 123,193; javascript: 29,825; sql: 2,595; xml: 1,823; sh: 1,228; perl: 194; makefile: 65; python: 51; ruby: 9
file content (14 lines) | stat: -rw-r--r-- 357 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php

error_reporting(0);

include(dirname(__FILE__) . '/../include/cli_check.php');

if ($database_password == '') {
	$sql = `mysqladmin -h $database_hostname -u $database_username status | awk '{print $6 }'`;
} else {
	$sql = `mysqladmin -h $database_hostname -u $database_username -p$database_password status | awk '{print $6 }'`;
}

print trim($sql);