Страница 1 из 1

HELP! Нету данных в SAMS'е Memory, Swap и Filesystem

Добавлено: 2012-01-26 14:43:06
Ridik5533
Вообщем менял

Код: Выделить всё

# ee /usr/local/share/sams/src/configtray.php

Код: Выделить всё

.......пропущено.......

  $a=explode(" ",$value);
  for($i=1;$i<4;$i++)
     {
           $mem[$i-1]=$a[$i];
     }
# Подменяем ячейки для mem
     $mem[0]=$a[1]; //total mem
     $mem[1]=$a[3]; //Used mem
     $mem[2]=$a[11];//Free mem

  $a=explode(" ",$swapvalue);
  for($i=1;$i<4;$i++)
     {
           $swap[$i-1]=$a[$i];
     }
# Подменяем ячейки для swap
     $swap[0]=$a[1]; //total swap
     $swap[1]=$a[3]; //used swap
     $swap[2]=$a[5]; //free swap

.......пропущено.......
В /usr/local/share/sams/bin/freemem и /usr/local/share/sams/bin/freeswap ничего не менял

В cat /var/log/httpd-error.log выдаёт:

Код: Выделить всё

[Thu Jan 26 13:25:45 2012] [error] PHP Notice:  Undefined index: domainuser in /usr/local/share/sams/tray.php on line 140
[Thu Jan 26 13:25:45 2012] [error] PHP Notice:  Undefined index: gauditor in /usr/local/share/sams/tray.php on line 141
[Thu Jan 26 13:25:45 2012] [error] PHP Notice:  Undefined index: domainuser in /usr/local/share/sams/main.php on line 339
[Thu Jan 26 13:25:45 2012] [error] PHP Notice:  Undefined index: gauditor in /usr/local/share/sams/main.php on line 340
usr/local/share/sams/bin/getuptime: not found
usr/local/share/sams/bin/getuptime: not found
usr/local/share/sams/bin/freemem: not found
usr/local/share/sams/bin/freemem: not found
usr/local/share/sams/bin/freeswap: not found
usr/local/share/sams/bin/freeswap: not found
[Thu Jan 26 13:25:45 2012] [error] PHP Notice:  Undefined offset: 1 in /usr/local/share/sams/src/configtray.php on line 38
[Thu Jan 26 13:25:45 2012] [error] PHP Notice:  Undefined offset: 2 in /usr/local/share/sams/src/configtray.php on line 38
[Thu Jan 26 13:25:45 2012] [error] PHP Notice:  Undefined offset: 3 in /usr/local/share/sams/src/configtray.php on line 38
[Thu Jan 26 13:25:45 2012] [error] PHP Notice:  Undefined offset: 1 in /usr/local/share/sams/src/configtray.php on line 43
[Thu Jan 26 13:25:45 2012] [error] PHP Notice:  Undefined offset: 3 in /usr/local/share/sams/src/configtray.php on line 44
[Thu Jan 26 13:25:45 2012] [error] PHP Notice:  Undefined offset: 11 in /usr/local/share/sams/src/configtray.php on line 45
[Thu Jan 26 13:25:45 2012] [error] PHP Notice:  Undefined offset: 1 in /usr/local/share/sams/src/configtray.php on line 50
[Thu Jan 26 13:25:45 2012] [error] PHP Notice:  Undefined offset: 2 in /usr/local/share/sams/src/configtray.php on line 50
[Thu Jan 26 13:25:45 2012] [error] PHP Notice:  Undefined offset: 3 in /usr/local/share/sams/src/configtray.php on line 50
[Thu Jan 26 13:25:45 2012] [error] PHP Notice:  Undefined offset: 1 in /usr/local/share/sams/src/configtray.php on line 55
[Thu Jan 26 13:25:45 2012] [error] PHP Notice:  Undefined offset: 3 in /usr/local/share/sams/src/configtray.php on line 56
[Thu Jan 26 13:25:45 2012] [error] PHP Notice:  Undefined offset: 5 in /usr/local/share/sams/src/configtray.php on line 57
usr/local/share/sams/bin/fsusage: not found
usr/local/share/sams/bin/fsusage: not found
[Thu Jan 26 13:25:45 2012] [error] PHP Notice:  Undefined offset: 1 in /usr/local/share/sams/src/configtray.php on line 98
[Thu Jan 26 13:25:45 2012] [error] PHP Notice:  Undefined offset: 2 in /usr/local/share/sams/src/configtray.php on line 98
[Thu Jan 26 13:25:45 2012] [error] PHP Notice:  Undefined offset: 3 in /usr/local/share/sams/src/configtray.php on line 98
[Thu Jan 26 13:25:45 2012] [error] PHP Notice:  Undefined offset: 4 in /usr/local/share/sams/src/configtray.php on line 98
[Thu Jan 26 13:25:45 2012] [error] PHP Notice:  Undefined offset: 5 in /usr/local/share/sams/src/configtray.php on line 98
[Thu Jan 26 13:25:45 2012] [error] PHP Warning:  strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Helsinki' for 'EET/2.0/no DST' instead in /usr/local/share/sams/src/configtray.php on line 133
[Thu Jan 26 13:25:45 2012] [error] PHP Warning:  strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Helsinki' for 'EET/2.0/no DST' instead in /usr/local/share/sams/src/configtray.php on line 134
[Thu Jan 26 13:25:45 2012] [error] PHP Warning:  strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Helsinki' for 'EET/2.0/no DST' instead in /usr/local/share/sams/src/configtray.php on line 135
[Thu Jan 26 13:25:46 2012] [error] PHP Notice:  Undefined index: domainuser in /usr/local/share/sams/tray.php on line 140
[Thu Jan 26 13:25:46 2012] [error] PHP Notice:  Undefined index: gauditor in /usr/local/share/sams/tray.php on line 141
[Thu Jan 26 13:25:47 2012] [error] PHP Notice:  Undefined index: domainuser in /usr/local/share/sams/main.php on line 339
[Thu Jan 26 13:25:47 2012] [error] PHP Notice:  Undefined index: gauditor in /usr/local/share/sams/main.php on line 340
[Thu Jan 26 13:25:49 2012] [error] PHP Notice:  Undefined index: domainuser in /usr/local/share/sams/tray.php on line 140
[Thu Jan 26 13:25:49 2012] [error] PHP Notice:  Undefined index: gauditor in /usr/local/share/sams/tray.php on line 141
[Thu Jan 26 13:25:49 2012] [error] PHP Notice:  Undefined index: domainuser in /usr/local/share/sams/main.php on line 339
[Thu Jan 26 13:25:49 2012] [error] PHP Notice:  Undefined index: gauditor in /usr/local/share/sams/main.php on line 340
usr/local/share/sams/bin/getuptime: not found
usr/local/share/sams/bin/getuptime: not found
usr/local/share/sams/bin/freemem: not found
usr/local/share/sams/bin/freemem: not found
usr/local/share/sams/bin/freeswap: not found
usr/local/share/sams/bin/freeswap: not found
[Thu Jan 26 13:25:49 2012] [error] PHP Notice:  Undefined offset: 1 in /usr/local/share/sams/src/configtray.php on line 38
[Thu Jan 26 13:25:49 2012] [error] PHP Notice:  Undefined offset: 2 in /usr/local/share/sams/src/configtray.php on line 38
[Thu Jan 26 13:25:49 2012] [error] PHP Notice:  Undefined offset: 3 in /usr/local/share/sams/src/configtray.php on line 38
[Thu Jan 26 13:25:49 2012] [error] PHP Notice:  Undefined offset: 1 in /usr/local/share/sams/src/configtray.php on line 43
[Thu Jan 26 13:25:49 2012] [error] PHP Notice:  Undefined offset: 3 in /usr/local/share/sams/src/configtray.php on line 44
[Thu Jan 26 13:25:49 2012] [error] PHP Notice:  Undefined offset: 11 in /usr/local/share/sams/src/configtray.php on line 45
[Thu Jan 26 13:25:49 2012] [error] PHP Notice:  Undefined offset: 1 in /usr/local/share/sams/src/configtray.php on line 50
[Thu Jan 26 13:25:49 2012] [error] PHP Notice:  Undefined offset: 2 in /usr/local/share/sams/src/configtray.php on line 50
[Thu Jan 26 13:25:49 2012] [error] PHP Notice:  Undefined offset: 3 in /usr/local/share/sams/src/configtray.php on line 50
[Thu Jan 26 13:25:49 2012] [error] PHP Notice:  Undefined offset: 1 in /usr/local/share/sams/src/configtray.php on line 55
[Thu Jan 26 13:25:49 2012] [error] PHP Notice:  Undefined offset: 3 in /usr/local/share/sams/src/configtray.php on line 56
[Thu Jan 26 13:25:49 2012] [error] PHP Notice:  Undefined offset: 5 in /usr/local/share/sams/src/configtray.php on line 57
usr/local/share/sams/bin/fsusage: not found
usr/local/share/sams/bin/fsusage: not found
[Thu Jan 26 13:25:49 2012] [error] PHP Notice:  Undefined offset: 1 in /usr/local/share/sams/src/configtray.php on line 98
[Thu Jan 26 13:25:49 2012] [error] PHP Notice:  Undefined offset: 2 in /usr/local/share/sams/src/configtray.php on line 98
[Thu Jan 26 13:25:49 2012] [error] PHP Notice:  Undefined offset: 3 in /usr/local/share/sams/src/configtray.php on line 98
[Thu Jan 26 13:25:49 2012] [error] PHP Notice:  Undefined offset: 4 in /usr/local/share/sams/src/configtray.php on line 98
[Thu Jan 26 13:25:49 2012] [error] PHP Notice:  Undefined offset: 5 in /usr/local/share/sams/src/configtray.php on line 98
[Thu Jan 26 13:25:49 2012] [error] PHP Warning:  strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Helsinki' for 'EET/2.0/no DST' instead in /usr/local/share/sams/src/configtray.php on line 133
[Thu Jan 26 13:25:49 2012] [error] PHP Warning:  strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Helsinki' for 'EET/2.0/no DST' instead in /usr/local/share/sams/src/configtray.php on line 134
[Thu Jan 26 13:25:49 2012] [error] PHP Warning:  strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Helsinki' for 'EET/2.0/no DST' instead in /usr/local/share/sams/src/configtray.php on line 135
[Thu Jan 26 13:25:50 2012] [error] PHP Notice:  Undefined index: domainuser in /usr/local/share/sams/main.php on line 339
[Thu Jan 26 13:25:50 2012] [error] PHP Notice:  Undefined index: gauditor in /usr/local/share/sams/main.php on line 340
[Thu Jan 26 13:25:50 2012] [error] PHP Notice:  Undefined variable: DISABLED_PARSER in /usr/local/share/sams/src/configbuttom_1_prop.php on line 498
[Thu Jan 26 13:25:50 2012] [error] PHP Notice:  Undefined variable: DISABLED_PARSER in /usr/local/share/sams/src/configbuttom_1_prop.php on line 518
[Thu Jan 26 13:26:40 2012] [error] PHP Notice:  Undefined index: domainuser in /usr/local/share/sams/tray.php on line 140
[Thu Jan 26 13:26:40 2012] [error] PHP Notice:  Undefined index: gauditor in /usr/local/share/sams/tray.php on line 141
[Thu Jan 26 13:26:40 2012] [error] PHP Notice:  Undefined variable: userid in /usr/local/share/sams/src/usersbuttom_4_site.php on line 232
[Thu Jan 26 13:26:40 2012] [error] PHP Notice:  Undefined index: domainuser in /usr/local/share/sams/main.php on line 339
[Thu Jan 26 13:26:40 2012] [error] PHP Notice:  Undefined index: gauditor in /usr/local/share/sams/main.php on line 340
На рисунке видно... В чем дело и что делать?

Re: HELP! Нету данных в SAMS'е Memory, Swap и Filesystem

Добавлено: 2012-01-27 10:49:39
Cancer
установили freecolor ?

Код: Выделить всё

//> pkg_info | grep freecolor
И поменяйте free, так как во freebsd нет такой команды.

Код: Выделить всё

//> cat /usr/local/share/sams/bin/freeswap

#!/bin/sh

STR=`/usr/local/bin/freecolor -t -m -o | grep Swap:`
echo $STR

Код: Выделить всё

//> cat /usr/local/share/sams/bin/freemem

#!/bin/sh

STR=`/usr/local/bin/freecolor -t -m -o | grep Mem:`
echo $STR

Re: HELP! Нету данных в SAMS'е Memory, Swap и Filesystem

Добавлено: 2012-01-27 11:04:04
Cancer
И уберите все что подменили тут

Код: Выделить всё

/usr/local/share/sams/src/configtray.php
уже это не нужно

Код: Выделить всё

// Добавляем вот это
// Подменяем ячейки для mem
//     $mem[0]=$a[1]; //total mem
//     $mem[1]=$a[3]; //Used mem
//     $mem[2]=$a[11];//Free mem

  $a=explode(" ",$swapvalue);
  for($i=1;$i<4;$i++)
     {
           $swap[$i-1]=$a[$i];
     }

// Добавляем вот это
// Подменяем ячейки для swap
//     $swap[0]=$a[1]; //total swap
//     $swap[1]=$a[3]; //used swap
//     $swap[2]=$a[5]; //free swap