Страница 1 из 3
ApacheStats
Добавлено: 2008-01-31 2:44:23
serge
http://www.lissyara.su/?id=1582
Запостил заметку о шаблоне Cacti для статистики работы Apache.
Все баги и вопросы сюда.
Re: ApacheStats
Добавлено: 2008-02-01 9:43:40
Sintezator
У меня не рисуются графики, за целый день ничего не отобразилось. Сделал все согласно статье кроме установки порта p5-LWP-UserAgent-WithCache, у меня freebsd 6.2 и такого порта нет.
Скрипт работает
Код: Выделить всё
perl ws_apachestats.pl
apache_total_hits:444780 apache_total_kbytes:8776213 apache_cpu_load:.0574608 ap
ache_req_per_sec:.125788 apache_bytes_per_sec:2541.56 apache_bytes_per_req:20205
.1 apache_busy_workers:1 apache_idle_workers:9 apache_cpuload:.0574608 thread_O:
57 threadC:0 threadD:0 threadG:0 threadI:0 threadK:0 threadL:0 threadR:0 threadS
:0 threadW:1 thread_W:9
.
Пробывал прописать явно использовать lynx, тоже не помогло
Код: Выделить всё
#my $method = ( -f $wget ) ? $wget : (-f $lynx) ? $lynx : "perl"; .
my $method = $lynx;
Где еще посмотреть?
Re: ApacheStats
Добавлено: 2008-02-01 12:35:08
serge
А cacti вообще работает?
Re: ApacheStats
Добавлено: 2008-02-01 13:12:07
Sintezator
Кнечно, почти пол года.
Re: ApacheStats
Добавлено: 2008-02-01 13:22:27
serge
Console -> Devices -> svoi.server.tam -> например, WebServer - Apache Statistics - Hits / s - Is Being Graphed (Edit) -> *Turn On Graph Debug Mode.
Вот там и смотришь че да как.
Re: ApacheStats
Добавлено: 2008-02-04 13:39:11
Sintezator
Вроде все нормально...
Вот что выдает Apache Statistics - CPU Load
Код: Выделить всё
RRDTool Command:
/usr/local/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="fox.e.ru - Apache Statistics - CPU Load" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="Apache CPU Load" \
--slope-mode \
DEF:a="/mnt/www/vhosts/cacti.e.ru/htdocs/rra/fox_e_ru_threadg_1294.rrd":apache_cpuload:AVERAGE \
DEF:b="/mnt/www/vhosts/cacti.e.ru/htdocs/rra/fox_e_ru_threadg_1294.rrd":apache_cpuload:MAX \
CDEF:cdeff=a,1800,TREND \
AREA:a#FF5F00:"Apache CPU Load" \
GPRINT:a:LAST:"Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:b:MAX:"Maximum\:%8.2lf %s" \
LINE1:b#FF0000:"MAX" \
LINE1:cdeff#000000:"30min moving average\n"
RRDTool Says:
OK
Re: ApacheStats
Добавлено: 2008-02-14 10:34:37
daevy
Доброго времени суток.
вобщем сижу на линухе, потому столкнулся с такой проблемой, немогу найти модуля p5-LWP-UserAgent-WithCache,
и в перле тоже нишарю! подскажите как модифицироавть скрипт, либо как поставить или включить недостающий модуль под Gentoo (поиск в портеджах непредлагать,ибо ненашел)
Re: ApacheStats
Добавлено: 2008-02-14 10:35:57
Alex Keda
блин.
фря - рулит

==========
думаю, просто неправильно искал - в генте портов вроде чуть больше даже.
думаю что есть
Re: ApacheStats
Добавлено: 2008-02-14 10:55:04
serge
Можно через
установить модуль. Там их намного больше чем в портах.
Re: ApacheStats
Добавлено: 2008-02-14 11:01:25
daevy
всяко искал, и через eserch, и grep'ил и по dev-perl/ лазил,
там в каментах увидел как один товарищ lynx пытался использовать, попробовал также поменять, всеравно ругается что нет перлового модуля, видимо чет нетак поменял
кстате, lissyara сайт у тебя босяцкий! респект тебе, возьму пример с тебя:-)
Re: ApacheStats
Добавлено: 2008-02-14 11:03:59
daevy
serge
про cpan поподробней можно? что это и с чем едят, знаю только что связано с perl
Re: ApacheStats
Добавлено: 2008-02-14 11:13:21
serge
Попробуй убрать весь блок
По поводу cpan
Re: ApacheStats
Добавлено: 2008-02-14 12:30:21
Гость
[quote="serge"]Попробуй убрать весь блок
ага, спасибо помогло!
за ответ несчитаю))
Re: ApacheStats
Добавлено: 2008-02-14 12:31:54
Alex Keda
и зря абсолютно.
через достаточно короткое время просто всем надоест отвечать на одни и те же вопросы и читать за тебя маны.
Re: ApacheStats
Добавлено: 2008-02-14 13:01:38
daevy
ладно оставим треп)) напоследок скажите мне, появляются шаблоны графиков с первыми тремя понятно
Apache Statistics - Bytes / Request
Apache Statistics - CPU Loa
Apache Statistics - Hits / s
а что отражают остальные?
Apache Statistics - kBits / s
Apache Statistics - Thread Details
Apache Statistics - Thread Scoreboard
с тонкостями работы апача пока что, незнаком
PS. в маны и гуглы нетыкайте пожалуста:-)
Re: ApacheStats
Добавлено: 2008-02-14 13:02:08
Alex Keda
Re: ApacheStats
Добавлено: 2008-02-14 13:07:15
Andy
Ты не умничай, ты пальцем покажи [c]

Re: ApacheStats
Добавлено: 2008-02-14 13:09:25
Alex Keda
Код: Выделить всё
HTTPD(8) httpd HTTPD(8)
NAME
httpd - Apache Hypertext Transfer Protocol Server
SYNOPSIS
httpd [ -d serverroot ] [ -f config ] [ -C directive ] [ -c directive ] [ -D parameter ] [ -e level ] [ -E file ] [ -k start|restart|graceful|stop
] [ -R directory ] [ -h ] [ -l ] [ -L ] [ -S ] [ -t ] [ -v ] [ -V ] [ -X ]
On Windows systems, the following additional arguments are available:
httpd [ -k install|config|uninstall ] [ -n name ] [ -w ]
SUMMARY
httpd is the Apache HyperText Transfer Protocol (HTTP) server program. It is designed to be run as a standalone daemon process. When used like
this it will create a pool of child processes or threads to handle requests.
In general, httpd should not be invoked directly, but rather should be invoked via apachectl on Unix-based systems or as a service on Windows NT,
2000 and XP and as a console application on Windows 9x and ME.
OPTIONS
-d serverroot
Set the initial value for the ServerRoot directive to serverroot. This can be overridden by the ServerRoot directive in the configuration
file. The default is /etc/httpd.
-f config
Uses the directives in the file config on startup. If config does not begin with a /, then it is taken to be a path relative to the Server-
Root. The default is conf/httpd.conf.
-k start|restart|graceful|stop
Signals httpd to start, restart, or stop. See Stopping Apache for more information.
-C directive
Process the configuration directive before reading config files.
-c directive
Process the configuration directive after reading config files.
-D parameter
Sets a configuration parameter which can be used with <IfDefine> sections in the configuration files to conditionally skip or process com-
mands at server startup and restart.
-e level
Sets the LogLevel to level during server startup. This is useful for temporarily increasing the verbosity of the error messages to find
problems during startup.
-E file
Send error messages during server startup to file.
-R directory
When the server is compiled using the SHARED_CORE rule, this specifies the directory for the shared object files.
-h Output a short summary of available command line options.
-l Output a list of modules compiled into the server. This will not list dynamically loaded modules included using the LoadModule directive.
-L Output a list of directives together with expected arguments and places where the directive is valid.
-S Show the settings as parsed from the config file (currently only shows the virtualhost settings).
-t Run syntax tests for configuration files only. The program immediately exits after these syntax parsing tests with either a return code of
0 (Syntax OK) or return code not equal to 0 (Syntax Error). If -D DUMP_VHOSTS is also set, details of the virtual host configuration will
be printed.
-v Print the version of httpd, and then exit.
-V Print the version and build parameters of httpd, and then exit.
-X Run httpd in debug mode. Only one worker will be started and the server will not detach from the console.
The following arguments are available only on the Windows platform:
-k install|config|uninstall
Install Apache as a Windows NT service; change startup options for the Apache service; and uninstall the Apache service.
-n name
The name of the Apache service to signal.
-w Keep the console window open on error so that the error message can be read.
Apache HTTP Server 2004-01-06 HTTPD(8)
на том мрачном линухе где я щас - другого нет

Re: ApacheStats
Добавлено: 2008-02-14 21:37:08
serge
daevy писал(а):а что отражают остальные?
Apache Statistics - kBits / s
Apache Statistics - Thread Details
Apache Statistics - Thread Scoreboard
с тонкостями работы апача пока что, незнаком
Тут вобщем становиться понятно даже если перевести названия на родной и могучий
daevy писал(а):PS. в маны и гуглы нетыкайте пожалуста:-)
Ну и запросы у вас

Re: ApacheStats
Добавлено: 2008-03-17 13:39:58
Shvapsss
Добрый день всем.!
Прошу помощи у всех Вас. :0)
Кто нибудь вывесте рабочий скрипт с Вашими настройками. Я чет в нем немного запутался.
Заранее спасибо за помощь буду ждать.
Re: ApacheStats
Добавлено: 2008-03-17 13:45:20
Alex Keda
на сайте есть же
Re: ApacheStats
Добавлено: 2008-03-17 13:57:31
Shvapsss
Дык я не нашел на рабочий конфиг тот что в описалове не работает почему то вот и прошу рабочий.. или если на сайте как говоришь есть так дал бы ссылку тогда.
Re: ApacheStats
Добавлено: 2008-03-17 14:03:03
Shvapsss
Вот что выдает запуск скрипта.
perl ws_apachestats.pl
<HTML>
<HEAD><TITLE>An Error Occurred</TITLE></HEAD>
<BODY>
<H1>An Error Occurred</H1>
404 Not Found
</BODY>
</HTML>
[root@ns1 /usr/ports/www/p5-LWP-UserAgent-WithCache]#
Re: ApacheStats
Добавлено: 2008-03-17 18:29:34
serge
http://tvoi_server/server-status?auto
что говорит?
Re: ApacheStats
Добавлено: 2008-03-18 12:02:23
Shvapsss
Forbidden
You don't have permission to access /server-status on this server.
Вот такую вот бяку пишет...

(((