Re: sed/awk, instead of Perl
Walt Pawley wrote: At 9:59 AM +0200 8/22/08, Oliver Fromme wrote: wump$ ls -l Desktop/klog -rw-r--r-- 1 wump 1001 52753322 22 Aug 16:37 Desktop/klog wump$ time sed s/ .*// Desktop/klog kadr1 real0m10.800s user0m10.580s sys 0m0.250s wump$ time perl -pe 's/ .*//' Desktop/klog kadr2 real0m0.975s user0m0.700s sys 0m0.270s wump$ cmp kadr1 kadr2 wump$ Why disparity in execution speed? Beats me, but my G5's fans started to take off running the sed command. I don't think the Perl command took long enough to register thermally. Curious. sed outputs constantly, while perl does its output at the end at once. Try: time awk '{print $1}' Desktop/klog kadr3 awk also outputs at the end, however is much smaller than perl (and therefore much quicker). Peter -- http://www.boosten.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
ghostscript-gpl-8.62_3 from ports wont compile
Is anyone else having problems when trying to install ghostscript-gpl? [EMAIL PROTECTED]:~ # uname -a FreeBSD inferna.inferna.com.ar 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Jul 20 03:44:42 ART 2008 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/INFERNA i386 [EMAIL PROTECTED]:~ # cd /usr/ports/print/ghostscript-gpl [EMAIL PROTECTED]:/usr/ports/print/ghostscript-gpl # make install clean === Building for ghostscript-gpl-8.62_3 ... ... ./obj/../soobj/gdevl256.o(.text+0x73a): In function `gs_shared_init': : multiple definition of `gs_shared_init' ./obj/../soobj/gdevxalt.o(.text+0x1759): first defined here /usr/bin/ld: Warning: size of symbol `gs_shared_init' changed from 150 in ./obj/../soobj/gdevxalt.o to 38 in ./obj/../soobj/gdevl256.o ./obj/../soobj/gdevvglb.o(.text+0x995): In function `gs_shared_init': : multiple definition of `gs_shared_init' ./obj/../soobj/gdevxalt.o(.text+0x1759): first defined here gmake[1]: *** [bin/../sobin/libgs.so.8.62] Error 1 gmake[1]: Leaving directory `/usr/ports/print/ghostscript-gpl/work/ghostscript-8.62' gmake: *** [so] Error 2 *** Error code 2 Stop in /usr/ports/print/ghostscript-gpl. *** Error code 1 Stop in /usr/ports/print/ghostscript-gpl. [EMAIL PROTECTED]:/usr/ports/print/ghostscript-gpl # Should you need any extra info, please ask for it, I'll be glad to provide it. Any help will be greatly appreciated. -- Blessings Gonzalo Nemmi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Closing the terminal results in closing of application started by the terminal even if the processes is backgrounded
Hi, I started Firefox from an xterm. Then I pressed ctrl +Z And the I typed bg to background Firefox process. But when I close xterm firefox also closes. Why is that? thanks Siju ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: sed/awk, instead of Perl
Walt Pawley wrote: At 9:59 AM +0200 8/22/08, Oliver Fromme wrote: - The perl command you wrote above is pretty much a sed command anyway (except you incorrectly used non-portable regular expression syntax). Why use perl to execute a sed command? At the risk of beating this to death, I just happened to stumble on a real world example of why one might want to use Perl for sed-ly stuff. I wanted to pull off the accessor's address from each line of an Apache access log file. So, I figured after this discussion that sed was the way to go. Then I got curious and did the following: wump$ ls -l Desktop/klog -rw-r--r-- 1 wump 1001 52753322 22 Aug 16:37 Desktop/klog wump$ time sed s/ .*// Desktop/klog kadr1 real0m10.800s user0m10.580s sys 0m0.250s wump$ time perl -pe 's/ .*//' Desktop/klog kadr2 real0m0.975s user0m0.700s sys 0m0.270s wump$ cmp kadr1 kadr2 wump$ Why disparity in execution speed? Beats me, but my G5's fans started to take off running the sed command. I don't think the Perl command took long enough to register thermally. Curious. FWIW: I did this with an older version of Mac OS X, rather FreeBSD so it could easily not show the same results if I moved the log file to a FreeBSD box and did it there. Careful now. Have you accounted for the effect of the klog file being cached in VM rather than having to be read afresh from disk? It makes a very big difference in how fast it is processed. In order to get meaningful data for this sort of test you should do a dummy run or two of each command in fairly quick succession, and then repeat your test runs a number of times and look at the average and standard deviation of the execution times. You'll often see Student's T test mentioned -- that's a statistical test for assessing if results calculated from a limited number of samples represent different underlying distributions. It sounds horribly complicated, but nowadays we have computers to do all the difficult adding up and the result is just a number that tells you how well your supposition (that command 'a' is faster than command 'b') is supported by your results. There's a neat little script somewhere that will automate that, and even give you an ascii graph output, but I cannot for the life of me remember what it's called. Sorry. 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
space char shell script problem
I am running into a problem with the space character in filenames. For instance, If I want to run the script; for x in `ls` do echo $x done then filenames that have a space in them ie: john smith.jpg are processed by my script as two names, john and smith.jpg. What is the best way to deal with this type of space problem in the shell? I know that file names in quotes solves some problems but I can't tranfer that to my script. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Closing the terminal results in closing of application started by the terminal even if the processes is backgrounded
On Sat, Aug 23, 2008 at 01:36:32PM +0530, Siju George wrote: I started Firefox from an xterm. Then I pressed ctrl +Z And the I typed bg to background Firefox process. But when I close xterm firefox also closes. firefox still gets a SIGHUP since its controlling terminal is that xterm. (if it's suspended, that doesn't appear to change anything). -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: space char shell script problem
On Sat, 23 Aug 2008 06:19:42 -0400 David Banning [EMAIL PROTECTED] wrote: I am running into a problem with the space character in filenames. For instance, If I want to run the script; for x in `ls` do echo $x done for x in * ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Process in 'biowr' state
Hi, I have a problem with my alix2c2 router. It's a all-in-one board with compact flash card as root device. I setup the card from another machine, then booted it, and then wanted to install the manpage distribution. But that took forever, I always had to quit it. I then noticed that it downloads the files okay, but then when extracting there is a cpio process in state biowr, which I assume means blocked I/ O writing. I know that CF cards can be slow compared to hard disks, but after all it's a 120X speed card. According to the specification this is about 18 Mbytes/s. I made a simple test by just touching a lot of files, beyond 200 it gets really slow. The touch process then resides in biowr state, the CPU is 99% idle. --- bishop test # i=1; time while [ $i -lt 100 ]; do touch $i; i=$[i+1]; done; rm *; sync real0m1.530s user0m0.140s sys 0m0.459s bishop test # i=1; time while [ $i -lt 200 ]; do touch $i; i=$[i+1]; done; rm *; sync real0m3.016s user0m0.286s sys 0m0.922s bishop test # i=1; time while [ $i -lt 300 ]; do touch $i; i=$[i+1]; done; rm *; sync real0m19.218s user0m0.555s sys 0m1.270s bishop test # i=1; time while [ $i -lt 1000 ]; do touch $i; i=$[i+1]; done; rm *; sync real4m26.730s user0m1.690s sys 0m4.399s bishop test # --- Now, I'm not sure what to do about that. In top I see no resources that are exhausted. In syslog or dmesg there are no messages. Is it really possible that CF is that slow? Kernel messages are: --- Copyright (c) 1992-2008 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 7.0-RELEASE-p2 #0: Wed Jun 18 07:33:20 UTC 2008 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC Timecounter i8254 frequency 1193182 Hz quality 0 CPU: Geode(TM) Integrated Processor by AMD PCS (498.05-MHz 586-class CPU) Origin = AuthenticAMD Id = 0x5a2 Stepping = 2 Features=0x88a93dFPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CLFLUSH,MMX AMD Features=0xc040MMX+,3DNow!+,3DNow! real memory = 268435456 (256 MB) avail memory = 248811520 (237 MB) pnpbios: Bad PnP BIOS data checksum kbd0 at kbdmux0 K6-family MTRR support enabled (2 registers) ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413) hptrr: HPT RocketRAID controller driver v1.1 (Jun 18 2008 07:32:57) cpu0 on motherboard pcib0: Host to PCI bridge pcibus 0 on motherboard pci0: PCI bus on pcib0 pci0: encrypt/decrypt, entertainment crypto at device 1.2 (no driver attached) vr0: VIA VT6105M Rhine III 10/100BaseTX port 0x1000-0x10ff mem 0xe000-0xe0 vr0: Quirks: 0x2 miibus0: MII bus on vr0 ukphy0: Generic IEEE 802.3u media interface PHY 1 on miibus0 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto vr0: using obsoleted if_watchdog interface vr0: Ethernet address: 00:0d:b9:14:d9:e0 vr0: [ITHREAD] vr1: VIA VT6105M Rhine III 10/100BaseTX port 0x1400-0x14ff mem 0xe004-0xe0 vr1: Quirks: 0x2 miibus1: MII bus on vr1 ukphy1: Generic IEEE 802.3u media interface PHY 1 on miibus1 ukphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto vr1: using obsoleted if_watchdog interface vr1: Ethernet address: 00:0d:b9:14:d9:e1 vr1: [ITHREAD] ath0: Atheros 5212 mem 0xe008-0xe008 irq 9 at device 12.0 on pci0 ath0: [ITHREAD] ath0: using obsoleted if_watchdog interface ath0: Ethernet address: 00:80:48:57:c1:69 ath0: mac 10.5 phy 6.1 radio 6.3 isab0: PCI-ISA bridge port 0x6000-0x6007,0x6100-0x61ff,0x6200-0x623f, 0x9d00-00 isa0: ISA bus on isab0 atapci0: AMD CS5536 UDMA100 controller port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x30 ata0: ATA channel 0 on atapci0 ata0: [ITHREAD] ata1: ATA channel 1 on atapci0 ata1: [ITHREAD] ohci0: OHCI (generic) USB controller mem 0xefffe000-0xefffefff irq 15 at devi0 ohci0: [GIANT-LOCKED] ohci0: [ITHREAD] usb0: OHCI version 1.0, legacy support usb0: OHCI (generic) USB controller on ohci0 usb0: USB revision 1.0 uhub0: AMD OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 on usb0 uhub0: 4 ports with 4 removable, self powered ehci0: EHCI (generic) USB 2.0 controller mem 0xefffd000-0xefffdfff irq 15 at 0 ehci0: [GIANT-LOCKED] ehci0: [ITHREAD] usb1: EHCI version 1.0 usb1: companion controller, 4 ports each: usb0 usb1: EHCI (generic) USB 2.0 controller on ehci0 usb1: USB revision 2.0 uhub1: AMD EHCI root hub, class 9/0, rev 2.00/1.00, addr 1 on usb1 uhub1: 4 ports with 4 removable, self powered pmtimer0 on isa0 orm0: ISA Option ROM at iomem 0xe-0xea7ff pnpid ORM on isa0 ppc0: parallel port not found. sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 sio0: type 16550A, console sio0: [FILTER] sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled Timecounter TSC frequency 498054207 Hz quality 800 Timecounters tick every 1.000 msec hptrr: no controller detected. ad0:
Re: Upgrading firmware/bios/boot on Areca ARC-1210
On Fri, Aug 22, 2008 at 10:55:06PM +0200, Dominik Meister wrote: Hi Bob Bob Willcox [Fri, Aug 22, 2008 at 07:41:52AM -0500]: I posted this same question on freebsd-scsi a few days ago but got no response there so I thought I try here. Can't really answer your question but I've found the Areca support to be very responsive and helpful. Just fill out the form on http://www.areca.com.tw/support/ask_a_question.htm. They usually answer within a few hours. Thanks Dominik. I have asked them at that site but since it was on a Friday I may have missed them for the weekend. Perhaps Monday I'll have my answer. I'm just reluctant to do this upgrade w/o some confidence that I won't lose all of my data. Bob -- Bob Willcox If you try to please everybody, nobody will like it. [EMAIL PROTECTED] Austin, TX ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: space char shell script problem
RW writes: I am running into a problem with the space character in filenames. For instance, If I want to run the script; for x in `ls` do echo $x done for x in * There's the (poorly documented, IMO) IFS (internal field separator) shell variable. It's a string, normally set to space and tab; set it to newline and good things can happen. Robert Huff ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Closing the terminal results in closing of application started by the terminal even if the processes is backgrounded
On Sat, 23 Aug 2008 13:36:32 +0530, Siju George [EMAIL PROTECTED] wrote: Hi, I started Firefox from an xterm. Then I pressed ctrl +Z And the I typed bg to background Firefox process. But when I close xterm firefox also closes. Why is that? When the terminal application (xterm) is closed, the shell (csh) contained in this terminal session closes as well, and it causes all processes that run in this shell (firefox) to close as well via a signal (SIGHUP). Suspending (Ctrl+Z) and returning background jobs (bg) does not matter to the Firefox browser, it keeps running as long as the shell it has been started from is running. In order to prevent firefox from being closed when the starting terminal session is closed, start it via % firefox It will then eventually put status messages to this xterm, but the shell is free again to accept commands. Another possibility would be to use detach (from the ports), but this program is usually used when you want to keep running a program after you've logged out. -- Polytropon From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: space char shell script problem
On Sat, 23 Aug 2008 06:19:42 -0400, David Banning [EMAIL PROTECTED] wrote: I am running into a problem with the space character in filenames. For instance, If I want to run the script; for x in `ls` do echo $x done then filenames that have a space in them ie: john smith.jpg are processed by my script as two names, john and smith.jpg. What is the best way to deal with this type of space problem in the shell? The best way is not to use spaces in filenames; underscores perform their purpose very well without making things more complicated. :-) To iterate over files, I would not use `ls`, instead, I would let the shell do the expansion of * for me, as it has already been suggested. Because the file names x iterates contain spaces, be very (!) careful to assure that the applications you call with these filenames get the spaces correctly masked, either put the filename in quotes or substituts by \ . You would have won nothing when the application you call with the filename interpretes it as an argument list with two elements. for x in *; do echo ${x} done Replace the middle line with any program call you want. -- Polytropon From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: space char shell script problem
On Sat, Aug 23, 2008 at 04:09:57PM +0200, Polytropon wrote: On Sat, 23 Aug 2008 06:19:42 -0400, David Banning [EMAIL PROTECTED] wrote: I am running into a problem with the space character in filenames. For instance, If I want to run the script; for x in `ls` do echo $x done then filenames that have a space in them ie: john smith.jpg are processed by my script as two names, john and smith.jpg. What is the best way to deal with this type of space problem in the shell? The best way is not to use spaces in filenames; underscores perform their purpose very well without making things more complicated. :-) spaces won't go away, and since they're legal in filenames, one may as well handle them. To iterate over files, I would not use `ls`, instead, I would let the shell do the expansion of * for me, as it has already been suggested. Because the file names x iterates contain spaces, be very (!) careful to assure that the applications you call with these filenames get the spaces correctly masked, either put the filename in quotes or substituts by \ . You would have won nothing when the application you call with the filename interpretes it as an argument list with two elements. A script like #!/bin/sh for x in $@ do echo $x done handles quoting nicely enough (for spaces, anyway). ls will translate some non-printing characters to printable; the 'find' program is a better alternative if one must derive the list inside the program. for x in *; do echo ${x} done Replace the middle line with any program call you want. -- Polytropon From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
segmentation fault in claws-mail and firefox
Hello, I'm having an odd problem. When logged into a kde or kde4 session both of these programs work with no errors. When logged into icewm both of these have a segmentation fault with no errors. My guess is some required library is not in the path for these gtk programs, yet they work in kde. I wondered if anyone had a more specific notion, or knew what was happening. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: space char shell script problem
On Sat, 23 Aug 2008 10:16:36 -0400, Thomas Dickey [EMAIL PROTECTED] wrote: spaces won't go away, and since they're legal in filenames, one may as well handle them. Well, it's completely possible to create a file name like: This is my *favourite* photo from Cats \ by Bob Jane / my wife ~ 2008 `musical'.JPG What a fun handling this. :-) Call me old fashioned, but I don't mind making things more complicated than it should be. The space character is the command argument separator, as well as / is the root directory and * is everything. Applications like xmms can even replace the _ by a space when showing the filename of an mp3 file (given that no ID3 tag is provided). So I avoid spaces generally, and when I get files with spaces, I do convert the names automatically. A script like #!/bin/sh for x in $@ do echo $x done handles quoting nicely enough (for spaces, anyway). ls will translate some non-printing characters to printable; the 'find' program is a better alternative if one must derive the list inside the program. That's correct; find can provide file names including paths and can furthermore explude directories from being in the list (-type f). In your script, $x contains the filename with spaces and should be passed as one value to the program called. -- Polytropon From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Tailing logs
DAve wrote: DAve wrote: I would love to have a way to tail a log, like piping to grep, except I see every line and the lines I would normally grep for are highlighted. That would be cool. Anyone know of a bash command or tool that will do this? Side note, I am tailing sendmail after changes to my outbound queue runners. I want to highlight my sm-mta-out lines but still see all lines. DAve Thank you all, I got what I needed! DAve I do this commonly to catch the lines with the word Building in them, from a file build.out: tail -F build.out | grep --color=always Building When I get a free moment, I need to see about making that --color-always the default. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Tailing logs
On Sat, Aug 23, 2008 at 11:07:59AM -0400, Chuck Robey wrote: DAve wrote: DAve wrote: I do this commonly to catch the lines with the word Building in them, from a file build.out: tail -F build.out | grep --color=always Building When I get a free moment, I need to see about making that --color-always the default. Grep provides for a number of environmental variables, the above being one of them. For example: export GREP_COLOR='0;32' export GREP_OPTIONS='--color=auto' Perfectly acceptable for regular use, but especially useful to test pattern matching before finalising that script you're working on. -- George ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: space char shell script problem
Polytropon wrote: Well, it's completely possible to create a file name like: This is my *favourite* photo from Cats \ by Bob Jane / my wife ~ 2008 `musical'.JPG Um... actually you cannot create that as a filename on UFS. There are precisely two characters you cannot use in a filename. The first is ascii NULL, which marks end-of-string. The second, which you've seemingly run afoul of, is the directory separator character '/'. Everything else there is just fine and dandy though. Of course, if you name your files in Ugaritic or Cuneiform or Klingon or any of the other less frequently travelled UTF code pages, you'll need to put some work in to make them display correctly in your shell... 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: Tailing logs
On Sat, Aug 23, 2008 at 10:07 AM, Chuck Robey [EMAIL PROTECTED] wrote: DAve wrote: DAve wrote: I would love to have a way to tail a log, like piping to grep, except I see every line and the lines I would normally grep for are highlighted. That would be cool. Anyone know of a bash command or tool that will do this? Side note, I am tailing sendmail after changes to my outbound queue runners. I want to highlight my sm-mta-out lines but still see all lines. DAve Thank you all, I got what I needed! DAve I do this commonly to catch the lines with the word Building in them, from a file build.out: tail -F build.out | grep --color=always Building When I get a free moment, I need to see about making that --color-always the default. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] Look at ports/sysutils/multitail -- Noel Jones ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
diverting (some) log_in_vain messages
Which syslog facility.level is used for {tcp,udp}.log_in_vain messages? I want to see these as a rule, especially now while tuning a new system and firewall, but since running sendmail in earnest (even on our small scale) there are times when poor old /var/log/messages is rapidly losing much utility, being spammed by a) local resolver retries (lame servers and such) and b) connection attempts beyond sendmail's (low) set limits. These have been very useful for tuning the sendmail timeouts for a small server to drastically reduce these, but I've seen enough for now .. So I'd like to parse just log_in_vain messages, dumping the trivia to another file yet allowing the unexpected, more interesting stuff to go to /var/log/messages as usual, or to another file if that's a problem. Any hints or howtos welcome, even RT(which?)FS .. cheers, Ian (please cc me, I'm only subscribed to the -digest) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Closing the terminal results in closing of application started by the terminal even if the processes is backgrounded
On Sat, 23 Aug 2008 16:03:26 +0200 Polytropon [EMAIL PROTECTED] wrote: In order to prevent firefox from being closed when the starting terminal session is closed, start it via % firefox It will then eventually put status messages to this xterm, but the shell is free again to accept commands. Another possibility would be to use detach (from the ports), but this program is usually used when you want to keep running a program after you've logged out. There's also nohup(1) which I think does the same thing. -- Bruce Cran ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: sed/awk, instead of Perl
At 10:01 AM +0100 8/23/08, Matthew Seaman wrote: Walt Pawley wrote: At the risk of beating this to death, I just happened to stumble on a real world example of why one might want to use Perl for sed-ly stuff. ... snip ... wump$ ls -l Desktop/klog -rw-r--r-- 1 wump 1001 52753322 22 Aug 16:37 Desktop/klog wump$ time sed s/ .*// Desktop/klog kadr1 real0m10.800s user0m10.580s sys 0m0.250s wump$ time perl -pe 's/ .*//' Desktop/klog kadr2 real0m0.975s user0m0.700s sys 0m0.270s wump$ cmp kadr1 kadr2 wump$ Why disparity in execution speed? ... Careful now. Have you accounted for the effect of the klog file being cached in VM rather than having to be read afresh from disk? It makes a very big difference in how fast it is processed. No, I hadn't done any such accounting. So, wrote a little script you can surmise from the following output: wump$ sh -v spdtst time perl -pe 's/ .*//' Desktop/klog /dev/null real0m0.961s user0m0.740s sys 0m0.230s time sed s/ .*// Desktop/klog /dev/null real0m10.506s user0m10.270s sys 0m0.250s time awk '{print $1}' Desktop/klog /dev/null real0m2.333s user0m2.140s sys 0m0.180s time sed s/ .*// Desktop/klog /dev/null real0m10.489s user0m10.250s sys 0m0.230s time perl -pe 's/ .*//' Desktop/klog /dev/null real0m0.799s user0m0.580s sys 0m0.220s In order to get meaningful data for this sort of test you should do a dummy run or two of each command in fairly quick succession, and then repeat your test runs a number of times and look at the average and standard deviation of the execution times. ... Yeah, Hoyle would like that. But for me, I think the results are clear enough without all the messing with statistical computations. 10 to 1 or better is good enough for me to think there's some major difference. That said, it would appear that caching can make a difference - which is why I put the Perl invocation first ... so it would be running without the benefit of caching. But I don't believe I was entirely successful in that effort. The very first time I ran this, which was also the very first time in a whole day that the klog file had been accessed, the first Perl invocation took about 2 seconds of real time and still only 0.7 seconds of user time. I don't believe caching explains the execution speed disparity. It was mentioned that this function is made for awk, so I tried that as well. It is also evidently not as quick as Perl at doing the job. The time shown above is quite consistent with a number of other runs I've tried with awk. I suspect a real Perl internals maven could explain this. I have some ideas but they're conjecture. Perhaps some effort to improve execution efficiency in sed and awk would not be wasted? -- Walter M. Pawley [EMAIL PROTECTED] Wump Research Company 676 River Bend Road, Roseburg, OR 97470 541-672-8975 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
The FreeBSD Diary: 2008-08-03 - 2008-08-23
The FreeBSD Diary contains a large number of practical examples and how-to guides. This message is posted weekly to freebsd-questions@freebsd.org with the aim of letting people know what's available on the website. Before you post a question here it might be a good idea to first search the mailing list archives http://www.freebsd.org/search/search.html#mailinglists and/or The FreeBSD Diary http://www.freebsddiary.org/. -- Dan Langille BSDCan - http://www.BSDCan.org/ - BSD Conference ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Weird GEOM errors
Hi. ive had a freebsd7 box running zfs on 5 500gb hard drives for months upon months now with mostly good stability but every couple of minutes in my logs i get errors such as: kernel: GEOM: ad2: corrupt or invalid GPT detected. kernel: GEOM: ad2: GPT rejected -- may not be recoverable. on 2 disks, ad8 and ad2 any ideas why and how to fix? mostly just annoying. thanks. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
I NEED INSTALL D-LINK DUB-E100
Hi!! I have a laptop and my ethernet card is recognized how fwe and i cant to do the connect to Internet. I need connect for download the ports to do other things in FreeBSD. Also, I bought a D-link Dub-E100 and cant install, please, i need help me!! Thanks, Valeska Godoy ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Why /usr/local/etc???
Folks, This may have been covered too-often before, buy why can't *everything* related to /etc hang off /etc? I can create a symlink in /etc to /usr/local/etc named loc or local. Thing is, why this isn't done by default? gary -- Gary Kline [EMAIL PROTECTED] http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Why /usr/local/etc???
Gary Kline writes: This may have been covered too-often before, buy why can't *everything* related to /etc hang off /etc? I can create a symlink in /etc to /usr/local/etc named loc or local. Thing is, why this isn't done by default? Very short version: /etc = stuff installed by FreeBSD /usr/local/ete = stuff installed by third-party applications The exception is the _ENABLE variables for those third-party applications, which go in /etc/rc.conf so they can be started at system boot. Robert Huff ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Why /usr/local/etc???
On Sat, 23 Aug 2008 18:24:48 -0700, Gary Kline [EMAIL PROTECTED] wrote: Folks, This may have been covered too-often before, buy why can't *everything* related to /etc hang off /etc? I can create a symlink in /etc to /usr/local/etc named loc or local. Thing is, why this isn't done by default? Maybe you're coming from a Linux background, so this may be a valid question. To introduce, FreeBSD differs between just the OS, the things that you install from sysinstall first, and everything else, the things you install from the ports collection or from the precompiled packages. Things that do belong to the OS is located everywhere outside /usr/local, and everything else is located inside /usr/local, replicating the subtrees of bin/, lib/, include/, share/ and etc/. Summarized: In /etc there's the system's configuration, and in /usr/local/etc there are configurations and settings for ports and packages you added. As you may see, this is well intended. Feel free to read % man 7 hier for a more detailed explaination. -- Polytropon From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Virutual PC 2007 FBSD 6.3 hangs on install
I am trying to get Vitual PC Version 2007 to install FreeBSD as a guest system. I tried first with FBSD ver. 6.3 and that failed by hanging saying: Trying to mount root from ufs:/dev/md0 After looking on the web I found this mentioned in bug reports but did not see any fixes. Giving up on 6.3 I downloaded an iso image of FBSD 5.5 This time I got through the boot procedure and started a standard install from sysinstall. I got the disk labled and partitioned to / /var /usr and a swap but when I finished I got a few popup screens and finally one that said 'unable to make new root file system on /dev/ad0s1a' A few questions? Is anyone working to fix the problem with 6.3? Any sugestions as to what my problem might be with 5.5? Any version of FRSD known to work with Vitual PC ver. 2007? Does VMWare work with 6.3 and if so do I need VMWare Workstation or VMWare Player or Cheers, Charlie Reese ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Why /usr/local/etc???
On Sat, 23 Aug 2008 18:24:48 -0700 Gary Kline [EMAIL PROTECTED] wrote: Folks, This may have been covered too-often before, buy why can't *everything* related to /etc hang off /etc? I can create a symlink in /etc to /usr/local/etc named loc or local. Thing is, why this isn't done by default? Everything could be off / too but that's not how FreeBSD does it. See man 7 heir. Its a sketch of the FreeBSD filesystem hierarchy. Randy -- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
which linux emulator?
in ports there is fedora and gentoo. any opinions on preferences? -- In friendship, prad ... with you on your journey Towards Freedom http://www.towardsfreedom.com (website) Information, Inspiration, Imagination - truly a site for soaring I's ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
XFree86 instead of Xorg?
Hi! I'd like to ask if there is a way to use XFree86 instead of Xorg on FreeBSD 7 to provide basic X functionalities. A big problem I see are the dependencies of X applications. The reason why I ask: I've been using FreeBSD 5 and XFree86 4 for many years happily, my ATI Radeon 9000 RV250 had excellent driver support, 3D no problems. Since I was forced to upgrade to FreeBSD 7 due to a massive data loss, I have problems with Xorg 7. When X is started, it takes several seconds for the display to initialize - such an amount of time that the monitor switches off (no signal). Furthermore, X creates system load 1.00 -- 1.50%, this hasn't been the case with XFree86. Xorg uses the driver ati, the radeon module has been compiled into the kernel. Of course I know that I'm using ancient hardware that I cannot expect to run well with modern implementations of X, so I'd like to know if there's a way to use older X stuff on FreeBSD 7. (Sadly, the long startup of X wastes any speed improvement the FreeBSD 7 startup offered.) Furthermore, I'm having a problem with many of the applications that have switched from Gtk to Gtk 2 (sylpheed, xchat, gimp) running too slow (graphical effect delay, redrawing). My window manager is Windowmaker, I don't do anything special. Hardware: Intel Pentium 4, 2.0 GHz, Intel Board, 768 MB SDR-SDRAM drm0: ATI Radeon If RV250 9000 on vgapci0 ATI Technologies Inc RV250 Radeon 9000/9000 Pro (AGP) System: FreeBSD/i386 7.0-STABLE #0: Sat Aug 23 23:42:41 CEST 2008 xorg-7.3_1 xorg-drivers-7.3 xorg-libraries-7.3_1 xorg-server-1.4_4,1 Or just tell me that it's impossible and I should shut off and go buy new stuff. :-) -- Polytropon From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Top question! kdeinit, how come so many? Can I configure it down?
I notice that when running top, about 10 different kdeinit's are running. Is there a way to tone it down, and only have the minimum of them? I want to cut down on the memory usage, which takes up about 90% of the ram I have. In Love in Jesus Christ, Or Lord and Savior. For God so loved the world, that he gave his only *begotten Son, that whosoever believeth in him should not perish, but have everlasting life. --John 3:16 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: XFree86 instead of Xorg?
First of all, thanks for the quick reply. On Sun, 24 Aug 2008 03:23:34 +, Christopher Joyner [EMAIL PROTECTED] wrote: Maybe you could open your Xorg config file, and put in specific variables in there for the graphic mode you use. This would cut down on auto detection scripts. I don't have auto detection for regular X init. I did this only one time to see the new layout of xorg.conf, then put everything in it manually (e. g. Screen, Keyboard, Device Card0, Card1). This brings up another problem: With FreeBSD 5 + XFree86 my monitor, Eizo FlexScan F980 21 CRT, could have 1400x1050; that's not possible anymore with FreeBSD 7 + Xorg, only 1152x864 is available, even if I force certain modes (PrefferedMode and ModeLines), in this case the system isn't accessible anymore, and the screen shows a complete nonsense dimension (1200x600 or so). So my xorg.conf settings are completely standard stuff. I've played with xrandr and even got the desired mode for one time, but with a virtual screen (content scrolls). % xrandr Screen 0: minimum 320 x 200, current 1152 x 864, maximum 1400 x 1050 VGA-0 connected 1152x864+0+0 (normal left inverted right x axis y axis) 0mm x 0mm 1152x864 75.0*+ 1400x1050 74.8 60.0 1280x1024 85.0 75.0 60.0 1280x960 85.0 60.0 1152x768 54.8 1024x768 85.0 75.0 70.1 60.0 832x62474.6 800x60085.1 72.2 75.0 60.3 56.2 640x48085.0 72.8 75.0 59.9 720x40085.0 640x40085.1 640x35085.1 DVI-0 disconnected (normal left inverted right x axis y axis) S-video disconnected (normal left inverted right x axis y axis) % xvidtune Vendor: EIZO, Model: FlexScan F980 Num hsync: 1, Num vsync: 1 hsync range 0: 30.00 - 137.00 vsync range 0: 50.00 - 160.00 % gears libGL warning: 3D driver claims to not support visual 0x6b 2101 frames in 5.001 seconds = 420.116 FPS 2846 frames in 5.000 seconds = 569.200 FPS 3000 frames in 5.000 seconds = 600.000 FPS % geartrain libGL warning: 3D driver claims to not support visual 0x6b 1226 frames in 5.002 seconds = 245.102 FPS 1238 frames in 5.002 seconds = 247.501 FPS 1224 frames in 5.003 seconds = 244.653 FPS % gearbox libGL warning: 3D driver claims to not support visual 0x6b 147 frames in 5.029 seconds = 29.230 FPS 168 frames in 5.015 seconds = 33.500 FPS 168 frames in 5.019 seconds = 33.473 FPS Are these values realistic? In the hand book it tells you how to configure the X server. But I am only giving a suggestion on this, not fact. I did follow the handbook. X runs fine, but slow, read: it worked much faster before. I really do not think your hardware is the problem, but rather the configuration. I'm just asking because... it worked with XFree86, why can't it work the same way with Xorg? I update my software to make things faster, not slower. :-) -- Polytropon From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Virutual PC 2007 FBSD 6.3 hangs on install
I would suggest using the free version of vmware and possibly virtualbox. VMWare will work and I'm not sure about virtualbox. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: XFree86 instead of Xorg?
Using Xfree86 is possible but may require much manual configuration. I also have problems with firefox and claws-mail in windowmaker icewm, but not in kde3 or kde4. I suspect there is a library path issue. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]