ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [Comm] опять Си - и memmory allocation :)
@ 2005-03-15 11:03 Alexey Morsov
  2005-03-15 11:12 ` Alexey Rusakov
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From:  @ 2005-03-15 11:03 UTC (permalink / raw)




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Comm] опять Си - и memmory allocation :)
  2005-03-15 11:03 [Comm] опять Си - и memmory allocation :) Alexey Morsov
@ 2005-03-15 11:12 ` Alexey Rusakov
  2005-03-15 11:35   ` Alexey Morsov
  2005-03-15 11:22 ` [Comm] опять Си - и memmory allocation :) Denis S. Filimonov
  2005-03-15 13:27 ` Mike Lykov
  2 siblings, 1 reply; 19+ messages in thread
From:  @ 2005-03-15 11:12 UTC (permalink / raw)




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Comm] опять Си - и memmory allocation :)
  2005-03-15 11:03 [Comm] опять Си - и memmory allocation :) Alexey Morsov
  2005-03-15 11:12 ` Alexey Rusakov
@ 2005-03-15 11:22 ` Denis S. Filimonov
  2005-03-15 13:27 ` Mike Lykov
  2 siblings, 0 replies; 19+ messages in thread
From:  @ 2005-03-15 11:22 UTC (permalink / raw)




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Comm] опять Си - и memmory allocation :)
  2005-03-15 11:12 ` Alexey Rusakov
@ 2005-03-15 11:35   ` Alexey Morsov
  2005-03-15 13:31     ` Alexandr R. Ogurtzoff
  0 siblings, 1 reply; 19+ messages in thread
From:  @ 2005-03-15 11:35 UTC (permalink / raw)




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Comm] опять Си - и memmory allocation :)
  2005-03-15 11:03 [Comm] опять Си - и memmory allocation :) Alexey Morsov
  2005-03-15 11:12 ` Alexey Rusakov
  2005-03-15 11:22 ` [Comm] опять Си - и memmory allocation :) Denis S. Filimonov
@ 2005-03-15 13:27 ` Mike Lykov
  2005-03-15 13:31   ` [Comm] опять Си - и memmory allocation:) Макс
  2 siblings, 1 reply; 19+ messages in thread
From:  @ 2005-03-15 13:27 UTC (permalink / raw)




^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: [Comm] опять Си - и memmory allocation:)
  2005-03-15 13:27 ` Mike Lykov
@ 2005-03-15 13:31   ` Макс
  0 siblings, 0 replies; 19+ messages in thread
From:  @ 2005-03-15 13:31 UTC (permalink / raw)




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Comm] опять Си - и memmory allocation :)
  2005-03-15 11:35   ` Alexey Morsov
@ 2005-03-15 13:31     ` Alexandr R. Ogurtzoff
  2005-03-15 14:02       ` [Comm] НОЪРЭ яХ - Х " Alexey Morsov
  0 siblings, 1 reply; 19+ messages in thread
From:  @ 2005-03-15 13:31 UTC (permalink / raw)




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Comm] НОЪРЭ яХ - Х memmory allocation :)
  2005-03-15 13:31     ` Alexandr R. Ogurtzoff
@ 2005-03-15 14:02       ` Alexey Morsov
  2005-03-16 20:32         ` [Comm] НОЪРЭ яХ - Х memmory allocation :) [JT] Vitaly Lipatov
  0 siblings, 1 reply; 19+ messages in thread
From:  @ 2005-03-15 14:02 UTC (permalink / raw)




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Comm] НОЪРЭ яХ - Х memmory allocation :) [JT]
  2005-03-15 14:02       ` [Comm] НОЪРЭ яХ - Х " Alexey Morsov
@ 2005-03-16 20:32         ` Vitaly Lipatov
  2005-03-17  7:47           ` Alexey Morsov
  0 siblings, 1 reply; 19+ messages in thread
From:  @ 2005-03-16 20:32 UTC (permalink / raw)




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Comm] НОЪРЭ яХ - Х memmory allocation :) [JT]
  2005-03-16 20:32         ` [Comm] НОЪРЭ яХ - Х memmory allocation :) [JT] Vitaly Lipatov
@ 2005-03-17  7:47           ` Alexey Morsov
  2005-03-17  7:59             ` Alexey I. Froloff
                               ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From:  @ 2005-03-17  7:47 UTC (permalink / raw)




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Comm] НОЪРЭ яХ - Х memmory allocation :) [JT]
  2005-03-17  7:47           ` Alexey Morsov
@ 2005-03-17  7:59             ` Alexey I. Froloff
  2005-03-17  9:27             ` Mike Lykov
  2005-03-17 12:40             ` Vitaly Lipatov
  2 siblings, 0 replies; 19+ messages in thread
From:  @ 2005-03-17  7:59 UTC (permalink / raw)




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Comm] НОЪРЭ яХ - Х memmory allocation :) [JT]
  2005-03-17  7:47           ` Alexey Morsov
  2005-03-17  7:59             ` Alexey I. Froloff
@ 2005-03-17  9:27             ` Mike Lykov
  2005-03-17 10:32               ` Alexey Morsov
  2005-03-17 12:40             ` Vitaly Lipatov
  2 siblings, 1 reply; 19+ messages in thread
From:  @ 2005-03-17  9:27 UTC (permalink / raw)




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Comm] НОЪРЭ яХ - Х memmory allocation :) [JT]
  2005-03-17  9:27             ` Mike Lykov
@ 2005-03-17 10:32               ` Alexey Morsov
  2005-03-17 11:01                 ` Maxim Tyurin
  0 siblings, 1 reply; 19+ messages in thread
From:  @ 2005-03-17 10:32 UTC (permalink / raw)




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Comm] НОЪРЭ яХ - Х memmory allocation :) [JT]
  2005-03-17 10:32               ` Alexey Morsov
@ 2005-03-17 11:01                 ` Maxim Tyurin
  2005-03-17 11:09                   ` Alexey Morsov
  0 siblings, 1 reply; 19+ messages in thread
From:  @ 2005-03-17 11:01 UTC (permalink / raw)




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Comm] НОЪРЭ яХ - Х memmory allocation :) [JT]
  2005-03-17 11:01                 ` Maxim Tyurin
@ 2005-03-17 11:09                   ` Alexey Morsov
  2005-03-17 12:26                     ` Mike Lykov
  0 siblings, 1 reply; 19+ messages in thread
From:  @ 2005-03-17 11:09 UTC (permalink / raw)




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Comm] НОЪРЭ яХ - Х memmory allocation :) [JT]
  2005-03-17 11:09                   ` Alexey Morsov
@ 2005-03-17 12:26                     ` Mike Lykov
  2005-03-17 13:29                       ` Alexey Morsov
  0 siblings, 1 reply; 19+ messages in thread
From:  @ 2005-03-17 12:26 UTC (permalink / raw)




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Comm] НОЪРЭ яХ - Х memmory allocation :) [JT]
  2005-03-17  7:47           ` Alexey Morsov
  2005-03-17  7:59             ` Alexey I. Froloff
  2005-03-17  9:27             ` Mike Lykov
@ 2005-03-17 12:40             ` Vitaly Lipatov
  2 siblings, 0 replies; 19+ messages in thread
From: Vitaly Lipatov @ 2005-03-17 12:40 UTC (permalink / raw)
  To: community

On Thursday 17 March 2005 10:47, Alexey Morsov wrote:
> И все равно не догнал... ну дублирует оно строку. Мне то не
> надо дублировать строку. Мне надо ее изменить...
Строку из вашего примера char *text="ляля"; изменить НЕВОЗМОЖНО.
> Соответственно изменив ее размер...
Если вы хотите изменить размер строки, так вычислите новый 
размер, сделайте malloc, скопируйте туда строку старую, добавьте 
новое, освободите память от старой строки.

> > а лучше Питон использовать :)
>
> Лучше лучше - я знаю что работа со строками в Си - это гемор -
> но мне нужно именно на Си... :)
> Я Демона написать хочу - а как известно "скриптовый демон это
> лучшая шутка которую я слышал (C) ldv" ;)
Всё от задачи зависит. И в любом случае прототип можно и на 
bash/python/perl писать.

-- 
Lav
Виталий Липатов
Санкт-Петербург
GNU! ALT Linux Team! LaTeX! LyX!


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Comm] НОЪРЭ яХ - Х memmory allocation :) [JT]
  2005-03-17 12:26                     ` Mike Lykov
@ 2005-03-17 13:29                       ` Alexey Morsov
  2005-03-18  5:25                         ` Mike Lykov
  0 siblings, 1 reply; 19+ messages in thread
From: Alexey Morsov @ 2005-03-17 13:29 UTC (permalink / raw)
  To: community


Mike Lykov wrote:
> В сообщении от Четверг 17 Март 2005 15:09 Alexey Morsov написал:
> 
> 
>>Нужно. Но при этом нужно чтобы инфа была немного актуальна. Сейчас у
>>меня раз в день парсится и что? А то что парсит он минут по 10 при этом
>>отжирая по 80-180 мег (перл) :(
> 
> 
> просто запускайте его чаще.
> например, раз в минуту.
> И, естественно, пусть он начинает с запомненной с предыдущего раза позиции.
Угу.... А логи свои squid пусть ротирует раз в день - все равно 
статистика в базе и они больше не нужны :)
Хм... это мысля :)
Все таки надо попробовать на Python реализовать :)

> 
> 
> элементарно реализуется в скрипте, который парсит лог.
> т.е. при превышении лимита просто имя компьютера (или ip) подставляется в 
> конфигурацию squidguard и squid делает reload.
Проблема в том что у меня не squidGuard - и поставить мне его не 
удалось, там на прокси не ALT а FC1 - squidGuard там не компилится.. на 
berkleydb ругается :(
И потом - наверное вы имели ввиду не squid reload а squid -k reconfigure ?
Reload это больно жетско - инет у юзеров пропадет - а это не хорошо.

-- 
Всего наилучшего,
Системный Администратор ЗАО "ИК "РИКОМ-ТРАСТ"
Алексей Морсов
ICQ: 196766290
Jabber: Samurai@jabber.pibhe.com
http://www.ricom.ru
http://www.fondmarket.ru


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Comm] НОЪРЭ яХ - Х memmory allocation :) [JT]
  2005-03-17 13:29                       ` Alexey Morsov
@ 2005-03-18  5:25                         ` Mike Lykov
  0 siblings, 0 replies; 19+ messages in thread
From: Mike Lykov @ 2005-03-18  5:25 UTC (permalink / raw)
  To: community

В сообщении от Четверг 17 Март 2005 17:29 Alexey Morsov написал:
> > И, естественно, пусть он начинает с запомненной с предыдущего раза
> > позиции.
> Угу.... А логи свои squid пусть ротирует раз в день - все равно
> статистика в базе и они больше не нужны :)

ну, у меня статистика в базе, так и сделано. правда, раз в 10 минут.
Раньше тоже было раз в день, да еще perl-скрипт неоптимизированный по расходу 
памяти.. ;)

> И потом - наверное вы имели ввиду не squid reload а squid -k reconfigure ?
> Reload это больно жетско - инет у юзеров пропадет - а это не хорошо.

вы, наверно, спутали с restart (reload как раз вызывает -k reconfigure)

-- 
Mike Lykov
Samara, "Vesna" parfum company, System administrator 


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2005-03-18  5:25 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-15 11:03 [Comm] опять Си - и memmory allocation :) Alexey Morsov
2005-03-15 11:12 ` Alexey Rusakov
2005-03-15 11:35   ` Alexey Morsov
2005-03-15 13:31     ` Alexandr R. Ogurtzoff
2005-03-15 14:02       ` [Comm] НОЪРЭ яХ - Х " Alexey Morsov
2005-03-16 20:32         ` [Comm] НОЪРЭ яХ - Х memmory allocation :) [JT] Vitaly Lipatov
2005-03-17  7:47           ` Alexey Morsov
2005-03-17  7:59             ` Alexey I. Froloff
2005-03-17  9:27             ` Mike Lykov
2005-03-17 10:32               ` Alexey Morsov
2005-03-17 11:01                 ` Maxim Tyurin
2005-03-17 11:09                   ` Alexey Morsov
2005-03-17 12:26                     ` Mike Lykov
2005-03-17 13:29                       ` Alexey Morsov
2005-03-18  5:25                         ` Mike Lykov
2005-03-17 12:40             ` Vitaly Lipatov
2005-03-15 11:22 ` [Comm] опять Си - и memmory allocation :) Denis S. Filimonov
2005-03-15 13:27 ` Mike Lykov
2005-03-15 13:31   ` [Comm] опять Си - и memmory allocation:) Макс

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git