Re: Optimising NFS for system files
Wojciech Puchar wrote: nfsserver# time tar -cf - clientusr-amd64 > /dev/null 5.001u 12.147s 1:23.92 20.4%69+1369k 163345+0io 0pf+0w client9# time tar -cf - /usr > /dev/null tar: Removing leading '/' from member names 3.985u 19.779s 4:32.47 8.7% 74+1457k 0+0io 0pf+0w Note : clientusr-amd64 is around 1.3GB and is the same directory exported to client9 /usr with nfs. it's FAST. what's wrong? First thing that may be wrong is the understanding of the time figures. The documentation is not clear about them and the -h option is not working : client6# time -h tar -cf - /usr > /dev/null -h: Command not found. 0.000u 0.000s 0:00.00 0.0% 0+0k 0+0io 0pf+0w The main thing is that the 3rd figures 1:23.92 and 4:32.47 seems to be the time i wait in front of the computer while it works (ok, i know, i should enjoy a beer, or hot coffee with this nice snow ;-) : client9# date ; time tar -cf - /usr > /dev/null ; date ; Wed Dec 31 08:23:59 CET 2008 tar: Removing leading '/' from member names 4.103u 19.651s 4:25.80 8.9% 74+1453k 0+0io 2pf+0w Wed Dec 31 08:28:25 CET 2008 and 08:28:25 - 08:23:59 = 00:04:26 is very close to 4:25.80. On server, it means : 1440MB / 84s = 17MB/s On client, that becomes : 1440MB / 266s = 5.4MB/s I know the disk is not very fast, but i would like the NFS layer not to add too much... I don't want my users to wait between 3 or 4 times more because computer is using NFS. I have plenty of cpu and bandwidth available : something is slowing the process that should not... But what ? How to diagnose NFS ? Where should i look in a logical diagnosis process ? Best regards -- Bernard DUGAS Mobile +33 615 333 770 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: well, blew it... sed or perl q again.
Hi Gary, Am Dienstag, 30. Dez 2008, 17:48:02 -0800 schrieb Gary Kline: > On Tue, Dec 30, 2008 at 10:16:33PM +0100, Bertram Scharpf wrote: > > Hi Gary, > > > > Am Dienstag, 30. Dez 2008, 11:31:14 -0800 schrieb Gary Kline: > > > The problem is that there are many, _many_ embedded > > > "http://whatever> Site in my hundreds, or > > > thousands, or files. I only want to delete the > > > "http://" lines, _not_ the other Href links. > > > > > > sed or perl? > > > > Ruby. Untested: > > > > $ ruby -i.bak -pe 'next if ~/href="([^"]*)"/i and $1 == > > "http://example.com";' somefile.html > > > > Probably you want to do something more sophisticated. > > no errors, but the new.htm is == new.htm.bak; in other words, > it looks like a partial match on just "http" fails. Don't > know why. i'm pretty sure the entire "http://foobar.com";> xxx > " > would do it. This is not FreeBSD-specific, though. I still wonder why you rely on lines just containing %r{^.*$} . Maybe you're doing a quick'n'dirty solution but I'm quite sure you won't get along with a one-liner. Bertram -- Bertram Scharpf Stuttgart, Deutschland/Germany http://www.bertram-scharpf.de ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Optimising NFS for system files
On 12/30/08, Michel Talon wrote: > > Bernard Dugas wrote: > > > So you din't think that if all files are already in RAM on server, i > > will save the drive access time ? > > > > Or do you think the NFS network access is so much slow that the disk > > access time is just marginal ? > > > > Do you think i should use something more efficient than NFS ? > > > The VM system in principle does a good job of keeping in memory files > which are frequently accessed, so you should not have to do anything > special, and moreover i don't think there exists something convenient > to force some files in memory (and this would be detrimental to the > globalthroughput of the server). > > As to NFS speed, you should experiment with NFS on TCP and run a large > number of nfsd on the server (see nfs_server_flags in rc.conf). For > example -n 6 or -n 8. Maybe also experiment with the readsize and > writesize. > Anyways, i don't think you can expect the same throughput > via NFS (say 10 MB/s, or more on Gig ethernet) as on a local disk > (40 MB/s or more). i disagree. i have recently installed a NAS by slapping FreeNAS on a relative old server ( P4 2.8Ghz ) and experimented with lots of stuff because i was disappointed with the througput. spoiler: 1st try 30MB/s, last try 82MB/s. hardware server: - intel server p4 3ghz, 1GB memory - onboard intel 1Gb fxp nic - 2 x barracuda 750GB disks - hp procurve 3500zl( ? ) - OS: Freebsd 6.2 ( FreeNAS ) hardware linux workstation: - 2 x dual core, 2GB memory workstation - onboard intel 1Gb nic - 3 250GB disks - OS: Ubuntu 8.10 hardware windows workstation: - same - OS: Windows Server 2003 First installation - FreeNAS, ignorant as i was: chose JBOD as disk-configuration. This is Just a Bunch Of Disks, it just concats all the ( 2 pcs ) drives into 1 big volume. - Tested throughput(cifs/samba), got about 40MB/s on my linux box. Tested on the windows box: about 33MB/s. - Above measurements where achieved only after jumbo-frames and send-receive-buffer optimalisations ( won about 10% ) I was heavily disappointed with the results: i had installed a couple of NAS-systems, which could easily reach 80MB/s or 140MB/s with two nic's trunked. To make a long story short: with Gigabit networking it is not the network which is the bottle-neck: it is the local access to disks. So you need to use lots of disks. So instead of JBOD you need to configure RAID0, RAID1 on the file server etc to maximize disk throughput. That's why the NAS-systems performed so well: they had 4 disks each. - Second installation - FreeNAS, RAID0 - Tested throughput ( to local RAID0 ): - ftp: 82MB/s - nfs: 75MB/s - cifs/samba: 42MB/s Confused by the performance of cifs, i configured jumboframes, large send/receive buffers for cifs/samba, freenas-tuning-opting, polling etc. To no avail, there seems to be another limit to cifs/samba performance ( FreeNAS has an optimized smb.conf btw). Test issues ( things that get you confused ) - if you expect to be able to copy a file at Gigabit speeds, you need to be able to write as fast to your local disk as well. So to reliable test SAN/NAS performance at Gigabit speeds you need RAID at the server and at the client. Or write to /dev/null - if you repeatedly test with the same file, it will get cached into memory of the NAS. so you won't be testing troughput disk->network->disk anymore: you are testing NAS-memory->network->disk. I was testing with ubuntu-iso's, but with 1GB of memory, ISO's get cached as well. - if you repeatedly test with the same file, and you have enough local memory, and you test with nfs or cifs/samba, the file will get cached locally as well. this results into transfer-speeds to /dev/null exceeding 100MB/s ( Gigabit speeds ). i have observed transfer speeds to /dev/null of 400MB/s! The funny thing is i started this DIY-NAS with FreeNAS because we had a cheap commercial NAS with 4 disks ( raid 5 ). We have had performance troubles at 100Mbit, repeated authentication trouble ( integration with MSAD ), and when we upgraded our network to Gigabit, it only performed at 11MB/s! We now have a NAS that performs faster than local disk. We plan to use it run development-virtual-machines on. With Gigabit ethernet the network isn't the problem anymore: it's disks. You need as much as you can get your hands on. About your question about memory management: it is not needed and you don't want it. tune nics, filesystems, memory, nfs-options and disks. regards, usleep -- > > > Michel TALON > > > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscr...@freebsd.org" > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-
Re: well, blew it... sed or perl q again.
On Tue, Dec 30, 2008 at 10:16:33PM +0100, Bertram Scharpf wrote: > Hi Gary, > > Am Dienstag, 30. Dez 2008, 11:31:14 -0800 schrieb Gary Kline: > > The problem is that there are many, _many_ embedded > > "http://whatever> Site in my hundreds, or > > thousands, or files. I only want to delete the > > "http://" lines, _not_ the other Href links. > > > > sed or perl? > > Ruby. Untested: > > $ ruby -i.bak -pe 'next if ~/href="([^"]*)"/i and $1 == > "http://example.com";' somefile.html > > Probably you want to do something more sophisticated. > > Bertram > Hi Bertram, Well, after about 45 minutes of mousing cut/paste/edit, plus editing scripts, i ain't there yet. if i use the perl -e 'print unless "/m/http:/" || eof; close ARGV if eof' *.htm no errors, but the new.htm is == new.htm.bak; in other words, it looks like a partial match on just "http" fails. Don't know why. i'm pretty sure the entire "http://foobar.com";> xxx " would do it. roland, the dbl quote were necessary it seems. maybe i'll try parens. gary > > -- > Bertram Scharpf > Stuttgart, Deutschland/Germany > http://www.bertram-scharpf.de -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org The 2.17a release of Jottings: http://jottings.thought.org/index.php ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: iwi on 7-STABLE
Peter Harrison wrote: > Tuesday, 30 December 2008 at 23:49:23 +0100, Per olof Ljungmark said: > >> Hi all, >> >> Here I am away with the family visiting friends and I REALLY need >> to get the iwi if up and running. >> >> It's a recently updated system (7.1RC2). Read the man pages, tried >> different variations on legal.intel_iwi.license_ack=1, iwi_load, >> firmware_load etc. in /boot/loader.conf but I cannot get a >> connection to the router. >> >> It used to work on this box with my basic config, a Thinkpad T42, >> and it still does with XP. >> >> The interface is associated to the access point ok. >> >> Anyone who can hint me on how to debug this? Would sysctl >> debug.iwi.0=1 help? Of course, ANY information is of interest. Does >> iwi have a problem with certain routers? >> >> Sorry, no config files, I'm without connectivity when booting >> FreeBSD... >> >> Any help appriciated! > > I don't know whether iwi has issues with particular routers, however > I do have it working on 7-STABLE i386 without difficulty. > > Does it help to see the relevant bits from my config? > > /boot/loader.conf: > > if_iwi_load=YES wlan_load=YES firmware_load=YES iwi_bss_load=YES > iwi_ibss_load=YES iwi_monitor_load=YES legal.intel_iwi.license_ack=1 > > /etc/rc.conf: > > ifconfig_iwi0="inet 192.168.1.4 netmask 255.255.255.0 ssid > *** bssid 00:14:bf:94:1e:75 channel 11 wepmode on wepkey > deftxkey 1" > > (yes, I know I shouldn't still be using WEP). > > Works without difficult connecting to a Linksys router. > > I did have some difficulty I seem to recall when I turned off SSID > broadcast on the router. I'd suggest trying with all the security > turned off if you haven't already to see if you can connect at all, > and then reintroduce the security measures later. Thanks for your reply. Your config is identical to mine. I think something fishy is going on here but don't know what it is - yet.. The router is a Netgear WNR854T. -- per ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Optimising NFS for system files
nfsserver# time tar -cf - clientusr-amd64 > /dev/null 5.001u 12.147s 1:23.92 20.4%69+1369k 163345+0io 0pf+0w client9# time tar -cf - /usr > /dev/null tar: Removing leading '/' from member names 3.985u 19.779s 4:32.47 8.7% 74+1457k 0+0io 0pf+0w Note : clientusr-amd64 is around 1.3GB and is the same directory exported to client9 /usr with nfs. it's FAST. what's wrong? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
iwi on 7-STABLE
Hi all, Here I am away with the family visiting friends and I REALLY need to get the iwi if up and running. It's a recently updated system (7.1RC2). Read the man pages, tried different variations on legal.intel_iwi.license_ack=1, iwi_load, firmware_load etc. in /boot/loader.conf but I cannot get a connection to the router. It used to work on this box with my basic config, a Thinkpad T42, and it still does with XP. The interface is associated to the access point ok. Anyone who can hint me on how to debug this? Would sysctl debug.iwi.0=1 help? Of course, ANY information is of interest. Does iwi have a problem with certain routers? Sorry, no config files, I'm without connectivity when booting FreeBSD... Any help appriciated! Thanks, -- per ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: well, blew it... sed or perl q again.
On Tue, Dec 30, 2008 at 10:16:42PM +0100, Roland Smith wrote: > On Tue, Dec 30, 2008 at 12:51:31PM -0800, Gary Kline wrote: > > On Tue, Dec 30, 2008 at 09:16:23PM +0100, Roland Smith wrote: > > > On Tue, Dec 30, 2008 at 11:31:14AM -0800, Gary Kline wrote: > > > > The problem is that there are many, _many_ embedded > > > > "http://whatever> Site in my hundreds, or > > > > thousands, or files. I only want to delete the > > > > "http://" lines, _not_ the other Href links. > > > > > > > > Which would be best to use, given that a backup is critical? > > > > sed or perl? > > > > > > IMHO, perl with the -i option to do in-place editing with backups. You > > > could also use the -p option to loop over files. See perlrun(1). > > > > > > Roland > > > > > > All right, then is this the right syntax. In other words, do > > I need the double quotes to match the "http:" string? > > > > perl -pi.bak -e 'print unless "/m/http:/" || eof; close ARGV if eof' * > > You don't need the quotes (if the command doesn't contain anything that > your shell would eat/misuse/replace). See perlop(1). i have, thanks; getting more clues... . > > This will disregard the entire line with a URI in it. Is this really > what you want? exactly; anything that has http://WHATEVER i do not want to copy. the slight gotcha is if the LIne // tag is on the folowing line. but in most cases the whole anchor, close-anchor of these junk lines is on one line. ...i know a closing tag does nothing; it's just sloppy markup. > > Copy some of the files you want to scrub to a separate directory, and > run tests to see if your script works: > > mkdir mytest; cp foo mytest/; cd mytest; perl -pi.bak ../scrub.pl foo > diff -u foo foo.bak thanks much to you and giorgos. i thought about doing this by-hand, but only for about 0.01s! gary > > Roland > -- > R.F.Smith http://www.xs4all.nl/~rsmith/ > [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] > pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org The 2.17a release of Jottings: http://jottings.thought.org/index.php ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Optimising NFS for system files
Matthew Seaman wrote: It's 'mtu ' not '-mtu ' I'm confused, thanks so much ! There was no option without - in my old unix time ;-) Thanks to you, it seems that my max mtu is 9216 on em : client9# ifconfig em1 mtu 9216 client9# ifconfig em1 mtu 9217 ifconfig: ioctl (set mtu): Invalid argument Max mtu is changing on re : nfsserver# ifconfig re0 mtu 1504 nfsserver# ifconfig re0 mtu 1505 ifconfig: ioctl (set mtu): Invalid argument But another re accept 7422 : client6# ifconfig re0 mtu 7422 client6# ifconfig re0 mtu 7423 ifconfig: ioctl (set mtu): Invalid argument It seems that only testing can give the limit, this is not documented. Best regards, -- Bernard DUGAS Mobile +33 615 333 770 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: well, blew it... sed or perl q again.
On Tue, Dec 30, 2008 at 11:07:05PM +0200, Giorgos Keramidas wrote: > On Tue, 30 Dec 2008 12:51:31 -0800, Gary Kline wrote: > > All right, then is this the right syntax. In other words, do > > I need the double quotes to match the "http:" string? > > > > perl -pi.bak -e 'print unless "/m/http:/" || eof; close ARGV if eof' * > > Close, but not exactly right... > > You have to keep in mind that the argument to -e is a Perl expression, > i.e. something you might type as part of a script that looks like this: > > #!/usr/bin/perl > > while () { > YOUR-EXPRESSION-HERE; > print $_; > } > > One of the ways to print only the lines that do *not* match the > "http://"; pattern is: > > print unless (m/http:\/\//); > > Note how the '/' characters that are part of the m/.../ expression need > extra backslashes to quote them. You can avoid this by using another > character for the m/.../ expression delimiter, like: i've used '%' rather than bangs because i wasn't sure if the bang might make the shell have a fit; great to know it won't:_) [i try to avoid escapes when i can... .] > > print unless (m!http://!); > > But you are not still done. The while loop above already contains a > print statement _outside_ of your expression. So if you add this to a > perl -p -e '...' invocation you are asking Perl to run this code: > > #!/usr/bin/perl > > while () { > print unless (m!http://!); > print $_; > } > > Each line of input will be printed _anyway_, but you will be duplicating > all the non-http lines. Use -n instead of -p to fix that: > > perl -n -e 'print unless (m!http://!)' > ahhhm, that's what happened last night. i would up with dup lines (2) pointing me to different links. had no clue. fortunately i had the .bak! > A tiny detail that may be useful is that "http://"; is not required to be > lowercase in URIs. It may be worth adding the 'i' modifier after the > second '!' of the URI matching expression: > > perl -n -e 'print unless (m!http://!i)' > > Once you have that sort-of-working, it may be worth investigating more > elaborate URI matching regexps, because this will match far too much > (including, for instance, all the non-URI lines of this email that > contain the regexp example itself). i shall check try a grep -ri http * >/usr/tmp/g.out and see what turns up. thanks much, gary > -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org The 2.17a release of Jottings: http://jottings.thought.org/index.php ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Optimising NFS for system files
Wojciech Puchar wrote: This is a Gbps network with only 1 switch between nfs server and client, with less than 0.2ms ping. So bandwidth should not be a it should work with near-wire speed on 100Mbit clients. Server and clients are 1Gbps. But i have a 4 factor of performance for reading only ... nfsserver# time tar -cf - clientusr-amd64 > /dev/null 5.001u 12.147s 1:23.92 20.4%69+1369k 163345+0io 0pf+0w client9# time tar -cf - /usr > /dev/null tar: Removing leading '/' from member names 3.985u 19.779s 4:32.47 8.7% 74+1457k 0+0io 0pf+0w Note : clientusr-amd64 is around 1.3GB and is the same directory exported to client9 /usr with nfs. I have tried on 7.1-RC1 and 7.1-RC2, with amd64 architecture. CPU don't seem to be the limiting factor, more than 80% idle on server, they are either Core2duo on nfsserver : Dec 23 04:52:18 nfsserver kernel: CPU: Intel(R) Celeron(R) CPU E1200 @ 1.60GHz (1600.01-MHz K8-class CPU) Dec 23 04:52:18 nfsserver kernel: Origin = "GenuineIntel" Id = 0x6fd Stepping = 13 or on client9 : /var/log/messages.3:Dec 29 12:21:20 client9 kernel: CPU: Intel(R) Core(TM)2 Duo CPU E4500 @ 2.20GHz (2200.01-MHz K8-class CPU) If anybody can help to look at right places... ? How may i divide the problem ? Or is my simple test wrong ? I use a tar directed to /dev/null to avoid any writing. Best regards, -- Bernard DUGAS Mobile +33 615 333 770 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Optimising NFS for system files
Bernard Dugas wrote: But : nfsserver# ifconfig re0 -mtu 7422 ifconfig: -mtu: bad value nfsserver# ifconfig re0 -mtu 7421 ifconfig: -mtu: bad value Syntax error on the ifconfig command line: % ifconfig de0 de0: flags=8843 metric 0 mtu 1500 [...] % sudo ifconfig de0 mtu 1460 % ifconfig de0 de0: flags=8843 metric 0 mtu 1460 [...] % sudo ifconfig de0 mtu 1500 % sudo ifconfig de0 -mtu 1460 ifconfig: -mtu: bad value It's 'mtu ' not '-mtu ' Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW signature.asc Description: OpenPGP digital signature
Re: well, blew it... sed or perl q again.
On Tue, Dec 30, 2008 at 12:51:31PM -0800, Gary Kline wrote: > On Tue, Dec 30, 2008 at 09:16:23PM +0100, Roland Smith wrote: > > On Tue, Dec 30, 2008 at 11:31:14AM -0800, Gary Kline wrote: > > > The problem is that there are many, _many_ embedded > > > "http://whatever> Site in my hundreds, or > > > thousands, or files. I only want to delete the > > > "http://" lines, _not_ the other Href links. > > > > > > Which would be best to use, given that a backup is critical? > > > sed or perl? > > > > IMHO, perl with the -i option to do in-place editing with backups. You > > could also use the -p option to loop over files. See perlrun(1). > > > > Roland > > > All right, then is this the right syntax. In other words, do > I need the double quotes to match the "http:" string? > > perl -pi.bak -e 'print unless "/m/http:/" || eof; close ARGV if eof' * You don't need the quotes (if the command doesn't contain anything that your shell would eat/misuse/replace). See perlop(1). This will disregard the entire line with a URI in it. Is this really what you want? Copy some of the files you want to scrub to a separate directory, and run tests to see if your script works: mkdir mytest; cp foo mytest/; cd mytest; perl -pi.bak ../scrub.pl foo diff -u foo foo.bak Roland -- R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) pgpi5VZb94nko.pgp Description: PGP signature
Re: well, blew it... sed or perl q again.
Hi Gary, Am Dienstag, 30. Dez 2008, 11:31:14 -0800 schrieb Gary Kline: > The problem is that there are many, _many_ embedded > "http://whatever> Site in my hundreds, or > thousands, or files. I only want to delete the > "http://" lines, _not_ the other Href links. > > sed or perl? Ruby. Untested: $ ruby -i.bak -pe 'next if ~/href="([^"]*)"/i and $1 == "http://example.com";' somefile.html Probably you want to do something more sophisticated. Bertram -- Bertram Scharpf Stuttgart, Deutschland/Germany http://www.bertram-scharpf.de ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: well, blew it... sed or perl q again.
On Tue, 30 Dec 2008 12:51:31 -0800, Gary Kline wrote: > All right, then is this the right syntax. In other words, do > I need the double quotes to match the "http:" string? > > perl -pi.bak -e 'print unless "/m/http:/" || eof; close ARGV if eof' * Close, but not exactly right... You have to keep in mind that the argument to -e is a Perl expression, i.e. something you might type as part of a script that looks like this: #!/usr/bin/perl while () { YOUR-EXPRESSION-HERE; print $_; } One of the ways to print only the lines that do *not* match the "http://"; pattern is: print unless (m/http:\/\//); Note how the '/' characters that are part of the m/.../ expression need extra backslashes to quote them. You can avoid this by using another character for the m/.../ expression delimiter, like: print unless (m!http://!); But you are not still done. The while loop above already contains a print statement _outside_ of your expression. So if you add this to a perl -p -e '...' invocation you are asking Perl to run this code: #!/usr/bin/perl while () { print unless (m!http://!); print $_; } Each line of input will be printed _anyway_, but you will be duplicating all the non-http lines. Use -n instead of -p to fix that: perl -n -e 'print unless (m!http://!)' A tiny detail that may be useful is that "http://"; is not required to be lowercase in URIs. It may be worth adding the 'i' modifier after the second '!' of the URI matching expression: perl -n -e 'print unless (m!http://!i)' Once you have that sort-of-working, it may be worth investigating more elaborate URI matching regexps, because this will match far too much (including, for instance, all the non-URI lines of this email that contain the regexp example itself). ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re[2]: BUG! Performance loss with dynamic IPFW rules
Здравствуйте, KES. Вы писали 30 декабря 2008 г., 22:29:50: K> Здравствуйте, KES. K> Вы писали 30 декабря 2008 г., 21:47:40: K>> Здравствуйте, Questions. K>> 1 allow all from any to any via rl0 K>> 2 allow all from any to any via rl1 K>> 109 skipto 110 tcp from any to any 80 in recv $iface #split only http trafic K>> 109 skipto 200 all from any to any #do not split all other trafic K>> 110 check-state K>> 111 prob 0.5 skipto 131 in recv rl2 K>> 121 skipto 122 keep-state in recv rl2 K>> 123 setfib 0 proto all in recv rl2 K>> 125 skipto 150 proto all in recv rl2 K>> 131 skipto 132 keep-state in recv rl2 K>> 133 setfib 1 proto all in recv rl2 K>> 135 skipto 150 proto all in recv rl2 K>> I am connected on rl1. K>> INET is rl0, rl1 each 4Mbit/s K>> When I open many connections I get performance loss: K>> 1) Web pages are not opened (it seems flow at start goes through rl0 K>> and then goes rl1. EXPECTED: it flows only through one channel until K>> closed) K>> 2) I get about 2Mbit/s while downloading something K>> When I not open many flows I get 8Mbit/s while serfing K>> What is problem? K> Also another interesting behaviour. K> Packets with FIB 1 are outgoing through rl0 interface, but must out go K> via rl1. Why? I resolve problem!!! I have mpd5 on both interfaces rl0 and rl1. It starts PPPoE connection with my ISP. mpd5 has FIB 0. and has option to NAT packets. When I send packet from rl2 to INET it is: tcpdump -n -i rl1 22:51:40.917666 IP 192.168.9.80.3113 > 205.188.8.85.5190: P 1:27(26) ack 1461 win 65535 I add counters for 192.168.9.80 to ipfw 05500711 54217 count ip from any to any out xmit rl1 05510711 54217 count tag 1 ip from 192.168.9.80 to any out xmit rl1 05515 0 0 deny log ip from any to any out xmit rl1 not tagged 1 05890711 54217 allow untag 1 ip from any to any out xmit rl1 tagged 1 05899 0 0 deny log ip from any to any via rl1 05899 0 0 skipto 65000 ip from any to any Then packet is NATed by mpd (it runned with FIB 0) and out via rl0! instead of rl1 =( I think packet changes its FIB after NATing by process with different FIB than packet itself =( look tcpdump. kes# ifconfig rl0 rl0: flags=88d1 metric 0 mtu 1492 inet 92.113.11.221 --> 195.5.5.202 netmask 0x kes# ifconfig rl1 rl1: flags=88d1 metric 0 mtu 1492 inet 91.124.184.62 --> 195.5.5.209 netmask 0x tcpdump -n -i rl0 23:00:39.013565 IP 91.124.184.62 > 68.147.56.238: ICMP 91.124.184.62 udp port 59344 unreachable, length 36 23:00:39.043593 IP 91.124.184.62 > 69.251.246.7: ICMP 91.124.184.62 udp port 59344 unreachable, length 36 23:00:39.675315 IP 91.124.184.62 > 71.30.187.17: ICMP 91.124.184.62 udp port 10758 unreachable, length 36 23:00:39.818931 IP 91.124.184.62 > 117.11.167.163: ICMP 91.124.184.62 udp port 10758 unreachable, length 36 23:00:41.865974 IP 91.124.184.62 > 67.177.215.23: ICMP 91.124.184.62 udp port 10758 unreachable, length 36 23:00:43.289822 IP 91.124.184.62 > 88.84.178.189: ICMP 91.124.184.62 udp port 10758 unreachable, length 36 tcpdump -n -i rl1 23:00:39.013133 IP 68.147.56.238.23877 > 91.124.184.62.59344: UDP, length 103 23:00:39.042899 IP 69.251.246.7.46602 > 91.124.184.62.59344: UDP, length 103 23:00:39.675293 IP 71.30.187.17.61710 > 91.124.184.62.10758: UDP, length 103 23:00:39.818910 IP 117.11.167.163.12312 > 91.124.184.62.10758: UDP, length 98 23:00:41.865952 IP 67.177.215.23.24147 > 91.124.184.62.10758: UDP, length 98 23:00:43.289801 IP 88.84.178.189.60799 > 91.124.184.62.10758: UDP, length 101 23:00:43.419409 IP 93.80.208.87.61523 > 91.124.184.62.10758: S 3219801041:3219801041(0) win 8192 mailto:kes-...@yandex.ru ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: well, blew it... sed or perl q again.
On Tue, Dec 30, 2008 at 12:51:31PM -0800, Gary Kline wrote: > On Tue, Dec 30, 2008 at 09:16:23PM +0100, Roland Smith wrote: > > On Tue, Dec 30, 2008 at 11:31:14AM -0800, Gary Kline wrote: > > > The problem is that there are many, _many_ embedded > > > "http://whatever> Site in my hundreds, or > > > thousands, or files. I only want to delete the > > > "http://" lines, _not_ the other Href links. > > > > > > Which would be best to use, given that a backup is critical? > > > sed or perl? > > > > IMHO, perl with the -i option to do in-place editing with backups. You > > could also use the -p option to loop over files. See perlrun(1). > > > > Roland > > > All right, then is this the right syntax. In other words, do > I need the double quotes to match the "http:" string? > > perl -pi.bak -e 'print unless "/m/http:/" || eof; close ARGV if eof' * In years past I used fetch(1) to download the day's page from a comic strip site, awk to extract the URL of the day's comic strip, and fetch again to put a copy of the comic strip in my archive. This application sounds similar. -- David Kelly N4HHE, dke...@hiwaay.net Whom computers would destroy, they must first drive mad. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Optimising NFS for system files
Vince wrote: Trying to change mtu, but don't look easy, where can i find the possible range for ports ? MTU can be a pain, check what your switch supports, and the manpage for your network driver should say what MTU the nic supports. Thank you for the method ! It seems that em and re are not behaving like they should : re(4) says : "The 8169, 8169S and 8110S also support jumbo frames, which can be configured via the interface MTU setting. The MTU is limited to 7422, since the chip cannot transmit larger frames. " But : nfsserver# ifconfig re0 -mtu 7422 ifconfig: -mtu: bad value nfsserver# ifconfig re0 -mtu 7421 ifconfig: -mtu: bad value It should be a Realtek RTL 8111c but i don't know where to find the relationship to what pciconf -l gives me : r...@pci0:2:0:0: class=0x02 card=0xe0001458 chip=0x816810ec rev=0x02 hdr=0x00 em(4) says : "The maximum MTU size for Jumbo Frames is 16114." But : client9# ifconfig em1 -mtu 8192 ifconfig: -mtu: bad value with : Dec 30 16:02:36 client9 kernel: em1: Connection 6.9.6> port 0x7f00-0x7f1f mem 0xfd4e-0xfd4f irq 17 at device 0.0 on pci7 client1# ifconfig em0 -mtu 8192 ifconfig: -mtu: bad value with : Dec 30 18:10:38 client1 kernel: em0: Connection 6.9.6> port 0xfe00-0xfe1f mem 0xf dfc-0xfdfd,0xfdffe000-0xfdffefff irq 20 at device 25.0 on pci0 Now i understand better "MTU can be a pain" ;-) Best regards, -- Bernard DUGAS Mobile +33 615 333 770 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: well, blew it... sed or perl q again.
On Tue, Dec 30, 2008 at 09:16:23PM +0100, Roland Smith wrote: > On Tue, Dec 30, 2008 at 11:31:14AM -0800, Gary Kline wrote: > > The problem is that there are many, _many_ embedded > > "http://whatever> Site in my hundreds, or > > thousands, or files. I only want to delete the > > "http://" lines, _not_ the other Href links. > > > > Which would be best to use, given that a backup is critical? > > sed or perl? > > IMHO, perl with the -i option to do in-place editing with backups. You > could also use the -p option to loop over files. See perlrun(1). > > Roland All right, then is this the right syntax. In other words, do I need the double quotes to match the "http:" string? perl -pi.bak -e 'print unless "/m/http:/" || eof; close ARGV if eof' * gary > -- > R.F.Smith http://www.xs4all.nl/~rsmith/ > [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] > pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org The 2.17a release of Jottings: http://jottings.thought.org/index.php ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Performance loss with dynamic IPFW rules
Здравствуйте, KES. Вы писали 30 декабря 2008 г., 21:47:40: K> Здравствуйте, Questions. K> 1 allow all from any to any via rl0 K> 2 allow all from any to any via rl1 K> 109 skipto 110 tcp from any to any 80 in recv $iface #split only http trafic K> 109 skipto 200 all from any to any #do not split all other trafic K> 110 check-state K> 111 prob 0.5 skipto 131 in recv rl2 K> 121 skipto 122 keep-state in recv rl2 K> 123 setfib 0 proto all in recv rl2 K> 125 skipto 150 proto all in recv rl2 K> 131 skipto 132 keep-state in recv rl2 K> 133 setfib 1 proto all in recv rl2 K> 135 skipto 150 proto all in recv rl2 K> I am connected on rl1. K> INET is rl0, rl1 each 4Mbit/s K> When I open many connections I get performance loss: K> 1) Web pages are not opened (it seems flow at start goes through rl0 K> and then goes rl1. EXPECTED: it flows only through one channel until K> closed) K> 2) I get about 2Mbit/s while downloading something K> When I not open many flows I get 8Mbit/s while serfing K> What is problem? Also another interesting behaviour. Packets with FIB 1 are outgoing through rl0 interface, but must out go via rl1. Why? -- С уважением, KES mailto:kes-...@yandex.ru ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: SOLVED: Simple swap question
On Fri, Dec 19, 2008 at 01:04:26PM -0500, FreeBSD wrote: > Tom Worster a écrit : > >On 12/19/08 10:37 AM, "FreeBSD" wrote: > > > > > >>Because this server is monitored by Nagios and it emails me every hour a > >>warning because the swap is not 100% free (I know it's pretty extreme, > >>but I want to know if the system is swapping). > >> > > > >if a swap space is available and swapping not turned off, it seems > >reasonable to expect the OS to use it as it sees fit. > > > >rather than trying to tinker with the kernel's swapping policy on the fly > >every time you get a warning, perhaps think about either telling nagios not > >to worry about it or don't use swapping. i'd go with the former. but you > >say > >you want to ensure that swap doesn't get used -- so maybe get rid of the > >swap slice? > > > This server is very lightly used, so most of the time if the swap is > getting used it shows that something is going wrong. This simply is not true. It may once have correlated with some problem, but the fact that swap is used does not indicate any problem. It indicates that the system is working properly. > This warning > already proved usefull once, so I don't think I'm going to change it. I > don't want to mess with the kernel actions, but there was no reason to > keep this in swap. I understand that the kernel can't know that, that's > why I wanted to know the way to "reset" the swap. There is always a lot > of free or inactive RAM and, in normal condition, the swap should not be > used. It's been like that for months, so I think it's a good idea to be > notified if the swap is used. Really, before you go making that choice, you should study the ins and outs of how swap is used. You will find that some amount of use, even in a lightly used server, is desirable under almost all circumstances. jerry > > Martin > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org" > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: SOLVED: Simple swap question
On Fri, Dec 19, 2008 at 10:37:46AM -0500, FreeBSD wrote: > Jerry McAllister a écrit : > >On Thu, Dec 18, 2008 at 12:02:06PM -0500, FreeBSD wrote: > > > > > >>Daniel Bye a écrit : > >> > >>>On Thu, Dec 18, 2008 at 10:28:18AM -0600, Kirk Strauser wrote: > >>> > On Thursday 18 December 2008 09:16:10 FreeBSD wrote: > > >Hi everyone, > > > >I have a FreeBSD 7.0-Release server that started to swap after an error > >in a shell script (process spawning competition ;-) ). I killed the > >shell and the RAM is now OK. The problem is that the swap is still > >used. > >How can I "reset" the swap? > > > You don't. The system will handle it for you, I promise. :-) > > >>>And very well, too. > >>> > >>>You can prompt it to move pages back into RAM if you start using a > >>>swapped- > >>>out process again - say, for example, a quiescent word processor had been > >>>swapped out, you could get it back by raising it and starting to type. > >>> > >>>But as Kirk said, there really is no need. It's one of the kernel's many > >>>jobs, and I'm inclined to leave it get on with it! > >>> > >>>Dan > >>> > >>> > >>Thanks for your answer. I'm asking here because it's been several days > >>and there is still used swap for data that should never be used anymore. > >>If the kernel wants to keep it, why not move it to RAM now that there is > >>some free? > >> > > > >Why bother if it isn't being currently used? > > > >jerry > > > > > Because this server is monitored by Nagios and it emails me every hour a > warning because the swap is not 100% free (I know it's pretty extreme, > but I want to know if the system is swapping). > > I just tried > > swapoff -a ; swapon -a > > and it worked great. > > Thanks everyone for your answer. > > Martin > But, you want it to use swap. The system uses swap to stash stuff it is not currently using - where it can move it back in to use in a much more efficient, fast manner than re-looking it up again on filesystem disk. jerry > > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: well, blew it... sed or perl q again.
On Tue, Dec 30, 2008 at 11:31:14AM -0800, Gary Kline wrote: > The problem is that there are many, _many_ embedded > "http://whatever> Site in my hundreds, or > thousands, or files. I only want to delete the > "http://" lines, _not_ the other Href links. > > Which would be best to use, given that a backup is critical? > sed or perl? IMHO, perl with the -i option to do in-place editing with backups. You could also use the -p option to loop over files. See perlrun(1). Roland -- R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) pgp0lBFjVoSUO.pgp Description: PGP signature
Re: editing dhcpd.conf file
On Dec 30, 2008, at 11:53 AM, Pieter Donche wrote: Now, when someone already registered his laptop, and buys a new latop to replace the old (a different MAC address), can then omshell be used to record the change in the /usr/local/etc/dhcpd.conf file? Does omshell edit the /usr/local/etc/dhcpd.conf? Or is the only way to make changes to that file, to use an plain text editor, make the change manually and do a /usr/local/etc/rc.d/isc- dhcpd restart afterwards ? I hadn't heard about omshell or OMAPI until seeing your post. So my answer is based on no experience other than just reading its man pages. It appears that OMAPI does not edit the dhcpd.conf file. However, changes made through OMAPI will be reflected in dhcpd.leases with the line dynamic; indicating that the lease was created via OMAPI. Thus, in principle one could write a daemon that would watch dhcpd.leases for new dynamic leases and then call something that would edit dhcpd.conf. I don't know if anyone has put that together, but it would make sense to ask in places where OMAPI is discussed. Best of luck with this, Cheers, -j ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Performance loss with dynamic IPFW rules
Здравствуйте, Questions. 1 allow all from any to any via rl0 2 allow all from any to any via rl1 109 skipto 110 tcp from any to any 80 in recv $iface #split only http trafic 109 skipto 200 all from any to any #do not split all other trafic 110 check-state 111 prob 0.5 skipto 131 in recv rl2 121 skipto 122 keep-state in recv rl2 123 setfib 0 proto all in recv rl2 125 skipto 150 proto all in recv rl2 131 skipto 132 keep-state in recv rl2 133 setfib 1 proto all in recv rl2 135 skipto 150 proto all in recv rl2 I am connected on rl1. INET is rl0, rl1 each 4Mbit/s When I open many connections I get performance loss: 1) Web pages are not opened (it seems flow at start goes through rl0 and then goes rl1. EXPECTED: it flows only through one channel until closed) 2) I get about 2Mbit/s while downloading something When I not open many flows I get 8Mbit/s while serfing What is problem? -- С уважением, KES mailto:kes-...@yandex.ru ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
well, blew it... sed or perl q again.
Guys, Someone send a sed website that i thought i had bookmarked on firefox3. I don't see it in history; it is not b'marked. This question may not be do-able in sed, I don't know. BEen searching around for over an hour and a half; have tried things that have failed in my /tmp/test directory; time to ask the list. The problem is that there are many, _many_ embedded "http://whatever> Site in my hundreds, or thousands, or files. I only want to delete the "http://" lines, _not_ the other Href links. Which would be best to use, given that a backup is critical? sed or perl? tia, as always, gary -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org The 2.17a release of Jottings: http://jottings.thought.org/index.php ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Optimising NFS for system files
there is slowdown because network introduces slight delay, but few ms at most if network is made properly This is a Gbps network with only 1 switch between nfs server and client, with less than 0.2ms ping. So bandwidth should not be a it should work with near-wire speed on 100Mbit clients. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: How do I configure PHP to use curl?
On Dec 30, 2008, at 1:36 PM, Glen Barber wrote: On Tue, Dec 30, 2008 at 1:35 PM, Glen Barber wrote: On Tue, Dec 30, 2008 at 1:16 PM, John Almberg wrote: I just ran into something that has me stumped. It's probably a real newbie question, but I can't figure it out... I'm trying to add curl support to my PHP installation, but when I run 'make config' in the /usr/ports/lang/php5 directory, curl is not one of the very small set of options given. PHP has a million options, so how do you set one that is not in the 'make config' box? Have a look at lang/php5-extensions Whoops. My mailbox just updated; didn't realize this was answered. Sorry for that! This list is just t fast :-) It worked, by the way. And I upgraded to 5.2.8 while I was at it. I guess there were a couple of vulnerabilities with 5.2.7. Why does anyone use anything other than FreeBSD? -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: How do I configure PHP to use curl?
On Tue, Dec 30, 2008 at 1:35 PM, Glen Barber wrote: > On Tue, Dec 30, 2008 at 1:16 PM, John Almberg wrote: >> I just ran into something that has me stumped. It's probably a real newbie >> question, but I can't figure it out... >> >> I'm trying to add curl support to my PHP installation, but when I run 'make >> config' in the /usr/ports/lang/php5 directory, curl is not one of the very >> small set of options given. >> >> PHP has a million options, so how do you set one that is not in the 'make >> config' box? >> > > Have a look at lang/php5-extensions > > Whoops. My mailbox just updated; didn't realize this was answered. Sorry for that! -- Glen Barber "Tell me and I forget. Teach me and I remember. Involve me and I learn." - Benjamin Franklin ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: How do I configure PHP to use curl?
On Tue, Dec 30, 2008 at 1:16 PM, John Almberg wrote: > I just ran into something that has me stumped. It's probably a real newbie > question, but I can't figure it out... > > I'm trying to add curl support to my PHP installation, but when I run 'make > config' in the /usr/ports/lang/php5 directory, curl is not one of the very > small set of options given. > > PHP has a million options, so how do you set one that is not in the 'make > config' box? > Have a look at lang/php5-extensions -- Glen Barber "Tell me and I forget. Teach me and I remember. Involve me and I learn." - Benjamin Franklin ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: How do I configure PHP to use curl?
On Dec 30, 2008, at 1:26 PM, Michael Powell wrote: John Almberg wrote: I just ran into something that has me stumped. It's probably a real newbie question, but I can't figure it out... I'm trying to add curl support to my PHP installation, but when I run 'make config' in the /usr/ports/lang/php5 directory, curl is not one of the very small set of options given. PHP has a million options, so how do you set one that is not in the 'make config' box? -- John Try /usr/ports/lang/php5-extensions instead. This is where you add the million other options. Ah! I knew there was a simple answer. Thanks: John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: How do I configure PHP to use curl?
John Almberg wrote: > I just ran into something that has me stumped. It's probably a real > newbie question, but I can't figure it out... > > I'm trying to add curl support to my PHP installation, but when I run > 'make config' in the /usr/ports/lang/php5 directory, curl is not one > of the very small set of options given. > > PHP has a million options, so how do you set one that is not in the > 'make config' box? > > -- John > Try /usr/ports/lang/php5-extensions instead. This is where you add the million other options. -Mike ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: How do I configure PHP to use curl?
John Almberg wrote: I just ran into something that has me stumped. It's probably a real newbie question, but I can't figure it out... I'm trying to add curl support to my PHP installation, but when I run 'make config' in the /usr/ports/lang/php5 directory, curl is not one of the very small set of options given. PHP has a million options, so how do you set one that is not in the 'make config' box? -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org" cd /usr/ports/ftp/php5-curl make install restart your web server. Cheers! ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
How do I configure PHP to use curl?
I just ran into something that has me stumped. It's probably a real newbie question, but I can't figure it out... I'm trying to add curl support to my PHP installation, but when I run 'make config' in the /usr/ports/lang/php5 directory, curl is not one of the very small set of options given. PHP has a million options, so how do you set one that is not in the 'make config' box? -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
editing dhcpd.conf file
If one wants to set up a DHCP server in such a way that that a host with a given MAC-address will, at any time it connects, get the same IP address, one can record that fixed relation in the /usr/local/etc/dhcpd.conf file. Now, when someone already registered his laptop, and buys a new latop to replace the old (a different MAC address), can then omshell be used to record the change in the /usr/local/etc/dhcpd.conf file? Does omshell edit the /usr/local/etc/dhcpd.conf? Or is the only way to make changes to that file, to use an plain text editor, make the change manually and do a /usr/local/etc/rc.d/isc-dhcpd restart afterwards ? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: local copy of handbook
On Tue, 30 Dec 2008 13:33:45 +, Frank Shute wrote: >On Mon, Dec 29, 2008 at 11:52:57PM +0200, Giorgos Keramidas wrote: >>On Mon, 29 Dec 2008 20:27:17 +, Frank Shute wrote: >>> You can keep a local copy of the docs & update the sources for the >>> docs with csup but you have to regenerate them with a make command >>> after you have csup'd. >>> >>> The process is described within this page I just put up: >>> >>> http://www.shute.org.uk/misc/freebsd_uptodate.html >> >> Hi Masoom, >> We have been working on a patch for the Handbook that adds a short >> description of the same process. >> >> The patch has been recently posted to freebsd-doc, by Gabor Pali: >> >> http://lists.freebsd.org/pipermail/freebsd-doc/2008-December/015315.html >> >> Since you already have written something similar, do you think we can >> convince you to review the patch? It would be nice if you could help >> us improve it or make it easier to read, and use. > > Hi Giorgos, > I think your post was meant to be addressed to me as I wrote the above > guide. Yes. Sorry about that Frank :) > I'd be happy to review the patch that Gabor has written & if necessary > add or subtract from it. > > It will take me a bit of time to get up to speed with the mark-up & > review/grok the updating docs in the round. ATM, they certainly fall > short of including anything about updating a local copy of the docs. I can build a patched Handbook and upload it online, if that helps. Then you don't have to learn SGML to read it. Just let me know if you need it, and it's done. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: running asfiles on windowmaker...
Peter Boosten wrote: On 30 dec 2008, at 07:02, per...@pluto.rain.com wrote: Does anyone know how to run asfiles on windowmaker? Whereis its executable? (path) I have no idea what asfiles is, but I would assume `which asfiles' would tell you where it is located. ... unless it's not in PATH, and the OP is asking which directory needs to be added. asfiles is a port which installs into /usr/local, so I'd expect the executable to be in /usr/local/bin. If not, find /usr/local -name asfiles -print should find it. pkg_info -L package (replace "package" by actual package name) Shows all files installed by the port, assuming OP installed asfiles through the port. ... and in this case, he'd better pipe that to more(1) [17] Tue 30.Dec.2008 9:33:36 [kad...@archangel][~] pkg_info -L asfiles-1.0_2 | wc -l 231 ... or, even better, to head: [18] Tue 30.Dec.2008 9:33:50 [kad...@archangel][~] pkg_info -L asfiles-1.0_2 | head Information for asfiles-1.0_2: Files: /usr/local/man/man1/files.1.gz /usr/local/man/man3/regexp.3.gz /usr/local/bin/files /usr/local/include/bitmaps/MASK.xbm /usr/local/include/bitmaps/application.xbm /usr/local/include/bitmaps/autocad.xbm /usr/local/include/bitmaps/bargraph.xbm ... and now we know why looking for asfiles doesn't help much. Try running "files", Luiz. Kevin Kinsey -- If it's Tuesday, this must be someone else's fortune. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Optimising NFS for system files
Bernard Dugas wrote: > Wojciech Puchar wrote: >>> So you din't think that if all files are already in RAM on server, i >>> will save the drive access time ? >> >> FreeBSD automatically use all free memory as cache. > > OK > > > there is slowdown because network introduces slight delay, > > but few ms at most if network is made properly > > This is a Gbps network with only 1 switch between nfs server and > client, with less than 0.2ms ping. So bandwidth should not be a > problem, seems that NFSV3 is the limitation... > > Trying to change mtu, but don't look easy, where can i find the > possible range for ports ? > MTU can be a pain, check what your switch supports, and the manpage for your network driver should say what MTU the nic supports. mtu is set using ifconfig (or the ifconfig_$nic line in rc.conf) : from man ifconfig mtu n Set the maximum transmission unit of the interface to n, default is interface specific. The MTU is used to limit the size of packets that are transmitted on an interface. Not all interfaces support setting the MTU, and some interfaces have range restric- tions. from man em (for example) Support for Jumbo Frames is provided via the interface MTU setting. Selecting an MTU larger than 1500 bytes with the ifconfig(8) utility con- figures the adapter to receive and transmit Jumbo Frames. The maximum MTU size for Jumbo Frames is 16114. Vince > Best regards, ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Optimising NFS for system files
Wojciech Puchar wrote: So you din't think that if all files are already in RAM on server, i will save the drive access time ? FreeBSD automatically use all free memory as cache. OK > there is slowdown because network introduces slight delay, > but few ms at most if network is made properly This is a Gbps network with only 1 switch between nfs server and client, with less than 0.2ms ping. So bandwidth should not be a problem, seems that NFSV3 is the limitation... Trying to change mtu, but don't look easy, where can i find the possible range for ports ? Best regards, -- Bernard DUGAS Mobile +33 615 333 770 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Unable to modify sysid with Fdisk
In freebsd-questions Digest, Vol 244, Issue 1, Message 6 On Sun, 28 Dec 2008 17:45:52 +0100 David Scialom wrote: > Hello, > > It seems that it is impossible to modify the sysid with fdisk since FreeBSD > 6.2. I am actually using FreeBSD7.0. > When I want to modify my the sysid from 165(ufs) to 12(Fat32) i get the > message "Geom not found: da0" and no change is made: da0 is stock with sysid > = 165. The detail are provided below. I tried also to do the same from the > install FreeBSD CD without success. > > As someone a solution ? David, I've skimmed through this thread so far, but I didn't notice anyone suggest, well, not doing it that way. You want to change the MBR slice type of da0 from ufs to doswin32. Is that to put an msdosfs filesystem on it? Or is it already formatted as one of those? Is it a 1GB USB memory stick? Inserted but not mounted? Try just deleting the existing ufs slice (assuming it's on a disk not in use) then readd that same size slice (here, whole disk) as type 12. That shouldn't touch any slice's data at all, just the MBR (and you've already dd'd the whole GB raw da0 disk to backup just in case ..) I've used the fdisk wrapper in sysinstall to slice usb stick disks, sometimes with both msdos and ufs slices, just because I prefer that interface rather than maybe miscalculating an offset or size .. ymmv. And from the darkside, FDISK x: /MBR probably still works :) HTH, Ian ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Optimising NFS for system files
As to NFS speed, you should experiment with NFS on TCP and run a large number of nfsd on the server (see nfs_server_flags in rc.conf). For example -n 6 or -n 8. Maybe also experiment with the readsize and writesize. Anyways, i don't think you can expect the same throughput via NFS (say 10 MB/s, or more on Gig ethernet) as on a local disk anyway even relatively slow computer (like pentium 200) can easily saturate fast ethernet. mostly network speed is the limit. there is slowdown because network introduces slight delay, but few ms at most if network is made properly ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Optimising NFS for system files
less than 2Go to share and 2GO DDR2 is affordable. you don't have to. So you din't think that if all files are already in RAM on server, i will save the drive access time ? FreeBSD automatically use all free memory as cache. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: local copy of handbook
On Mon, Dec 29, 2008 at 11:52:57PM +0200, Giorgos Keramidas wrote: > > On Mon, 29 Dec 2008 20:27:17 +, Frank Shute wrote: > > You can keep a local copy of the docs & update the sources for the > > docs with csup but you have to regenerate them with a make command > > after you have csup'd. > > > > The process is described within this page I just put up: > > > > http://www.shute.org.uk/misc/freebsd_uptodate.html > > Hi Masoom, > > We have been working on a patch for the Handbook that adds a short > description of the same process. > > The patch has been recently posted to freebsd-doc, by Gabor Pali: > > http://lists.freebsd.org/pipermail/freebsd-doc/2008-December/015315.html > > Since you already have written something similar, do you think we can > convince you to review the patch? It would be nice if you could help > us improve it or make it easier to read, and use. Hi Giorgos, I think your post was meant to be addressed to me as I wrote the above guide. I'd be happy to review the patch that Gabor has written & if necessary add or subtract from it. It will take me a bit of time to get up to speed with the mark-up & review/grok the updating docs in the round. ATM, they certainly fall short of including anything about updating a local copy of the docs. I'll sign up for docs@ & then my impertinent/stupid questions about the docs can be answered therehopefully ;) Regards, -- Frank Contact info: http://www.shute.org.uk/misc/contact.html ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Optimising NFS for system files
Bernard Dugas wrote: > So you din't think that if all files are already in RAM on server, i > will save the drive access time ? > > Or do you think the NFS network access is so much slow that the disk > access time is just marginal ? > > Do you think i should use something more efficient than NFS ? The VM system in principle does a good job of keeping in memory files which are frequently accessed, so you should not have to do anything special, and moreover i don't think there exists something convenient to force some files in memory (and this would be detrimental to the globalthroughput of the server). As to NFS speed, you should experiment with NFS on TCP and run a large number of nfsd on the server (see nfs_server_flags in rc.conf). For example -n 6 or -n 8. Maybe also experiment with the readsize and writesize. Anyways, i don't think you can expect the same throughput via NFS (say 10 MB/s, or more on Gig ethernet) as on a local disk (40 MB/s or more). -- Michel TALON ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Optimising pxeboot disk size
add second echo to >>/var/log/messages ;) Hope not to forget one > ;-) But is there a system call or configuration to do that automatically ? I can see some echo in /etc/rc without any >>, and their result seems to go to /var/messages. I wish to learn to do clean scripting :-) actually i don't know how it's done in stardard rc scripts ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Optimising NFS for system files
Wojciech Puchar wrote: i can see a reading speed difference 4 time slower on client than on server (time tar -cf - /usr > /dev/null). I will play with jumbo MTU for network performance, but would anybody know if i can ask system files NFS exports to stay in server memory ? I have less than 2Go to share and 2GO DDR2 is affordable. you don't have to. So you din't think that if all files are already in RAM on server, i will save the drive access time ? Or do you think the NFS network access is so much slow that the disk access time is just marginal ? Do you think i should use something more efficient than NFS ? Best regards, -- Bernard DUGAS Mobile +33 615 333 770 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Optimising pxeboot disk size
Wojciech Puchar wrote: I couldn't find the hostname sent by dhcp, but found a way to find the ip address. just use hostname command. I did, but the answer is empty (remember this is before /etc/rc is run). Where is kept the data received by dhcp_client during pxe boot ? The only problem i have is that the "echo done" and other standard outputs are not visible in /var/log/messages. How can i keep them either in dmesg or /var/log/messages ? add second echo to >>/var/log/messages ;) Hope not to forget one > ;-) But is there a system call or configuration to do that automatically ? I can see some echo in /etc/rc without any >>, and their result seems to go to /var/messages. I wish to learn to do clean scripting :-) Best regards, -- Bernard DUGAS Mobile +33 615 333 770 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"