On Tuesday 14 of September 2004 02:09, Grzegorz Åebrowski wrote:
> Witam,
> w zalaczniku przesylam maly patch umozliwiajacy uzywanie phpSysInfo na
> aktualnym AC. Jesli jest ok to prosze o wrzucenie do cvs.
>
>
> jakby ktos niewierzyl ze dziala to niech zajrzy tam
> http://info.x-tech.one.pl/
teraz wersja po liftingu i bez moich komunikatow :)
Jesli jest ok to prosze o wrzucenie do cvs.
--
Grzegorz Åebrowski
xavier [] x-tech.one.pl
diff -ur phpSysInfo2/includes/XPath.class.php phpSysInfo/includes/XPath.class.php
--- phpSysInfo2/includes/XPath.class.php 2004-01-09 21:20:18.000000000 +0100
+++ phpSysInfo/includes/XPath.class.php 2004-09-14 17:48:33.190126512 +0200
@@ -3762,7 +3762,10 @@
$this->properties['modMatch'] = XPATH_QUERYHIT_ALL;
if ($fileName) {
if (!$this->importFromFile($fileName)) {
- $this = FALSE;
+ // $this = FALSE;
+ /*
+ this feature is not used in phpSysInfo runnig on linux
+ */
}
}
}
@@ -4746,4 +4749,4 @@
echo $xPath->exportAsHtml();
}
-?>
\ No newline at end of file
+?>
diff -ur phpSysInfo2/includes/os/class.Linux.inc.php phpSysInfo/includes/os/class.Linux.inc.php
--- phpSysInfo2/includes/os/class.Linux.inc.php 2004-01-09 21:20:18.000000000 +0100
+++ phpSysInfo/includes/os/class.Linux.inc.php 2004-09-14 17:45:24.625792648 +0200
@@ -319,7 +319,7 @@
}
function memory () {
- if ($fd = fopen('/proc/meminfo', 'r')) {
+ if ($fd = popen('/usr/bin/free -bo', 'r')) {
while ($buf = fgets($fd, 4096)) {
if (preg_match('/Mem:\s+(.*)$/', $buf, $ar_buf)) {
$ar_buf = preg_split('/\s+/', $ar_buf[1], 6);
Only in phpSysInfo/includes/xml: memory.php~
diff -ur phpSysInfo2/includes/xml/vitals.php phpSysInfo/includes/xml/vitals.php
--- phpSysInfo2/includes/xml/vitals.php 2004-01-09 21:20:18.000000000 +0100
+++ phpSysInfo/includes/xml/vitals.php 2004-09-14 02:03:49.000000000 +0200
@@ -26,12 +26,10 @@
global $sysinfo;
$ar_buf = $sysinfo->loadavg();
+ $load_avg="";
for ($i=0;$i<3;$i++) {
- if ($ar_buf[$i] > 2) {
- $load_avg .= ' ';
- } else {
$load_avg .= $ar_buf[$i] . ' ';
- }
+
}
$_text = " <Vitals>\n"
diff -ur phpSysInfo2/index.php phpSysInfo/index.php
--- phpSysInfo2/index.php 2004-01-09 21:20:18.000000000 +0100
+++ phpSysInfo/index.php 2004-09-14 17:40:45.901165232 +0200
@@ -22,6 +22,7 @@
// our version number
$VERSION="2.1";
+error_reporting(5);
// reassign HTTP variables (incase register_globals is off)
if (!empty($HTTP_GET_VARS)) while(list($name, $value) = each($HTTP_GET_VARS)) $$name = $value;
_______________________________________________
pld-devel-pl mailing list
[EMAIL PROTECTED]
http://lists.pld-linux.org/mailman/listinfo/pld-devel-pl