LYb

Napravljene poruke na forumu

Gledanje 681 članaka - 681 do 690 (od 1,861 ukupno)
  • Autor
    Članci
  • LYb
    Učesnik

    Uh… da nije tebi disk pun?
    Sta kaze komanda

    # df -h

    Daj nam ovde i

    # emerge –info

    Jos nesto… kako se spajas na net?

    kao odgovor na: Pomoć početnicima #45057
    LYb
    Učesnik

    Osnovno pitanje je dal će podforum kao takav pomoći novim, ali i starim korisnicima?

    Ne vidim kako… ako to podrazumeva prevodjenje gomile howto-a na srpski – nece ici. Prvo, ko ce to da radi? Drugo, cemu. Trece… ko trazi uhlebljenje u IT-u treba ili da zna ili da nauci engleski jezik, a ko jezik zna, sve to vec postoji na engleskom jeziku.
    To uopste i nije za forum vec za neki wiki.

    Forum tipa “Pitanja pocetnika” gde bi neiskusni mogli da pitaju sta im padne na pamet – to bi i moglo da prodje… da se i mi malo pravimo pametni 🙂

    LYb
    Učesnik

    Uh… kakav “–make conf” sad?

    Osim toga, daj i nekoliko linija _pre_ onih par poslednjih, pre:

    !!! ERROR: sys-fs/sysfsutils-1.3.0-r1 failed.
    !!! Function src_compile, Line 566, Exitcode 2
    !!! emake failed
    !!! If you need support, post the topmost build error, NOT this status message.

    Osim toga, daj nam i koju ti gresku javi kada kucas emerge sync.

    kao odgovor na: Pomoć početnicima #45052
    LYb
    Učesnik

    Uh… nadam se da se niko nece naci uvredjen, ali potpuno se slazem sa stavom da je odrzavanje sistema posao administratora, a ne sekretarice. Dralje, ko god koristi bilo kakav sistem u bilo kakvom poslovnom (citaj: komercijalnom) okruzenju, treba da ocekuje da ce morati da plati podrsku.

    Da nekoj firmi podesavam i sredjujem sistem za dzabe, zato sto “nema mrezu i mora da legalizuje softver, pa nema potreba da placa coveka koji ce time da se bavi”? Nema sanse…

    Sa druge strane, opet kada uzmes firmu u obzir, zar zaista mislis da je moguce _sve_ prezvakati na jednom mestu? I kernel, i mrezu i sve te “tamne vilajete”? Pa samo kad mrezu uzmes u obzir, moras da racunas i na DNS i na webserver i na mejl sistem, pa na proksi, pa na SNMP… ovde sam nabrojao mozda 1% stvari koje mogu da zatrebaju i da se jave kao problem.

    Dakle, firma mora da PLATI coveka/ljude. Tacka.

    Mnogi u Srbiji moraju da shvate da se znanje placa. Ni kod babe nema dzabe.

    kao odgovor na: Fedora 6 u najavi #43460
    LYb
    Učesnik

    To ne zavisi toliko od fedore koliko od ati-ja, posto su im drajveri vlasnicki softver. Doduse, ako tada bude stabilan xorg7.x, on u sebi ima podrsku za cip rv300/rv350 i neke jace, citaj ati9600-9800 ce biti podrzani u XOrgu-u direktno, za novije cipove ne znam.

    kao odgovor na: traffic shaping – bandwidth limit (lyb, popeye javite se) #44888
    LYb
    Učesnik

    E do mojega… pisao odgovor i raspisao se i ovaj mi javi da mi je sesija istekla…

    BTW, skripta radi vise od pola godine kod mene, latency je neuporedivo bolji nego bez nje. Na primer, ping sa punim uploadom:

    — http://www.sezampro.yu ping statistics —
    10 packets transmitted, 10 received, 0% packet loss, time 8999ms
    rtt min/avg/max/mdev = 49.658/135.482/244.936/61.908 ms

    sa punim DL i UL:

    10 packets transmitted, 10 received, 0% packet loss, time 8999ms
    rtt min/avg/max/mdev = 1351.801/1535.439/1724.214/98.980 ms, pipe 2

    sto je mnogo bolje nego bez nje, kada avg ume da ide i preko 8000. Moze i bolje, ali mora da se dodatno osakati link, treba naci ravntezu. Uz to, omogcava ti da ti p2p recimo ne zeza link bez veze i ne koci telnet/ssh ili bilo kakvu drugu interaktivnu konekciju.

    Naravno, nadam se unapredjenjima (gledad u iscekivanju u MisterNo-a 🙂 )

    kao odgovor na: Fedora 6 u najavi #43458
    LYb
    Učesnik

    A i ja se ubacujem bez veze… koji kod si dovukao sa CVS-a? Ako bilo sta sto si menjao na sistemu ima veze sa menjanjem verzije MySQL, znaj da je krivac samo MySQL i da nisi jedini… ima vas mnooogooo 🙂

    Doduse, ispravljeno je pre neku nedelju ili malo kasnije.

    LYb
    Učesnik

    Da, mada moze i gore da koristi portove kada je DNS u pitanju. Bas danas je dotegnuta skripta kada je u pitanju torrent tcp i udp saobracaj – da ga tura u lowest prio.

    LYb
    Učesnik

    Svojevremeno sam izbunario ovu skriptu i od tada je dosta modifikovao, tako da nije ista kao originalna, ali moze da ti da dovoljno za pocetak… Ipak treba da proucis kako funkcionise markiranje paketa i kako se ponasaju i sta rade razna “queuing disciplines”… evo sta ja koristim na ADSL 256/64:

    ————————————————————————————————-
    #!/bin/bash
    #
    # myshaper – DSL/Cable modem outbound traffic shaper and prioritizer.
    #            Based on the ADSL/Cable wondershaper (http://www.lartc.org)
    #
    # Written by Dan Singletary (8/7/02)
    #
    # NOTE!! – This script assumes your kernel has been patched with the
    #          appropriate HTB queue and IMQ patches available here:
    #          (subnote: future kernels may not require patching)
    #
    #      http://luxik.cdi.cz/~devik/qos/htb/
    #      http://luxik.cdi.cz/~patrick/imq/
    #
    # Configuration options for myshaper:
    #  DEV    – set to ethX that connects to DSL/Cable Modem
    #  RATEUP – set this to slightly lower than your
    #          outbound bandwidth on the DSL/Cable Modem.
    #          I have a 1500/128 DSL line and setting
    #          RATEUP=90 works well for my 128kbps upstream.
    #          However, your mileage may vary.
    #  RATEDN – set this to slightly lower than your
    #          inbound bandwidth on the DSL/Cable Modem.
    #
    #
    #  Theory on using imq to “shape” inbound traffic:
    #
    #    It’s impossible to directly limit the rate of data that will
    #  be sent to you by other hosts on the internet.  In order to shape
    #  the inbound traffic rate, we have to rely on the congestion avoidance
    #  algorithms in TCP.  Because of this, WE CAN ONLY ATTEMPT TO SHAPE
    #  INBOUND TRAFFIC ON TCP CONNECTIONS.  This means that any traffic that
    #  is not tcp should be placed in the high-prio class, since dropping
    #  a non-tcp packet will most likely result in a retransmit which will
    #  do nothing but unnecessarily consume bandwidth. 
    #    We attempt to shape inbound TCP traffic by dropping tcp packets
    #  when they overflow the HTB queue which will only pass them on at
    #  a certain rate (RATEDN) which is slightly lower than the actual
    #  capability of the inbound device.  By dropping TCP packets that
    #  are over-rate, we are simulating the same packets getting dropped
    #  due to a queue-overflow on our ISP’s side.  The advantage of this
    #  is that our ISP’s queue will never fill because TCP will slow it’s
    #  transmission rate in response to the dropped packets in the assumption
    #  that it has filled the ISP’s queue, when in reality it has not.
    #    The advantage of using a priority-based queuing discipline is
    #  that we can specifically choose NOT to drop certain types of packets
    #  that we place in the higher priority buckets (ssh, telnet, etc).  This
    #  is because packets will always be dequeued from the lowest priority class
    #  with the stipulation that packets will still be dequeued from every
    #  class fairly at a minimum rate (in this script, each bucket will deliver
    #  at least it’s fair share of 1/7 of the bandwidth). 
    #
    #  Reiterating main points:
    #  * Dropping a tcp packet on a connection will lead to a slower rate
    #    of reception for that connection due to the congestion avoidance algorithm.
    #  * We gain nothing from dropping non-TCP packets.  In fact, if they
    #    were important they would probably be retransmitted anyways so we want to
    #    try to never drop these packets.  This means that saturated TCP connections
    #    will not negatively effect protocols that don’t have a built-in retransmit like TCP.
    #  * Slowing down incoming TCP connections such that the total inbound rate is less
    #    than the true capability of the device (ADSL/Cable Modem) SHOULD result in little
    #    to no packets being queued on the ISP’s side (DSLAM, cable concentrator, etc).  Since
    #    these ISP queues have been observed to queue 4 seconds of data at 1500Kbps or 6 megabits
    #    of data, having no packets queued there will mean lower latency.
    #
    #  Caveats (questions posed before testing):
    #  * Will limiting inbound traffic in this fashion result in poor bulk TCP performance?
    #    – Preliminary answer is no!  Seems that by prioritizing ACK packets (small /dev/null
            iptables -t mangle -L MYSHAPER-IN -v -x 2> /dev/null
            exit
    fi

    if [ “$1” = “qdisc” ]
    then
            echo “[qdisc]”
            tc -s qdisc show dev $DEV
    exit
    fi

    if [ “$1” = “class” ]
    then
            echo “[class]”
            tc -s class show dev $DEV
    exit
    fi

    if [ “$1” = “iptables” ]
    then
            echo “[iptables]”
            iptables -t mangle -L MYSHAPER-OUT -v -x 2> /dev/null
            iptables -t mangle -L MYSHAPER-IN -v -x 2> /dev/null
    exit
    fi

    # Reset everything to a known state (cleared)
    tc qdisc del dev $DEV root    2> /dev/null > /dev/null
    tc qdisc del dev $DEV ingress 2> /dev/null > /dev/null
    iptables -t mangle -D POSTROUTING -o $DEV -j MYSHAPER-OUT 2> /dev/null > /dev/null
    iptables -t mangle -F MYSHAPER-OUT 2> /dev/null > /dev/null
    iptables -t mangle -X MYSHAPER-OUT 2> /dev/null > /dev/null
    iptables -t mangle -D PREROUTING -i $DEV -j MYSHAPER-IN 2> /dev/null > /dev/null
    iptables -t mangle -F MYSHAPER-IN 2> /dev/null > /dev/null
    iptables -t mangle -X MYSHAPER-IN 2> /dev/null > /dev/null
    ip link set imq0 down 2> /dev/null > /dev/null
    rmmod imq 2> /dev/null > /dev/null

    if [ “$1” = “stop” ]
    then
            echo “Shaping removed on $DEV.”
            exit
    fi

    ###########################################################
    #
    # Outbound Shaping (limits total bandwidth to RATEUP)

    # set queue size to give latency of about 2 seconds on low-prio packets
    ip link set dev $DEV qlen 30

    # changes mtu on the outbound device.  Lowering the mtu will result
    # in lower latency but will also cause slightly lower throughput due
    # to IP and TCP protocol overhead.
    ip link set dev $DEV mtu 1500

    # Find device MTU
    DEVMTU=`ifconfig $DEV | grep MTU | cut -d ‘:’ -f 2- | sed ‘s/ .*//’`

    # add HTB root qdisc
    tc qdisc add dev $DEV root handle 1: htb default 26

    # add main rate limit classes
    tc class add dev $DEV parent 1: classid 1:1 htb rate ${RATEUP}kbit quantum $[$DEVMTU*9]

    # add leaf classes – We grant each class at LEAST it’s “fair share” of bandwidth.
    #                    this way no class will ever be starved by another class.  Each
    #                    class is also permitted to consume all of the available bandwidth
    #                    if no other classes are in use.
    tc class add dev $DEV parent 1:1 classid 1:20 htb rate $[$RATEUP/7]kbit ceil ${RATEUP}kbit prio 0 quantum $[$DEVMTU*9]
    tc class add dev $DEV parent 1:1 classid 1:21 htb rate $[$RATEUP/7]kbit ceil ${RATEUP}kbit prio 1 quantum $[$DEVMTU*6]
    tc class add dev $DEV parent 1:1 classid 1:22 htb rate $[$RATEUP/7]kbit ceil ${RATEUP}kbit prio 2 quantum $[$DEVMTU*4]
    tc class add dev $DEV parent 1:1 classid 1:23 htb rate $[$RATEUP/7]kbit ceil ${RATEUP}kbit prio 3 quantum $[$DEVMTU*3]
    tc class add dev $DEV parent 1:1 classid 1:24 htb rate $[$RATEUP/7]kbit ceil ${RATEUP}kbit prio 4 quantum $[$DEVMTU*2]
    tc class add dev $DEV parent 1:1 classid 1:25 htb rate $[$RATEUP/7]kbit ceil ${RATEUP}kbit prio 5 quantum $[$DEVMTU*1]
    tc class add dev $DEV parent 1:1 classid 1:26 htb rate $[$RATEUP/7]kbit ceil ${RATEUP}kbit prio 6 quantum $[$DEVMTU*1]

    # attach qdisc to leaf classes – here we at SFQ to each priority class.  SFQ insures that
    #                                within each class connections will be treated (almost) fairly.
    tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10
    tc qdisc add dev $DEV parent 1:21 handle 21: sfq perturb 10
    tc qdisc add dev $DEV parent 1:22 handle 22: sfq perturb 10
    tc qdisc add dev $DEV parent 1:23 handle 23: sfq perturb 10
    tc qdisc add dev $DEV parent 1:24 handle 24: sfq perturb 10
    tc qdisc add dev $DEV parent 1:25 handle 25: sfq perturb 10
    tc qdisc add dev $DEV parent 1:26 handle 26: sfq perturb 10

    # filter traffic into classes by fwmark – here we direct traffic into priority class according to
    #                                        the fwmark set on the packet (we set fwmark with iptables
    #                                        later).  Note that above we’ve set the default priority
    #                                        class to 1:26 so unmarked packets (or packets marked with
    #                                        unfamiliar IDs) will be defaulted to the lowest priority
    #                                        class.
    tc filter add dev $DEV parent 1:0 prio 0 protocol ip handle 20 fw flowid 1:20
    tc filter add dev $DEV parent 1:0 prio 0 protocol ip handle 21 fw flowid 1:21
    tc filter add dev $DEV parent 1:0 prio 0 protocol ip handle 22 fw flowid 1:22
    tc filter add dev $DEV parent 1:0 prio 0 protocol ip handle 23 fw flowid 1:23
    tc filter add dev $DEV parent 1:0 prio 0 protocol ip handle 24 fw flowid 1:24
    tc filter add dev $DEV parent 1:0 prio 0 protocol ip handle 25 fw flowid 1:25
    tc filter add dev $DEV parent 1:0 prio 0 protocol ip handle 26 fw flowid 1:26

    # add MYSHAPER-OUT chain to the mangle table in iptables – this sets up the table we’ll use
    #                                                      to filter and mark packets.
    iptables -t mangle -N MYSHAPER-OUT
    iptables -t mangle -I POSTROUTING -o $DEV -j MYSHAPER-OUT

    # add fwmark entries to classify different types of traffic – Set fwmark from 20-26 according to
    #                                                            desired class. 20 is highest prio.
    iptables -t mangle -A MYSHAPER-OUT -p tcp –sport 0:1024 -j MARK –set-mark 23 # Default for low port traffic
    iptables -t mangle -A MYSHAPER-OUT -p tcp –dport 0:1024 -j MARK –set-mark 23 # “”

    iptables -t mangle -A MYSHAPER-OUT -p tcp –dport 20 -j MARK –set-mark 26    # ftp-data port, low prio

    iptables -t mangle -A MYSHAPER-OUT -p tcp –dport 5190 -j MARK –set-mark 23  # aol instant messenger

    iptables -t mangle -A MYSHAPER-OUT -p icmp -j MARK –set-mark 20              # ICMP (ping) – high prio, impress friends

    iptables -t mangle -A MYSHAPER-OUT -p udp -j MARK –set-mark 21                # DNS name resolution (small packets)

    iptables -t mangle -A MYSHAPER-OUT -p tcp –sport ssh -j MARK –set-mark 22    # secure shell
    iptables -t mangle -A MYSHAPER-OUT -p tcp –dport ssh -j MARK –set-mark 22    # secure shell

    iptables -t mangle -A MYSHAPER-OUT -p tcp –dport telnet -j MARK –set-mark 22 # telnet (ew…)
    iptables -t mangle -A MYSHAPER-OUT -p tcp –sport telnet -j MARK –set-mark 22 # telnet (ew…)

    iptables -t mangle -A MYSHAPER-OUT -p tcp –sport http -j MARK –set-mark 25  # Local web server

    #iptables -t mangle -A MYSHAPER-OUT -p tcp –dport 80 -j MARK –set-mark 24    # web
    #iptables -t mangle -A MYSHAPER-OUT -p tcp –dport 443 -j MARK –set-mark 24    # https

    iptables -t mangle -A MYSHAPER-OUT -p tcp -m length –length :64 -j MARK –set-mark 21 # small packets (probably just ACKs)
    iptables -t mangle -A MYSHAPER-OUT -m mark –mark 0 -j MARK –set-mark 26      # redundant- mark any unmarked packets as 26 (low prio)

    # Done with outbound shaping
    #
    ####################################################

    echo “Outbound shaping added to $DEV.  Rate: ${RATEUP}Kbit/sec.”

    # uncomment following line if you only want upstream shaping.
    exit

    ####################################################
    #
    # Inbound Shaping (limits total bandwidth to RATEDN)

    # make sure imq module is loaded

    tc qdisc add dev $DEV handle ffff: ingress

    # filter *everything* to it (0.0.0.0/0), drop everything that’s
    # coming in too fast:

    tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip src
      0.0.0.0/0 police rate ${RATEDN}kbit burst 10k drop flowid :1

    echo “Inbound shaping added to $DEV.  Rate: ${RATEDN}Kbit/sec.”
    ——————————————————————————————

    Nisam sejpovao downlink posto mi nije neophodno, a ionako mora opasno da se osakati propusna moc.

    kao odgovor na: Tranzicja uspela koliko vidim :) #44896
    LYb
    Učesnik

    Uh, ja nemogu da se naviknem nikako… mada dobro, vidim da su svi zadovoljno, pa necu da vam kvarim veselje 🙂

Gledanje 681 članaka - 681 do 690 (od 1,861 ukupno)