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

Простые/общие вопросы по UNIX системам. Спросите здесь, если вы новичок

Модераторы: vadim64, terminus

Правила форума
Убедительная просьба юзать теги [cоde] при оформлении листингов.
Сообщения не оформленные должным образом имеют все шансы быть незамеченными.
Аватара пользователя
Ridik5533
рядовой
Сообщения: 39
Зарегистрирован: 2011-12-20 18:16:11
Откуда: Киев

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

Непрочитанное сообщение Ridik5533 » 2012-01-26 14:43:06

Вообщем менял

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

# 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
На рисунке видно... В чем дело и что делать?
Вложения
123.jpg

Хостинговая компания Host-Food.ru
Хостинг HostFood.ru
 

Услуги хостинговой компании Host-Food.ru

Хостинг HostFood.ru

Тарифы на хостинг в России, от 12 рублей: https://www.host-food.ru/tariffs/hosting/
Тарифы на виртуальные сервера (VPS/VDS/KVM) в РФ, от 189 руб.: https://www.host-food.ru/tariffs/virtualny-server-vps/
Выделенные сервера, Россия, Москва, от 2000 рублей (HP Proliant G5, Intel Xeon E5430 (2.66GHz, Quad-Core, 12Mb), 8Gb RAM, 2x300Gb SAS HDD, P400i, 512Mb, BBU):
https://www.host-food.ru/tariffs/vydelennyi-server-ds/
Недорогие домены в популярных зонах: https://www.host-food.ru/domains/

Аватара пользователя
Cancer
Гл. Кастратор
Сообщения: 1269
Зарегистрирован: 2008-03-25 12:21:36
Откуда: г. Ростов-на-Дону
Контактная информация:

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

Непрочитанное сообщение Cancer » 2012-01-27 10:49:39

установили 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

Аватара пользователя
Cancer
Гл. Кастратор
Сообщения: 1269
Зарегистрирован: 2008-03-25 12:21:36
Откуда: г. Ростов-на-Дону
Контактная информация:

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

Непрочитанное сообщение Cancer » 2012-01-27 11:04:04

И уберите все что подменили тут

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

/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