Ежемесячные архивы: Октябрь 2009

mod_rewrite

http://www.egoroff.spb.ru/portfolio/apache/

freebsd em perfomance

http://people.yandex-team.ru/~wawa/
тема. жаль так поздно решил попробовать

CPU: 0.0% user, 0.0% nice, 11.0% system, 0.2% interrupt, 88.8% idle
Mem: 19M Active, 11M Inact, 141M Wired, 128K Cache, 20M Buf, 1803M Free
Swap: 4096M Total, 4096M Free

PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND
11 root 1 171 ki31 0K 16K CPU7 7 180:02 93.36% idle: cpu7
17 root 1 171 ki31 0K 16K CPU1 1 198:14 92.68% idle: cpu1
13 root 1 171 ki31 0K 16K CPU5 5 178:37 90.28% idle: cpu5
16 root 1 171 ki31 0K 16K CPU2 2 167:05 88.87% idle: cpu2
18 root 1 171 ki31 0K 16K RUN 0 163:27 88.87% idle: cpu0
14 root 1 171 ki31 0K 16K CPU4 4 171:12 86.57% idle: cpu4
12 root 1 171 ki31 0K 16K CPU6 6 174:13 83.79% idle: cpu6
15 root 1 171 ki31 0K 16K RUN 3 174:49 75.00% idle: cpu3
56 root 1 -68 — 0K 16K CPU3 3 77:35 33.15% dummynet
35 root 1 43 — 0K 16K CPU6 6 31:19 14.89% em1_rx_kthread_0
224 root 1 43 — 0K 16K CPU1 1 31:18 14.36% em1_rx_kthread_2
36 root 1 43 — 0K 16K WAIT 1 31:20 13.87% em1_rx_kthread_1
221 root 1 43 — 0K 16K WAIT 2 29:39 13.48% em0_rx_kthread_2
31 root 1 43 — 0K 16K WAIT 7 29:41 13.09% em0_rx_kthread_0
32 root 1 43 — 0K 16K WAIT 4 29:39 12.89% em0_rx_kthread_1

pf openbsd perfomance

PF will only use one processor, so multiple processors (or multiple cores) WILL NOT improve PF performance. HOWEVER, under some circumstances, running the SMP version of OpenBSD (bsd.mp) instead of bsd will give better performance due to differences in how interrupt handling is done. In many cases, bsd.mp will give less performance. IF you are seeing performance problems, experiment with this, most users will never hit any limits to worry about it.

http://www.openbsd.org/faq/pf/perf.html

=(

Сохренеие конфига интерфейса на Cisco по событию

#
 #
 # установка: в conf t -> event manager policy имя_файла
 #
 ::cisco::eem::event_register_cli sync no skip no occurs 1  pattern .*write.* queue_priority low nice 1 maxrun 100
 
namespace import ::cisco::eem::*
 namespace import ::cisco::lib::*
 
#-------------------- hostname and variables     ------------------
 
set routername [info hostname]
 #################################################################
 #################################################################
 set main_interface "FastEthernet1/0"
 set filename "nvram:ttt.conf"
 #################################################################
 #################################################################
 #
 #-------------------   " cli open"   -------------------
 #
 if [catch {cli_open} result] {
 error $result $errorInfo
 } else {
 array set cli $result
 }
 
#--------------- end of  "cli open"   -------------------
 
action_syslog msg "save conf from: $main_interface to nvram"
 if [catch {cli_exec $cli(fd) "enable"} result] {
 error $result $errorInfo
 }
 if [catch {cli_exec $cli(fd) "show run interface $main_interface"} result] {
 error $result $errorInfo
 }
 set show_run_interface_tmp $result
 set show_run_interface [split "$show_run_interface_tmp" "\n"]
 
set len_sri [llength $show_run_interface]
 set fileId [open $filename "w"]
 set len [expr ($len_sri-3)]
 for {set x 6} {$x<$len} {incr x} {
 #action_syslog msg "+++++++++++: [lindex $show_run_interface $x]"
 puts -nonewline $fileId [lindex $show_run_interface $x]
 #if [catch {cli_exec $cli(fd) "[lindex $show_run_interface $x]"} result] {
 #	error $result $errorInfo
 #}
 }
 close $fileId
 
#
 #--------------------- cli close ------------------------
 #
 cli_close $cli(fd) $cli(tty_id)