Re: flash9 checklist
Sent by Vladimir Grebenschikov: I've seen temporary FF lockups with flashblock FF plugin enabled. Same here. Sometimes it works and some times any page containing flash will hang the entire browser. Doing a `killall npviewer.bin' (I use nspluginwrapper) will unfreeze the browser like nothing happened. You'll get the page -- but without the embedded flash, of course. I have only gotten Flash-9 to (mostly) work this morning -- thanks to nox' checklist, and have not yet been able to investigate, why it hangs on occasion... -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: flash9 checklist
Sent by Robert Huff: The problem is that while npviewer.bin is loading, it effectively hogs the CPU. It also chews up ~550 mb of RAM. Well, when it all works correctly, it starts quickly for me. But when there is a problem, no amount of waiting seems enough, so I doubt, it is the question of hogging or heaviness... I have a fairly beefy machine too -- 4Opterons, 6Gb of RAM, so when things work, they work quickly. -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: flash-9, 10 on FreeBSD
Sent by John Nielsen: I just updated to RELENG_7 (aka 7.1-PRERELEASE these days) on Monday and am able to use Flash 9 in native Firefox 3 with sound, no sound lag and no crashes so far. I have: FreeBSD 7.1-PRERELEASE #0: Mon Oct 27 18:31:37 EDT 2008 compat.linux.osrelease=2.6.16 linux_base-f8-8_8 firefox-3.0.3,1 linux-flashplugin-9.0r124_2 nspluginwrapper-1.0.0 Congratulations. i386 or amd64, though? -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
flash-9, 10 on FreeBSD
Hello! I'm having serious problems with Adobe's Flash 9 and 10 on my FreeBSD-7/amd64 system. If I try to use it directly with linux-firefox, the entire browser crashes quickly. If I try www/nspluginwrapper with a native browser, the wrapper-launched npviewer.bin seg-faults instead. Either way, the plugin does not work... It appears, there was some activity recently in trying to fix these problems (is it all in linprocfs/?) What is the current status? Thanks, -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: flash-9, 10 on FreeBSD
Sent by Glyn Millington: My solution was to install Wine and run the MS port of Firefox. So far it works flawlessly for me. This has two problems: 1. It requires a (licensed) Windows install handy. 2. The solution is only suitable for i386 -- not for amd64, which is what I'm using. -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: flash-9, 10 on FreeBSD
Sent by matt donovan: FreeBSD 7.1 should work with flash9 myself I had no luck so far but nox- does say it should work I'm using 7.1-PRERELEASE as of Sep 23 and it does not work (yet?) Juergen, please, confirm, that your fixes were committed after Sep 23 -- I'll be happy to rebuild/reboot in that case. Thank you very much! Yours, -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
gnash (Re: flash-9, 10 on FreeBSD)
Sent by Craig Butler: gnash all the way for me.. Does it work with YouTube? -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
sleeping without queue ?
Hello! My attempt to build openoffice.org-3 seems to be hanging. Pressing Ctrl-T produces: load: 0.11 cmd: tcsh 79759 [sleeping without queue] 0.00u 0.00s 0% 0k (tcsh is used by OOo's build-script). What is this sleeping without queue state, and why is process in it for so long? This is an 4-CPU amd64 system with 4Gb of RAM. Only 16% of the swap is currently in use and the box seems to be perfectly fine otherwise. Uptime is 55 days, two different X-sessions are functional... The kernel is FreeBSD 7.0-STABLE #0: Sat Mar 8 16:02:37. Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: sleeping without queue ?
Kris Kennaway написав(ла): Mikhail Teterin wrote: Hello! My attempt to build openoffice.org-3 seems to be hanging. Pressing Ctrl-T produces: load: 0.11 cmd: tcsh 79759 [sleeping without queue] 0.00u 0.00s 0% 0k (tcsh is used by OOo's build-script). What is this sleeping without queue state, and why is process in it for so long? This is an 4-CPU amd64 system with 4Gb of RAM. Only 16% of the swap is currently in use and the box seems to be perfectly fine otherwise. Uptime is 55 days, two different X-sessions are functional... The kernel is FreeBSD 7.0-STABLE #0: Sat Mar 8 16:02:37. Thanks! What is the process backtrace? Hard to say... The process ID 79759. According to ps(1), that PID exists: 79759 p6 DE+0:00,00 /bin/tcsh -fc /meow/ports/editors/openoffice.org-3/work/BEB300_m3/solver/300/unxfbsdx.pro/bin/makedepend @/tmp/mk2WUYYi ../../../unxfbsdx.pro/misc/s_addincol.dpcc According to gdb, it does not: gdb 79759 GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as amd64-marcel-freebsd...79759: No such file or directory. Interestingly, the file mentioned in the command-line -- the s_addincol.dpcc -- does not exist anywhere under /meow/ports/editors/openoffice.org-3/work -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: sleeping without queue ?
Jeremy Chadwick написав(ла): On Tue, Jul 22, 2008 at 12:13:25PM -0400, Mikhail Teterin wrote: Kris Kennaway написав(ла): Mikhail Teterin wrote: Hello! My attempt to build openoffice.org-3 seems to be hanging. Pressing Ctrl-T produces: load: 0.11 cmd: tcsh 79759 [sleeping without queue] 0.00u 0.00s 0% 0k (tcsh is used by OOo's build-script). What is this sleeping without queue state, and why is process in it for so long? This is an 4-CPU amd64 system with 4Gb of RAM. Only 16% of the swap is currently in use and the box seems to be perfectly fine otherwise. Uptime is 55 days, two different X-sessions are functional... The kernel is FreeBSD 7.0-STABLE #0: Sat Mar 8 16:02:37. What is the process backtrace? Hard to say... The process ID 79759. According to ps(1), that PID exists: 79759 p6 DE+0:00,00 /bin/tcsh -fc /meow/ports/editors/openoffice.org-3/work/BEB300_m3/solver/300/unxfbsdx.pro/bin/makedepend @/tmp/mk2WUYYi ../../../unxfbsdx.pro/misc/s_addincol.dpcc According to gdb, it does not: [...] Syntax appears wrong; gdb [program] 79759 would be what you want. Yes, indeed. The result is similar, though: % gdb /bin/tcsh 79759 [...] Attaching to program: /bin/tcsh, process 79759 ptrace: No such process. /meow/ports/79759: No such file or directory. Thanks, -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: sleeping without queue ?
Kris Kennaway написав(ла): Well, I mean kernel backtrace. Can I obtain that remotely and without restarting/panicking the box? Thanks, -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: sleeping without queue ?
Kris Kennaway написав(ла): Mikhail Teterin wrote: Kris Kennaway написав(ла): Well, I mean kernel backtrace. Can I obtain that remotely and without restarting/panicking the box? Thanks, kgdb on /dev/mem or procstat [EMAIL PROTECTED]:~ (107) kgdb /boot/kernel/kernel /dev/mem [...] (kgdb) bt #0 0x in ?? () Error accessing memory address 0x0: Bad address. Even less luck with procstat: [EMAIL PROTECTED]:~ (108) locate procstat [EMAIL PROTECTED]:~ (109) procstat procstat: Невідома команда. [EMAIL PROTECTED]:~ (110) man procstat No manual entry for procstat I'm sorry, but you'll need to be more specific. What should I type? Thanks, -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: sleeping without queue ?
Kostik Belousov написав(ла): Did you switched to the process before doing backtrace (using the proc pid command)? Ok, thanks. Did not know about this one. Here: ... (kgdb) proc 79759 (kgdb) bt #0 sched_switch (td=0xff01286dc000, newtd=0xff00010ce000, flags=2) at /var/src/sys/kern/sched_4bsd.c:928 #1 0x in ?? () #2 0x802f1108 in mi_switch (flags=678281216, newtd=0x2) at /var/src/sys/kern/kern_synch.c:442 #3 0x80318513 in sleepq_check_timeout () at /var/src/sys/kern/subr_sleepqueue.c:519 #4 0x80318c85 in sleepq_timedwait (wchan=0x80688408) at /var/src/sys/kern/subr_sleepqueue.c:597 #5 0x802f16a2 in _sleep (ident=0x80688408, lock=0x0, priority=0, wmesg=0x804f3059 vmo_de, timo=1) at /var/src/sys/kern/kern_synch.c:224 #6 0x8043036b in vm_object_deallocate (object=0xff0053024a90) at /var/src/sys/vm/vm_object.c:509 #7 0x8042920e in vm_map_delete (map=0xff0015ba4b60, start=18446742979242478224, end=140737488355328) at /var/src/sys/vm/vm_map.c:2315 #8 0x804293df in vm_map_remove (map=0xff0015ba4b60, start=0, end=140737488355328) at /var/src/sys/vm/vm_map.c:2423 #9 0x8042b813 in vmspace_exit (td=0xff01286dc000) at /var/src/sys/vm/vm_map.c:324 #10 0x802c8cff in exit1 (td=0xff01286dc000, rv=0) at /var/src/sys/kern/kern_exit.c:294 #11 0x802ca08e in sys_exit (td=Variable td is not available. ) at /var/src/sys/kern/kern_exit.c:98 #12 0x8045a700 in syscall (frame=0xb0d89c70) at /var/src/sys/amd64/amd64/trap.c:852 #13 0x8043f38b in Xfast_syscall () at /var/src/sys/amd64/amd64/exception.S:290 #14 0x00080095f34c in ?? () Previous frame inner to this frame (corrupt stack?) What is the exact version of the system ? Note that procstat appeared in the late RELENG_7. FreeBSD 7.0-STABLE #0: Sat Mar 8 16:02:37 EST 2008 Also, show the output of ps axl pid. UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIME COMMAND 0 79759 79758 0 96 0 016 - DE+ p60:00,00 /bin/tcsh -fc /meow/ports/editors/openoffice.org-3/work/BEB300_m3/solver/300/unxfbsdx.pro/bin/ma Yours, -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
strange file-permission problem
Hello! I've encountered a problem, which went ahead most of the things I know about Unix file permissions: [EMAIL PROTECTED]:run/dovecot/login (10) ls -l ssl-parameters.dat -rw-r- 2 root dovecot 230 Apr 13 00:33 ssl-parameters.dat [EMAIL PROTECTED]:run/dovecot/login (11) groups dovecot [EMAIL PROTECTED]:run/dovecot/login (12) id uid=143(dovecot) gid=9005(dovecot) groups=9005(dovecot) [EMAIL PROTECTED]:run/dovecot/login (13) cat ssl-parameters.dat /dev/null cat: ssl-parameters.dat: Permission denied [EMAIL PROTECTED]:run/dovecot/login (14) ls -ld drwxr-x--- 2 root dovecot 512 Apr 15 14:44 . I had to set the mode of ssl-parameters.dat to 644 to allow dovecot-users to login, but it should not be needed -- the file should be readable by members of the group dovecot (such as user dovecot). And yet, when the user dovecot tried to open it, it got EPERM. Could somebody, please, explain? Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: strange file-permission problem
вівторок 15 квітень 2008 03:55 по, Mel Ви написали: Since the default GID for dovecot is 143, I suspect you have two dovecot groups. ls -ln should show you the numeric group id. Yes, that was it. Thank you very much for the quick and accurate response! Yours, -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Automatic `nodump' flag?
Hello! I'd like the entire contents of each user's .mozilla/firefox/*/Cache directory to be excluded from the regular filesystem dumps. Running ``chflags -R nodump /home/*/.mozilla/firefox/*/Cache'' does the trick, but this needs to be redone daily -- prior to running the backup -- because new entries appear in the caches, obviously... The new entries don't have the nodump flag set. Is there a way, the flag can be set automatically? For example, inherited from the directory? Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: mounting/reading a DVD
On субота 26 січень 2008, CryptWizard wrote: = It's because the DVD is copy protected. Yes, I guess so... Using ddrescue, as described in http://gentoo-wiki.com/HOWTO_Backup_a_DVD#ARccOS_.26_Other_intentional_sector_corruption seems to have extracted an ISO-image... -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
mounting/reading a DVD
Hello! I finally got to opening a DVD I received for New Year and wanted to back it up before watching. I mounted the disk: /dev/acd0 on /cdrom (cd9660, local, read-only) and I can list the contents: env LANG=C ls -l /cdrom/ total 8 dr-xr-xr-x 1 root wheel 2048 Oct 6 2005 audio_ts dr-xr-xr-x 1 root wheel 2048 Oct 6 2005 jacket_p dr-xr-xr-x 1 root wheel 4096 Oct 6 2005 video_ts But when I try to copy all that to a hard-drive, I get a ton of read-errors -- most of the many files on the disk are unreadable: ... g_vfs_done():acd0[READ(offset=4623824896, length=65536)]error = 5 acd0: FAILURE - READ_BIG ILLEGAL REQUEST asc=0x6f ascq=0x04 g_vfs_done():acd0[READ(offset=4623828992, length=65536)]error = 5 acd0: FAILURE - READ_BIG ILLEGAL REQUEST asc=0x6f ascq=0x04 ... ``dd'' refuses to read from /dev/acd0: dd: /dev/acd0: Invalid argument cat tries to, but fails: cat: stdin: Input/output error Is there a step I'm missing? I strongly doubt, the disk is damaged, as I just unwrapped it myself... I'm on FreeBSD/amd64 running 6.3 as of Dec 30th. The DVD-drive is: acd0: DVDR MATSHITADVD-RAM SW-9585/B100 at ata1-master UDMA66 Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
32-bit FreeBSD binary on amd64
Hello! I'm struggling with a 32-bit FreeBSD executable, which is identified as: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), dynamically linked (uses shared libs), stripped Unfortunately, the executable would not run: /libexec/ld-elf.so.1: /lib/libm.so.4: unsupported file layout I don't understand, why it is trying to use the 64-bit /lib/libm.so.4 instead of the readily available /usr/lib32/libm.so.4 ? Other 32-bit binaries have no problems on this same machine... Was it not linked correctly? Is there a way to correct it? brandelf-ing did not help, for example... Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: tail does not exit
On середа 19 грудень 2007, Chuck Swiger wrote: = A quick test suggests that tail -f will close when it gets a SIGPIPE. SIGPIPE? How is that relevant? Does tail get a SIGPIPE, when awk disappears in my example? If it does not, why do you bring it up? And if it does get SIGPIPE, then you are wrong, because the posted quick test shows the exact opposite behavior -- tail does NOT go away. Please, clarify... Thanks. On середа 19 грудень 2007, Max N. Boyarov wrote: = try to test your script with anoter file and add somthing to it = = 1) cons1$ touch /tmp/test = 2) cons1$ tail -f /tmp/test | awk '{print Line: $1 ; exit(0)}END{print Bye}' = 2a) Line: Line1 = 2b) Bye I'm sorry, this does not make sense to me. Starting with an empty file, as you do in 1), /may/ make tail not notice, that awk went away, because tail has nothing to write to stdout. But /var/log/messages is not empty, and awk -- in my example -- would exit upon seeing the very first line of its input (tail's output). Yet tail fails to notice, that its subsequent output (starting with the second line) is written to nowhere... Why? -mi P.S. Here is the example again: #!/bin/sh if tail -f /var/log/messages | awk '{print Exiting; exit 0}' then echo Exited else echo Failed fi exit 0 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: tail does not exit
On четвер 20 грудень 2007, Max N. Boyarov wrote: = after something writeln to /var/log/messages tail get SIGPIPE But why is that needed for tail to notice? It is trying to output 10 lines. After it outputs the very first one of them, awk exits, and the 9 subsequent lines go into thin air /without tail noticing/. Is not that a bug in itself? -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: tail does not exit
On четвер 20 грудень 2007, Max N. Boyarov wrote: = MT Is not that a bug in itself? = = Tail write buffer at all, i.e. all 10 lines writes to pipe. So, the behavior depends on the size of the buffer -- and thus the size of the input lines. A bug indeed... -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: tail does not exit
On четвер 20 грудень 2007, Erik Osterholm wrote: = The same behavior happens if I use a larger file. I see no = inconsistent behavior, nor any bugs. The inconsistency is in the fact, that the behavior depends on the size of the buffer and length of the lines (not the size of the file). If the 10 lines, which tail tries to output initially, exceed the size of the buffer, tail learns about awk going away immediately. If the lines are not long enough, it does not. Also, I would expect a program to be notified (by SIGPIPE?) /immediately/, when any of its output pipes are closed -- instead of waiting for it to try to write into the pipe. But this issue is not, it seems, FreeBSD-specific... -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: tail does not exit
четвер 20 грудень 2007 11:58 до, Erik Osterholm Ви написали: Ah, I see. With very, very long lines, tail doesn't send the output all at once. The cutoff seems to be 65536 bytes on my system. They don't even have to be very very long -- unless in an artificial example, such as the one I posted. Normal-width text files can also trigger inconsistent behavior in some real-life scenario, where awk actually does some real processing of its input for a while. The awk script may decide to quit after processing the first 1000 (normal-length) lines, for example... The behavior of the program will then be different depending on whether the average line-length is above, at, or below 65.536 characters. Maybe, it is awk's fault -- it should not be read-ing more than one line at a time, because the script may cause it to ignore some of the read data. Using line-buffering or some such? -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: tail does not exit
Max N. Boyarov: -f The -f option causes tail to not stop when end of file is reached, but rather to wait for additional data to be appended to the input. The -f option is ignored if the standard input is a pipe, but not if it is a FIFO. Josh Tolbert: Cause the -f option to tail doesn't work that way. -f always waits for more input. I know very well about -f waiting for more *input*. What puzzles me, is that tail does not quit, when its *output* is closed. James Harrison: Is there a reason you want the -f flag? Yes, I want awk to be processing the lines, which are appended to the file, until it finds, what it is looking for, and exits. I expect tail to go away, when its stdout is closed, but it does not. tail -f holds on for dear life until a ctrl-c happens. IT HAS A DEATH GRIP! This seems like a bug to me... It should hold on to its input file(s), but exit peacefully, when its stdout closes. No? -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Can cron e-mail HTML?
On четвер 19 липень 2007, Tom Evans wrote: = Or you could patch cron to use libmagic Done: http://aldan.algebra.com/~mi/cron-mime.diff It even works now... = and have cron scripts that will only work on one box. And send-pr the diffs to FreeBSD :-) -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Can cron e-mail HTML?
On четвер 19 липень 2007, Tom Evans wrote: = Teaching cron about file types/mime types is an awful idea Why? My particular cron-job generates HTML. Somebody else's might generate a JPG image -- from their telescope every morning. There is no reason for these jobs to have to do the e-mailing on their own. Cron has this functionality, it just needs to be improved to match the modern-times expectations (MIME was introduced in the previous millennium.) And if you are worried about feature-creep, well, you should've objected back when piping to sendmail was put into cron in the first place. After all, ALL cron jobs (including the purely textual ones) could have explicit piping into a mailer... If you don't mind cron generating the From: and the Subject: headers, you should not mind it generating the Content-Type:. = - sounds like something you'd find in gentoo. And then I plan to add magick-handling to mail(1) -- to allow you to e-mail a file with the properly-set Content-Type. Yours, -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Can cron e-mail HTML?
On неділя 15 липень 2007, Daniel Bye wrote: = Is /usr/share/misc/magic.mime of any use? Apparently it is consulted by = file(1) when called with -i. According to libmagic(3), magic_open() with = the MAGIC_MIME flag should do the same. Yes, indeed -- just the ticket... Thanks. Now, I have not received any e-mails from the cron modified as per the linked patch yet, but if anyone cares to review it, please, do so. It compiles :-) http://aldan.algebra.com/~mi/cron-mime.diff It increases the application's buffering of the job's output from 1 character to BUFSIZ and, if requested, passes the first thus-read buffer to magic_buffer(). If that succeeds, the Mime-Version and Content-Type headers are injected into the outgoing e-mail... -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Can cron e-mail HTML?
Hello! I have a script launched from cron every morning, that gets certain data over the Internet from a remote computer, compares the new data with that from the previous day, and outputs the difference (if any). I'm relying on the fact, that cron e-mails me the output of each job. However, I modified the script recently to produce the output (if any) in HTML, rather than in plain-text format. The HTML arrives by e-mail just as well as plain text used to, but no e-mail program will render it as such, because neither the cron(8), nor the mail(1), which cron uses to send e-mail, creates MIME messages... How can I force the ``Content-Type: text/html'' header without hacking cron's sources? I'd rather avoid poluting my script with e-mail sending code... Maybe, cron should apply file(1)-like logic to the e-mailed content? Thanks for any hints. Yours, -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Can cron e-mail HTML?
Derek Ragona wrote: = = I'd rather avoid poluting my script with e-mail sending code... = You need to change your script to send the email itself. Thank you, Derek, but -- as I stated already -- I wanted to see, if this can be avoided... Since you posted your script, I'll comment on it. First of all, you don't need ksh for anything you are doing in this script. FreeBSD's /bin/sh is enough (we aren't Solaris :-) -- but is 9 times smaller here (amd64). Now, instead of redirecting each line of output into MAILFILE, then mailing, and removing it, you should be either outputing everything directly into mail: { cat $REPORT_LOG_HEADER echo$MAILFILE echo$MAILFILE echo BR BR $MAILFILE cat $REPORT_LOG_FOOTER } | $MAIL -s the report name $MAILTO or, if you want to use the temporary file, use exec to redirect into it _once_, instead of _on every line_: exec $MAILFILE cat $REPORT_LOG_HEADER printf \n \nBRBR\n $MAIL -s the report name $MAILTO $MAILFILE $RM $MAILFILE This may look nicer, but is not, because temporary files are nasty, and you need to be sure, that you remove them in case you are interrupted (trapping signals, etc.) I was surprised, one can not redirect into a pipe directly. The following did not work, as I expected, with neither /bin/sh nor /usr/local/bin/ksh93. The following, I thought, would be the same as my first example, only nicer-looking: exec | $MAIL -s the report name $MAILTO cat . But it is not. So you have to chose from one of the first two examples. Yours, -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Can cron e-mail HTML?
= To accomplish this I have my cron job run a script like this Sorry, I missed the most important part. Your script just uses /usr/bin/mail, the same way cron does. You are not adding anything, not already present in cron -- your script should simply produce output to stdout. Cron will mail all that to the address specified in MAILTO=... part of your crontab automatically. AFAIK, to make the e-mail message treated as a MIME one, the MIME-Version: 1.0 and Content-Type: ... have to be among _headers_. I'm afraid, it is not possible to directly manipulate the message's headers using mail(1), which is why I asked my question in the first place... -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Can cron e-mail HTML?
On субота 14 липень 2007, Daniel Bye wrote: = How can I force the ``Content-Type: text/html'' header without hacking = cron's sources? I'd rather avoid poluting my script with e-mail sending = code... = = Alter your script to add the 'Content-Type: text/html' header. No, I'm afraid, doing this will make the quoted text part of the _body_ of the message. = Maybe, cron should apply file(1)-like logic to the e-mailed content? = No, cron doesn't need any knowledge of how to render email. I was not advocating adding such knowledge. My suggestion was to make cron add proper Content-Type, so that the /recepient's e-mail program/ will render the message correctly. My scripts generate HTML, someone else could be generating JPG images (from their web-camera, every morning)... = The script itself doesn't have to send the mail - cron will handle that if = there is any output when it exits, but you /can/ add headers to the message = as you need. = = Just make sure any custom headers come before the empty line delimiter = between headers and body, and most mail readers should do the right thing. The empty line is inserted by cron before any of the job's own output... This method will not work, unless the e-mail reader (incorrectly) acts upon parts of the body as if they were headers... Thanks! Yours, -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Can cron e-mail HTML?
On субота 14 липень 2007, Daniel Bye wrote: = So it's beginning to look as if your best bet is in fact to make your = script handle sending the mail. Yeah, seems like it... = Not the cleanest solution, but one that will get your messages formatted = exactly how you want them. Well, I started looking into how much effort would it be to translate the strings returned by libmagic(3)'s routines into Content-Type. If it is easy enough, I could hack cron to analyze the job's output using magic_buffer(3) and set Content-Type if anything recognizable is detected... The translation is the difficult part :-( Instead of the standardized text/html for example, libmagic returns: HTML document text It is trying to be human-readable, while I need the machine-readable strings. There is stuff on-line that does the translation, but it is in much higher-level languages (like PHP), which think, hash-tables are free :-) Oh, well... -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
ekiga's audio input: dsp0.0?
Hello! I'm struggling with configuring Ekiga's (former gnomemeeting) to work with my microphone on FreeBSD-6.2-stable/amd64. Ekiga has a test settings buttons (under the configuration druid), but it never plays back anything, that I say into the microphone (I tried two of those already). Ekiga is trying to use /dev/dsp0.0. Is that the right device? Sound(4) says, dsprM.N should be used for input -- do I need to force ekiga into using that? I know, the sound itself works -- including from ekiga -- because I can test play the various sounds, that come with the application. Does anyone have ekiga working right on FreeBSD-6 (the port's maintainer has already told me, he no longer uses the software)? Thanks! -mi P.S. I use the snd_ich audio module. My /dev/sndstat reads: FreeBSD Audio Driver (newpcm) Installed devices: pcm0: AMD-8111 at io 0xc800, 0xcc00 irq 17 bufsz 16384 kld snd_ich (1p/1r/2v channels duplex default) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: ekiga's audio input: dsp0.0?
On неділя 17 червень 2007, Mikhail Teterin wrote: = Ekiga has a test settings buttons (under the configuration druid), but it = never plays back anything, that I say into the microphone (I tried two of = those already). Figured it out. What I needed to do, was: mixer recsrc mixer mic 100 rec 100 Why aren't usable values on by default, when the machine boots, is beyond me... -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
jail vs. nice
Hello! A program (a TclX' self-test script) works fine in a normal environment, but fails to renice itself, when running in jail (as root): nice-1.8 nice tests FAILED Contents of test case: list [nice -1] [nice] Test generated error; Return code was: 1 Return code should have been one of: 0 2 errorInfo: failed to increment priority: permission denied while executing nice -1 invoked from within list [nice -1] [nice] (uplevel body line 2) invoked from within uplevel 1 $script This is new -- just a few months ago the same script was working fine, but it is failing now in both 7.0 and 6.2. Please, advise... Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
converting an mdoc manual page into an old man format
Hello! I've written a man-page using mdoc macros for my own little program. I'd like to port the program to other Unixes (like Solaris), where my mdoc-based man page is rather unreadable :-( Is there a standard way to expand the mdoc macros once? `man mdoc' is not giving any useful examples -- I can create a PostScript or an HTML document, but I can't render it in the traditional man :-( Thanks for any hints! Yours, -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
conundrum: _C99_SOURCE vs. sigset
Hello! I'm trying to compile a program, which uses threads and has its own daemon global variable. The variable's declaration results in an error: recsnap.C:50: error: `RTRString daemon' redeclared as different kind of symbol /usr/include/stdlib.h:252: error: previous declaration of `int daemon(int, int)' The daemon()'s declaration in stdlib.h can be turned off by declaring either _C99_SOURCE or _ANSI_SOURCE. Unfortunately, both of these defines also turn off the declaration of sigset_t and fd_set: /usr/include/pthread.h:233: error: expected `,' or `...' before '*' token .../include/rtr/selectni.h:129: error: `fd_set' does not name a type Can this be solved -- without modifying the vendor's code? Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: conundrum: _C99_SOURCE vs. sigset
четвер 03 серпень 2006 17:38, Stefan Farfeleder написав: Try -D_POSIX_C_SOURCE=200112. Thanks, I will. The macro _C99_SOURCE is for pure C99 code and _ANSI_SOURCE for C90 code. Both don't include the pthread.h header. They do -- it gets included from iostream, even when I define one of those. Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
a secure equivalent to rcmd() and rexec() ?
I'm wondering, if there exists a secure equivalent to rcmd/rexec? Perhaps, somewhere in libssh? I need to send data to a command line on another machine, but popen-ing an ssh session seems like a rather inferior method, because there is no way to (portably) access the command's stderr... Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
nsswitch.conf and Samba's windbind
Hello! I'm trying to setup my machine (FreeBSD-6.1) to be able to authenticate some users against the corporate Active Directory (using Samba's windbind). Having the following line in the /etc/nsswitch.conf works to that end: passwd: files nis winbind Unfortunately, this prevents the local +/- substitutions from working... Using: passwd_compat: nis winbind restores the +/- functionality, but disables the Active Directory functionality :-( How do I get both? Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Anything to recode mp3 files in the ports?
Hi! I have a sizable collection of mp3 files (most of my CDs, actually) encoded at high ratio for archiving. I'd like to put some of them on a low-capacity player. Is there a utility (preferably -- a ported one), that can reencode an existing mp3 file at lower quality settings (hence smaller size), or do I have to re-rip the CDs from scratch? Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: virtusertable blocking seems to have no effect
On Wednesday 29 March 2006 08:39 am, Derek Ragona wrote: = Did you compile the access database? = = Typically done with: = /usr/sbin/makemap hash /etc/mail/access /etc/mail/access I run `make' in /etc/mail, which takes care of this. Thanks. -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: virtusertable blocking seems to have no effect
On Wednesday 29 March 2006 12:35 am, Glenn Dawson wrote: = I saw that, but you had that part right...I thought the only = problem was with getting the reject message to work properly. = = Anyway... = = This is what I typically do: = = [EMAIL PROTECTED] localaccount1 = [EMAIL PROTECTED] localaccount2 = @bar.com error:nouser 550 No such user here Glenn, this is exactly what I have according to my initial posting in this thread. I took the example from sendmail's cf/README: = Here is (almost) what I have in the virtusertable: = = [EMAIL PROTECTED] foo = [EMAIL PROTECTED]bar = @example.com error:5.7.0:550 No spam, thanks Unfortunately, as I write in that initial posting, although it does have some effect, it does not seem sufficient: = I can see the No spam,thanks messages logged in the maillog = (without the space after coma, for some reason), but there is = no reject=550 message logged (which interferes with my other = software) and some of these messages seem to pass through = (although others are intercepted by other anti-spam defenses). = = For example, here are the only two log entries, that a spam = message generates: = = Mar 28 13:45:58 corbulon sendmail[40026]: k2SIjvvb040026: [EMAIL PROTECTED]... No spam,thanks = Mar 28 13:45:58 corbulon sendmail[40026]: k2SIjvvb040026: from=[EMAIL PROTECTED], size=3305, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=example.example.net [xx.x.xx.xxx] = = Despite the No spam,thanks the message was accepted. = = What am I doing wrong? Thanks! Yours, -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: virtusertable blocking seems to have no effect
середа 29 березень 2006 10:28, Glenn Dawson написав: = Despite the No spam,thanks the message was accepted. I don't see anything in the log entries above to indicate that the message was accepted at all. What makes you think that it was? First, there was no rejection entry in the maillog. Second -- and most importantly -- I found this particular spam-message in the spam mailbox. Thanks, -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
virtusertable blocking seems to have no effect
Hi! I host a domain with a handful of real addresses. I noticed, that spammers are using a variety of random-generated names @mydomain and wish to block such addresses with No spam responses instead of User unknown. Here is (almost) what I have in the virtusertable: [EMAIL PROTECTED] foo [EMAIL PROTECTED]bar @example.com error:5.7.0:550 No spam, thanks I can see the No spam,thanks messages logged in the maillog (without the space after coma, for some reason), but there is no reject=550 message logged (which interferes with my other software) and some of these messages seem to pass through (although others are intercepted by other anti-spam defenses). For example, here are the only two log entries, that a spam message generates: Mar 28 13:45:58 corbulon sendmail[40026]: k2SIjvvb040026: [EMAIL PROTECTED]... No spam,thanks Mar 28 13:45:58 corbulon sendmail[40026]: k2SIjvvb040026: from=[EMAIL PROTECTED], size=3305, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=example.example.net [xx.x.xx.xxx] Despite the No spam,thanks the message was accepted. What am I doing wrong? Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: virtusertable blocking seems to have no effect
вівторок 28 березень 2006 18:55, Derek Ragona написав: Block that in /etc/mail/access instead, use this syntax: @example.comERROR:550 No spam, thanks Note the leading space and use of double quotes. Nope, that went back to saying User unknown instead of No spam... Thanks! -mi At 01:22 PM 3/28/2006, Mikhail Teterin wrote: Hi! I host a domain with a handful of real addresses. I noticed, that spammers are using a variety of random-generated names @mydomain and wish to block such addresses with No spam responses instead of User unknown. Here is (almost) what I have in the virtusertable: [EMAIL PROTECTED] foo [EMAIL PROTECTED]bar @example.com error:5.7.0:550 No spam, thanks I can see the No spam,thanks messages logged in the maillog (without the space after coma, for some reason), but there is no reject=550 message logged (which interferes with my other software) and some of these messages seem to pass through (although others are intercepted by other anti-spam defenses). For example, here are the only two log entries, that a spam message generates: Mar 28 13:45:58 corbulon sendmail[40026]: k2SIjvvb040026: [EMAIL PROTECTED]... No spam,thanks Mar 28 13:45:58 corbulon sendmail[40026]: k2SIjvvb040026: from=[EMAIL PROTECTED], size=3305, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=example.example.net [xx.x.xx.xxx] Despite the No spam,thanks the message was accepted. What am I doing wrong? Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: virtusertable blocking seems to have no effect
On Tuesday 28 March 2006 10:09 pm, Glenn Dawson wrote: = I use this in my virtusertable: = [EMAIL PROTECTED] error:nouser 550 No such user here = = but you should be able to change the message half of that with no trouble. Please, review this thread from the beginning. I want some of the foos to be accepted and forwarded, but all other @bar.com addresses to trigger a no-spam response. -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
How to print in duplex mode?
Hello! I'm trying to use less paper by printing on both sides of each sheet. The printer is capable of duplex printing, but all the postcript I send to it ends up printed single-sided. The original PS is generated by a web-browser. I then try to use enscript's pstops utility, but can't figure out its page-specification language :-( Would someone have a ready example: pstops 'MagickSpell' input.ps duplex.ps Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: How to print in duplex mode?
четвер 02 березень 2006 17:53, Steel City Phantom Ви написали: duplexing is a function of the printer driver. (in KDE) control center, peripherals, printers, select your printer and on the instances tab, settings and you can make the printer duplex from there. How to do it without KDE, i don't know. but im sure there is a config file out there somewhere. oh, and the driver you are using has to support duplexing obviously Thanks, but driver? I'm sending a Postscript file to a remote Postscript printer. This is the printcap entry: nyp2:\ :rm=nyp2:\ :sd=/var/spool/lpd/nyp2:\ :lf=/var/spool/lpd/nyp2/log:\ :af=/var/spool/lpd/nyp2/acct:\ :sh: My question was, how to can I manipulate an existing Postscript file, to make sure, it is printed in duplex mode... `pstops' is supposed to be able to do it... -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
is upgrading from 4.x to 6.x possible?
Is there a procedure for upgrading 4.x to 6.x? Simply doing `buildworld' does not work -- even make can not be rebuilt without the stdint.h, for example. Thanks for advice. Yours, -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
what's an equivalent for the following Perl one-liner?
I'd like a sed string, that will remove both the carriage returns and the blanks at eol in one go. Perl appears to recognize the \r character and DTRT: perl -p -e 's,[ \r]+$,,' in out What's the sed's equivalent? Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: what's an equivalent for the following Perl one-liner?
четвер 22 грудень 2005 13:32, Dan Nelson Ви написали: In the last episode (Dec 21), Mikhail Teterin said: I'd like a sed string, that will remove both the carriage returns and the blanks at eol in one go. Perl appears to recognize the \r character and DTRT: perl -p -e 's,[ \r]+$,,' in out What's the sed's equivalent? Thanks! sed -E 's,[ ^M]*$,,' in out Note the ^M is a single control-character (entered via Ctrl-V Ctrl-M at a shell prompt for example). Yes, I used this in the past, but the ports' Makefiles are supposed to be ASCII-only :-( sed does not parse backslash-escapes except for \n which represents a newline. Is not that a bug really? There may be some legacy reasons not to do it by default, but I'd expect the -E flag to turn on the recognition of such symbols... Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: what's an equivalent for the following Perl one-liner?
Try col(1) or tr(1) to remove the carriage return and then sed to remove the spaces. Well, yes, but that's a two-stage process. A shame to go through the whole file twice just because our tools aren't good enough. -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: some files written via mmap end up corrupted
On Tuesday 22 November 2005 02:45 am, Dan Nelson wrote: = In the last episode (Nov 21), Mikhail Teterin said: = I must not be using the API properly :-( = = The writes to the mmap-ed area and then fsync-s the opened file, = munmaps it, and exits. = = Sometimes, the files end up corrupted at the end, however -- in about = 10% of cases. = = What kind of corruption are you seeing? Blocks of zeroes? Hard to say -- the files are (supposed to be) gzip-ed at the end. But `gzip -t' detects corruption in some of them. = Maybe you need to call msync() before unmapping the region? Or call = munmap before fsync. mmap(2) page says, msync() is obsolete now, and that fsync(2) will flush all dirty data and metadata associated with a file, including dirty NOSYNC VM data, to physical media = Can't tell that for sure without seeing the code :) The ending sequence was fsync-close-munmap. I changed it to fsync-munmap-close (not that it should matter), and am going to try again now. mmap is such a beautiful interface, too bad people don't use it and it bitrots :-( Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
some files written via mmap end up corrupted
I must not be using the API properly :-( The writes to the mmap-ed area and then fsync-s the opened file, munmaps it, and exits. Sometimes, the files end up corrupted at the end, however -- in about 10% of cases. What am I doing wrong? Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: throttling NFS writes
On Saturday 19 November 2005 07:31 am, Andrew P. wrote: = It's also not really hard to write a client-sever system (Perl is good = for that), where server watches hardware resources on the host and = clients query them before any activity. Sort of traffic lights. About = 50-100 lines of Perl code. Except the database servers (which are the backup clients) run proprietary software and will not cooperate... So it needs to be entirely on-sided. -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
throttling NFS writes
Hi! We have an unusual problem with NFS writes being _too fast_ for our good. The system is accepting database dumps from NFS-clients and begins compressing each dump as soon, as it begins arriving (waiting for more via kevent, if needed). The NFS-clients (database servers) run on slow Sparc processors and can not be bothered to compress their data... The setup works quite well, if the to-be compressed data is still in memory, when the compressor gets to it. Unfortunately, those Sparc systems have rather fast I/O rates and manage to write their dumps faster, than the compressor can compress it. When this happens, the overall performance of the backup script goes down through the floor :-(, because it forces the disk to read the middle of a file (for compression), while data keeps arriving (from the NFS-client) at the end of it... So we'd like to stall the client's dumping, so that the compressor can keep up. Short of limiting NFS-bandwidth via ipfw, is there a way to control NFS speed dynamically? The uncompressed dumps are _huge_, although they compress very well. So we can not just accept all of them first and then start compressing -- we don't have enough room. There is enough to keep about 3 full-dumps worth of compressed data, but even a single uncompressed full dump would not fit... -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
does madvise() have effect on mmap-ed regions?
Would something like `fgrep --mmap' benefit from madvise-ing the kernel, that the mmap-ed region (the input file) will be used sequentionally (MADV_SEQUENTIONAL) and covering the already searched parts with MADV_DONTNEED|MADV_FREE? Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
can not mount a large FAT32 filesystem
Hello! I have a 4Gb flash-card with FAT32 filesystem. Whenever I try to mount it (on 5.x and 4.x) I get: msdos: /dev/da0s1: Invalid argument and the kernel complains: da0: reading primary partition table: error reading fsbn 0 mountmsdosfs(): bad FAT32 filesystem The method works with smaller cards in the same card-reader. This card works fine inside the camera, and I can get the pictures via. PTP protocol using gphoto. Fdisk da0 says: *** Working on device /dev/da0 *** parameters extracted from in-core disklabel are: cylinders=7936 heads=16 sectors/track=63 (1008 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=7936 heads=16 sectors/track=63 (1008 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 12,(DOS or Windows 95 with 32 bit FAT, LBA) start 63, size 7998417 (3905 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 766/ head 15/ sector 63 The data for partition 2 is: UNUSED The data for partition 3 is: UNUSED The data for partition 4 is: UNUSED Disklabel da0 says: # /dev/da0: type: SCSI disk: SanDisk label: ImageMate II flags: bytes/sector: 512 sectors/track: 63 tracks/cylinder: 16 sectors/cylinder: 1008 cylinders: 7936 sectors/unit: 7999489 rpm: 3600 interleave: 1 trackskew: 0 cylinderskew: 0 headswitch: 0 # milliseconds track-to-track seek: 0 # milliseconds drivedata: 0 8 partitions: #size offsetfstype [fsize bsize bps/cpg] c: 79994890unused0 0 # (Cyl.0 - 7936*) Looks like OpenBSD discussed something similar 5 years ago: http://monkey.org/openbsd/archive/tech/0002/msg00167.html Any suggestions? I really hate using PTP via the camera to transfer pictures from this device, and I'd like to be able to store other things there in addition to pictures. Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Strange case of filesystem corruption?
On Tuesday 06 September 2005 06:51 am, Robert Watson wrote: = Have you recently experienced a system crash or hard reboot without proper = shutdown? According to dmesg.boot, this filesystem was flagged as not properly dismounted back then. The machine's uptime is currently 47 days and no background fskcs are running, of course. Yours analysis is, likely, correct then... I guess, the fix should be MFCed. (What about 6.0-release?) Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Strange case of filesystem corruption?
Do you have back logs to when bgfsck was running, btw? Yes, indeed. And there is stuff in them... The machine crashed on July 21st at 00:20 (/var is troublesome fs): Jul 21 00:20:37 blue kernel: WARNING: /var was not properly dismounted Jul 21 00:20:37 blue kernel: /var: mount pending error: blocks 28 files 2 Jul 21 00:29:05 blue kernel: [EMAIL PROTECTED]:/var/obj/var/src/sys/SILVER Jul 21 00:29:05 blue kernel: WARNING: /var was not properly dismounted Jul 21 00:29:05 blue kernel: /var: mount pending error: blocks 28 files 2 Jul 21 00:32:21 blue fsck: /dev/da0s1d: UNREF FILE I=11559 OWNER=root MODE=100400 Jul 21 00:32:21 blue fsck: /dev/da0s1d: SIZE=12884902464 MTIME=Jul 21 00:22 2005 (CLEARED) Jul 21 00:32:21 blue fsck: /dev/da0s1d: UNREF FILE I=1413219 OWNER=root MODE=100600 Jul 21 00:32:21 blue fsck: /dev/da0s1d: SIZE=12288 MTIME=Jul 21 00:18 2005 (CLEARED) Jul 21 00:32:21 blue fsck: /dev/da0s1d: UNREF FILE I=1423432 OWNER=root MODE=100600 Jul 21 00:32:21 blue fsck: /dev/da0s1d: SIZE=12288 MTIME=Jul 21 00:22 2005 (CLEARED) Jul 21 00:32:21 blue fsck: /dev/da0s1d: UNREF FILE I=1423433 OWNER=root MODE=100600 Jul 21 00:32:21 blue fsck: /dev/da0s1d: SIZE=451 MTIME=Jul 21 00:22 2005 (CLEARED) Jul 21 00:32:21 blue fsck: /dev/da0s1d: Reclaimed: 0 directories, 4294967269 files, -26 fragments Jul 21 00:32:21 blue fsck: /dev/da0s1d: 495013 files, 4631802 used, 1461319 free (59391 frags, 175241 blocks, 1.0% fragmentation) So that was a successful fsck above (save for the negative number of reclaimed fragments). I am not sure, what caused the next reboot (crash or orderly reboot) at 1:17, but this time fsck failed: Jul 21 01:17:18 blue kernel: [EMAIL PROTECTED]:/var/obj/var/src/sys/SILVER Jul 21 01:17:18 blue kernel: WARNING: /var was not properly dismounted Jul 21 01:17:18 blue kernel: /var: mount pending error: blocks 44 files 12 Jul 21 01:20:30 blue fsck: /dev/da0s1d: INCORRECT BLOCK COUNT I=11599 (4 should be 0) (CORRECTED) Jul 21 01:20:30 blue fsck: /dev/da0s1d: INCORRECT BLOCK COUNT I=34376 (4 should be 0) (CORRECTED) Jul 21 01:20:30 blue fsck: /dev/da0s1d: SETTING DIRTY FLAG IN READ_ONLY MODE Jul 21 01:20:30 blue fsck: Jul 21 01:20:30 blue fsck: /dev/da0s1d: UNEXPECTED SOFT UPDATE INCONSISTENCY; RUN fsck MANUALLY. What is interesting is that my ports tree is also on this same fs and has gone through numerous cvs updates and port builds (including large items like mozilla and openoffice)... Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Strange case of filesystem corruption?
Can this be explained by anything other than a (nasty) bug? % ls -la audio/shorten/files total 0 % rmdir audio/shorten/files rmdir: audio/shorten/files: Directory not empty This is on 5.4-stable from July 21 -- up ever since... Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Strange case of filesystem corruption?
On Monday 05 September 2005 08:38 pm, Eric Anderson wrote: = Mikhail Teterin wrote: = Can this be explained by anything other than a (nasty) bug? = = % ls -la audio/shorten/files = total 0 = % rmdir audio/shorten/files = rmdir: audio/shorten/files: Directory not empty = = This is on 5.4-stable from July 21 -- up ever since... Thanks! [...] = Can you show permissions on the directories audio, shorten, and files? Well, ls of the directory succeds above, so it can not be the permission problem. But here: % cd audio/shorten % ls -lds 2 drwxrwxr-x 4 mi wheel 512 Jul 21 01:13 . % ls -loas files total 0 % rmdir files rmdir: files: Directory not empty = Also - what is your securelevel set to Default. = and have you checked to see if there are processes with any open files = in those directories? I doubt there are any, and why would that affect anything anyway? Here: % mkdir /tmp/q % touch /tmp/q/meow % tail -F /tmp/q/meow [2] 39947 % rm /tmp/q/meow % rmdir /tmp/q In other words, the directory (/tmp/q) is removable even if a process (tail) still has a deleted file (meow) in it opened. On Monday 05 September 2005 08:42 pm, Beecher Rintoul wrote: = Try rm -R audio/shorten/files Thank you, but I'm afraid, it may succeed in deleting the directory, while I try to figure out, what is happening -- the directory is empty according to ls, but not empty according to rmdir. -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Motorolla's M1200 modem and FreeBSD?
I've received an old laptop (Micron's Transport XKE), with a modem that was made by Motorolla, model m1200. FreeBSD-6 recognizes two serial ports in the machine (regular com-port on the back, plus the IrDA port), but there is nothing about the modem. comms/ltmdm does not react to it (Lucent is not Motorolla, I guess :-) Did anyone ever make these modems work with FreeBSD? Should I try to bring the comms/mwavem port into the 6.0 world, or is that a different chipset too? Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: very big files on cd9660 file system
ISO9660 does not use 64-bit values. Those 8-byte values you see in the headers are 32-bit values stored first in little-endian format and second in big-endian format. So, in my original question, the blame lies solely with 3) ISO-9660 standard ? No single file on a ISO9660 filesystem may exceed 4Gb? Is there some newer, superceeding backwards-compatible standard -- all the new DVD devices are now offering the media to store large files? Or is fat32 the only cross-platform option today? -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
very big files on cd9660 file system
Hello! I have a cd9660 image with several files on it. One of the files is very large (above 4Gb). When I mount the image, the size of this file is shown as realsize % 4Gb -- 758876749 bytes instead of 5053844045. What should I blame: 1) The software, that created the image (modified mkisofs) 2) cd9660 part of the FreeBSD kernel 3) ISO-9660 standard Thank you! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
very busy ftpd
Hi! I just noticed, that uploading a file over a LANG (at around 5.7Mb/s) resulted in around 25% CPU consumption by the ftpd. I think, that's unusual for a Pentium4 -- what is the process doing? The machine is running 5.2.1-RELEASE and has TrustedBSD extensions. -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: very busy ftpd
I just noticed, that uploading a file over a LANG (at around 5.7Mb/s) resulted in around 25% CPU consumption by the ftpd. I think, that's unusual for a Pentium4 -- what is the process doing? Check the client does not use ascii mode when uploading (getc() vs read()). That's quite possible, indeed. I wouldn't put it past some users -- some still use the ancient ftp-clients, which default to text-mode transfers. Is there any way to disable this mode on the server, perhaps? Even if it violates the protocol :-/ Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
patching a file with blanks in the name
How does one make a patch for a while, that has blanks in the path: --- foo bar/meow~ Fri Mar 11 09:00:49 2005 +++ foo bar/meowFri Jun 10 12:17:22 2005 - a = 0; + a = 1; With the above example, patch searches only for `foo', then gives up and asks for help. I tried quoting the entire file name and escaping the blanks with backslashes -- neither method works... Any ideas? Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: patching a file with blanks in the name
--- foo bar/meow~ Fri Mar 11 09:00:49 2005 +++ foo bar/meowFri Jun 10 12:17:22 2005 - a = 0; + a = 1; With the above example patch searches only for `foo', then gives up and asks for help. I tried quoting the entire file name and escaping the blanks with backslashes -- neither method works... Any ideas? Thanks! There was a discussion and maybe even a fix proposed for this issue on one of the GNU lists, probably [EMAIL PROTECTED]? Anyway, I don't think the current release version of patch will handle paths containing spaces... Strange... I can't imagine the fix being that complex... Instead of cutting the file-name on the first blank, I'd cut it on the last tab. People with tabs in the filenames would have to append one more tab at the end. Regular, diff-generated patches (vast majority of them all) would not be affected at all, as they always have timestamps (after a tab). I could do the coding -- would anyone be interested in comitting it? Some of the port-ed software (like the blasted java/eclipse) has blanks in directory names :-( -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: adding a directory to a CD-image (.iso)
I donwloaded an .iso-image (Solaris 10, actually), which is about 2.7Gb. Before burning it to a DVD, I'd like to add a directory to the image. Is there a way to do it with tools available on FreeBSD -- mkisofs, growisofs, etc? I don't want to recreate the main image from scratch, as I'm sure, I'll get the options wrong and it will not boot :-) Can I just add a directory to the existing iso9660 filesystem? Would mounting it with vnconfig let you do this? I've never tried, myself... Well, yes, this is how I get to read the CD-image without burning it first. But that is a read-only thing. I need to modify an existing image -- add a directory tree to it... -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
adding a directory to a CD-image (.iso)
Hello! I donwloaded an .iso-image (Solaris 10, actually), which is about 2.7Gb. Before burning it to a DVD, I'd like to add a directory to the image. Is there a way to do it with tools available on FreeBSD -- mkisofs, growisofs, etc? I don't want to recreate the main image from scratch, as I'm sure, I'll get the options wrong and it will not boot :-) Can I just add a directory to the existing iso8859 filesystem? Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: umass0 -- yes, daX -- no?
In the last episode (Mar 15), Mikhail Teterin said: I'm trying to access the file system on a usb memory key. When I insert it, however, kernel duly reports creation of umass0, but not the da1 (da0 is my ZIP drive). According to usbdevs -d, I have: addr 1: OHCI root hub, SiS uhub0 addr 2: Dell USB Memory Key, M-Systems umass0 You might have a device that's not known in umass's table. It looks like it needs to know the protocol before it will create a da* device; try editing /sys/dev/usb/usbdevs and adding a DISKONKEY3 entry (usbdevs -dv should print the hex IDs you need), and copy one of the existing DISKONKEY array entries in umass.c. Thanks, I'll try. This is disheartening, however... I was pretty sure, anything, that support USB Mass Storage would work out of the box :-( -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
umass0 -- yes, daX -- no?
Hello! I'm trying to access the file system on a usb memory key. When I insert it, however, kernel duly reports creation of umass0, but not the da1 (da0 is my ZIP drive). According to usbdevs -d, I have: addr 1: OHCI root hub, SiS uhub0 addr 2: Dell USB Memory Key, M-Systems umass0 addr 1: OHCI root hub, SiS uhub1 addr 1: OHCI root hub, SiS uhub2 It ought to be something obvious, but I can't see what it is :-( Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
disklabel disappeared after power loss
Hello! This is a 4.11-STABLE from Dec 24. After a sudden power loss, one of the disks (ad2) can not recover. It was dangerously dedicated and had two partitions -- swap (ad2b) and data (ad2e). Any attempts to use either (swapon, fsck, mount) now result in EINVAL. `disklabel ad2' creates an imaginary label with only the ad2c covering the entire drive. If I try to add the ad2b and ad2e in disklabel (I remember the sizes), I get: disklabel: Operation not supported by device I can read from /dev/ad2 directly. How can I restore access to the filesystem? Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: disklabel disappeared after power loss
Thank you very much for the quick response! After a sudden power loss, one of the disks (ad2) can not recover. What does `fdisk ad2' say? Some nonsense -- as if I had only a 30Mb partition-4... What does `disklabel ad2' say? Something about amnesiac with only the c-partition. I used /stand/sysinstall to create a small swap partition at the beginning of the drive. I don't know, what it does, but it re-created the label, which I was then able to edit with disklabel. scan_ffs (from the sysutils/scan_ffs) helped me recover the exact size and offset. I wish, fsck had scan_ffs' functionality built-in... Maybe something is messed up, so that disklabel does not dare to write a new disklabel. Well, sysinstall did not mind... Is something from ad2 mounted read-writeable, when you get the Op not perm error? No, definetly not. How about 1. copying the data from the former ad2e into another filesystem, This is a 50% full 180Gb disk. The only other disk nearby is a 20Gb system drive... 3. establishing an all new disklabel with proper ad2e? :-) (most likely ad2e is too big?) ad2e was not too big -- it did not exist. But sysinstall did the job. Perhaps, disklabel needs to learn a few tricks from that tool. And, of course, the main question is, why could the label disappear as a result of something as mundane as powerloss? Yours, -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Verizon's EVDO and FreeBSD
Hi Robert and Mikhail, Mikhail, make sure the following is in your kernel configuration file and recompile the kernel, then post the dmesg output. This should get your card recognized although it probably isn't going to be recognized as a modem. But if we see the dmesg output there might be enough info to suggest a mod to get it recognized as a modem: Wait, I don't a card yet :-) I was just trying to find out, whether I should bother obtaining one... Ted, would you take Robert's offer for the benefit of FreeBSD users (and that of Verizon)? Assuming, Robert is willing to loan the card first, of course :-) -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
can not remount an FS read-only
Hello! My /opt filesystem (playing both LOCALBASE and X11BASE) is normally mounted read-only (not so much for security even, as for safety). When I add/remove ports, I remount it read-write: mount -orw -u /opt do, what I need and then remount it back `ro'. This works most of the times, but sometimes, like today (after /opt was open for some time), mount responds with EBUSY: mount: /dev/da0s2f: Device busy According to fstat, out of 134 files opened under /opt: fstat | fgrep -c /opt 134 NONE is opened for writing: fstat | fgrep /opt | grep -c 'w$' 0 Is there a bug in the open-file counter somewhere, or is fstat not telling me the whole story? In the past, trying to force the read-only mount (-f) caused quite a few processes to segfault (sometimes including X-server). Thanks! -mi P.S. I've seen this on both 4- and 5-stable. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Verizon's EVDO and FreeBSD
Ted, Mi, Sure.. I've got one extra that I normally rent out... But if you guys would like... I can mail it to one of you and just pass it on to the next guy in a week... In fact.. .why don't we just create a loaner schedule... Who wants to go first? The card is live... And is costing me $79/m so if you'd like a $15 contribution is welcome but not necessary... My goal is to get a DRIVER for the thing in FreeBSD... Daisy chain every 7 days??? bob Sounds like, of the two of us, Ted would be more capable of getting it to work. Unless he has no time to spare, he should get it. And if Ted or somebody else does modify FreeBSD (and/or publishes easy to follow how-to instructions) for EVDO ends up working with my 5-stable Vaio laptop, I'll either buy a minimum of $150 worth of service through you, Robert, or just send you a check for $30. Your company will also be able to claim a spot on the FreeBSD's list of hardware vendors, whatever that may be worth :-) -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
need ftp-mirroring software, that pushes, rather than pulls
Hello! I need to push a sizable subtree over to another server periodically. The remote, however, only allows ftp... All of the ftp-mirroring software, that I could find (pavuk, mirror, emirror, etc.) seems designed for pulling the data in, rather than pushing it out. The only thing I could find is rdist, but that needs rsh or ssh and can not work over ftp. Is there anything in FreeBSD's ports, that I overlooked? Is there anything at all? I can port it... Thanks! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: need ftp-mirroring software, that pushes, rather than pulls
Mikhail, Lemme know if Debian.org/mirror/push_mirroring points you in the right direction... No. The method described on the page requires ssh-access to the receiving server. If I had that, I would've happily used rdist-over ssh without bothering this list(s). I must use ftp-protocol for transport. lftp does seem to have that -- I'm trying to figure the details out now... Thanks. -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Cyrus IMAP crashes after reading /etc/krb5.conf
Hello! I'm trying to configure a freshly built mail/cyrus-imapd22 to work and authenticate accounts -- Kerberos and plain text. The GSSAPI authentication works already. After doing kinit, I can do ``imtest -m GSSAPI hostname'' and it succeeds. Now I'm trying to login with plain text (over SSL). Cyrus' imapd keeps crashing from SIGBUS. According to ktrace, this happens right after reading the krb5.conf (I replaced our domain with example below): 29641 imapdCALL open(0x8167e80,0,0x1b6) 29641 imapdNAMI /etc/krb5.conf 29641 imapdRET open 12/0xc 29641 imapdCALL fstat(0xc,0xbfbfbb40) 29641 imapdRET fstat 0 29641 imapdCALL read(0xc,0x8172000,0x4000) 29641 imapdGIO fd 12 read 370 bytes # This is from http://barney.gonzaga.edu/~awithers/integration/ [libdefaults] default_realm = US.EXAMPLE.COM #dns_lookup_realm = true #dns_lookup_kdc = true default_tkt_enctypes = des-cbc-md5 default_tgs_enctypes = des-cbc-md5 [realms] US.MUREX.COM = { kdc = blake.us.example.com:88 kpasswd_server = blake.us.example.com:464 } [domain_realm] .us.example.com = US.EXAMPLE.COM 29641 imapdRET read 370/0x172 29641 imapdCALL read(0xc,0x8172000,0x4000) 29641 imapdGIO fd 12 read 0 bytes 29641 imapdRET read 0 29641 imapdCALL close(0xc) 29641 imapdRET close 0 29641 imapdCALL issetugid 29641 imapdRET issetugid 0 29641 imapdCALL __sysctl(0xbfbfa6c8,0x2,0xbfbfa6c0,0xbfbfa6c4,0,0) 29641 imapdRET __sysctl 0 29641 imapdPSIG SIGSEGV SIG_DFL 29641 imapdNAMI imapd.core Is there anything obviously wrong with the file itself? Why else would Cyrus crash right after reading it? Note, that Blake is a Windows 2000 server... Another change I did was modifying the /etc/pam.d/system to make both unix and krb5 sufficient: --- /usr/src/etc/pam.d/system Sat Jun 14 08:35:05 2003 +++ /etc/pam.d/system Fri Jan 28 20:29:06 2005 @@ -9,5 +9,5 @@ auth requisite pam_opieaccess.so no_warn allow_local -#auth sufficient pam_krb5.so no_warn try_first_pass +auth sufficient pam_krb5.so no_warn try_first_pass #auth sufficient pam_ssh.so no_warn try_first_pass -auth requiredpam_unix.so no_warn try_first_pass nullok +auth sufficient pam_unix.so no_warn try_first_pass nullok Thank you very much for any hints! -mi ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Using `route .... -mtu' on local network
Hello! Most of our hosts can only do the regular 1500-byte frames, but some are Jumbo Frames capable. I'm trying to make these few servers talk to _each other_ using bigger frames (the switch supports them) without breaking the LAN into subnets. In the past someone suggested, I try explicit -mtu switch to the route(8). So, with two -current machines on the same LAN (`mi' and `pandora') I try: mi# route add pandora -iface em0 -mtu 4000 add host pandora: gateway em0 mi# route get pandora route to: pandora destination: pandora interface: em0 flags: UP,HOST,DONE,LLINFO,STATIC recvpipe sendpipe ssthresh rtt,msecrttvar hopcount mtu expire 0 0 0 0 0 0 4000 0 Even ping-ing pandora stops working I have to `route delete pandora' for things to recover. Any suggestions? Thanks! -mi ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
web-serving does not update a file's atime?
Hello! I tried to use stat(1) to see the last time a file was downloaded through Apache. To my surprise, all three dates displayed by stat are long ago, even though the web-server's log is showing downloads from a just a few hours back. The file-system used to be mounted noatime, but I turned that option off some time ago. If I read one of those files (with head(1) or file(1), for example), the atime is updated. But if Apache serves it out -- it is not... There is no caching in Apache either. Any ideas? Thanks! -mi ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: web-serving does not update a file's atime?
Nathan Kinkade wrote: On Tue, Aug 17, 2004 at 08:35:45AM -0400, Mikhail Teterin wrote: Hello! I tried to use stat(1) to see the last time a file was downloaded through Apache. To my surprise, all three dates displayed by stat are long ago, even though the web-server's log is showing downloads from a just a few hours back. The file-system used to be mounted noatime, but I turned that option off some time ago. If I read one of those files (with head(1) or file(1), for example), the atime is updated. But if Apache serves it out -- it is not... There is no caching in Apache either. Is this all running on your local machine? If not, is it possible that there is a proxy server between you and the host running Apache? Perhaps a transparent proxy? There are not other servers and no proxies. The locally running apache logs successful requests for the files, but their atimes are not updated. Just checked -- the file was last downloaded 13 minutes ago, but all of the three time-stamps (according to stat(1)) point to many hours back... Thanks! -mi ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: web-serving does not update a file's atime?
On Tuesday 17 August 2004 07:29 pm, you wrote: = Mikhail Teterin [EMAIL PROTECTED] wrote: = Nathan Kinkade wrote: = = On Tue, Aug 17, 2004 at 08:35:45AM -0400, Mikhail Teterin wrote: = = Hello! = = I tried to use stat(1) to see the last time a file was downloaded = through Apache. = = To my surprise, all three dates displayed by stat are long ago, = even though the web-server's log is showing downloads from a just = a few hours back. = = The file-system used to be mounted noatime, but I turned that = option off some time ago. If I read one of those files (with = head(1) or file(1), for example), the atime is updated. But if = Apache serves it out -- it is not... There is no caching in Apache = either. = = Is this all running on your local machine? If not, is it possible = that there is a proxy server between you and the host running = Apache? Perhaps a transparent proxy? = = = There are not other servers and no proxies. The locally running = apache logs successful requests for the files, but their atimes are = not updated. = = Just checked -- the file was last downloaded 13 minutes ago, but all = of the three time-stamps (according to stat(1)) point to many hours = back... = = My guess on this would be that Apache is caching the file and has only = actually loaded it from disk once. = = Try stop/starting Apache and see if it has to reload the file to see = if my guess is correct. Apache is restarted regularly here by newsyslog... -mi ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
allowing LAN the direct access to outside DNS with ipfw
Hello! I'm using the `simple' template in /etc/rc.firewall to allow LAN to access the Internet from behind the firewall (FreeBSD-stable). There is a rule there: # Allow DNS queries out in the world ${fwcmd} add pass udp from any to any 53 keep-state and, indeed, the firewall machine itself has no problems accessing the outside name servers. However, when the LAN-machine(s) try it, the queries time out, while the firewall machine logs the following: ipfw: 3400 Deny UDP name.ser.ver.ip:53 192.168.1.3:1332 in via de0 All HOWTOs out there imply running a local nameserver on the firewall machine. Is there a way to go without that, but also without opening the firewall up to _all_ UDP packets, which happen to originate from port 53? What's the meaning of the keep-state clause in the rule above? I thought, it magically allows DNS-responses to come back only, but that does not work... Thank you! -mi ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
select(2)'s timeout argument
Why is the pointer to the `struct timeval' not declared as `const'? Can select(2) ever modify the structure pointed to? Thanks! -mi ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: select(2)'s timeout argument
=On Jun 29, 2004, at 2:11 PM, Mikhail Teterin wrote: = = Why is the pointer to the `struct timeval' not declared as `const'? = Can select(2) ever modify the structure pointed to? Thanks! Thank you very much, Lance, for the quick response! =Some versions of Linux modified timeval. Posix.1g specifies const =qualifier. I think most unixes don't modify it. I think ?? in the old =days some unixes did modify it. legacy and compatibility issues. If Posix.1g specifies const-ness and we don't, in fact, modify it, is it a bug, we don't declare it const? -mi ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Using syslog(3) after chroot-ing
Hello! I'm writing a daemon, which chroots after initialization. It uses syslog(3) extensively. I have already figured out, that I need to openlog() with LOG_NDELAY, otherwise syslog() will not find the syslogd's socket. Is there a similar trick to make it use the local timezone instead of UTC? I'm surprised, the time is interpreted by the sender (rather than by the syslogd-recipient), but it is -- and I want it to be local, without copying /etc/localtime into the chroot tree. Thanks! -mi ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: read vs. mmap (or io vs. page faults)
On Tuesday 22 June 2004 11:27 pm, Peter Wemm wrote: = mmap is more valuable as a programmer convenience these days. Don't = make the mistake of assuming its faster, especially since the cost of = a copy has gone way down. Actually, let me back off from agreeing with you here :-) On io-bound machines (such as my laptop), there is no discernable difference in either the CPU or the elapsed time -- md5-ing a file with mmap or read is (curiously) slightly faster than just cat-ing it into /dev/null. On an dual P2 450MHz, the single process always wins the CPU time and sometimes the elapsed time. Sometimes it wins handsomly: mmap: 35.271u 4.004s 1:06.08 59.4% 10+190k 0+0io 4185pf+0w read: 32.134u 15.797s 1:58.72 40.3% 408+302k 11228+0io 12pf+0w or mmap: 35.039u 4.558s 1:10.27 56.3%10+190k 5+0io 5028pf+0w read: 29.931u 27.848s 2:07.17 45.4% 10+187k 11219+0io 5pf+0w Mind you, both of the two processors are Xeons with _2Mb of cache on each_, so memory copying should be even cheaper on them than usual. And yet mmap manages to win... On a single P2 400MHz (standard 521Kb cache) mmap always wins the CPU time, and, thanks to that, can win the elapsed time on a busy system. For example, running two of these processes in parallel (on two separate copies of the same huge file residing on distinct disks) yields (same 1462726660-byte file as in the dual Xeon stats above): mmap: 66.989u 7.584s 3:01.76 41.0%5+238k 90+0io 22456pf+0w 65.474u 7.729s 2:38.59 46.1%5+241k 90+0io 22401pf+0w read: 60.724u 42.394s 3:37.01 47.5% 5+241k 22541+0io 0pf+0w 61.778u 41.987s 3:35.36 48.1% 5+239k 11256+0io 0pf+0w That's 182 vs. 215 seconds, or 15% elapsed time win for mmap. Evidently, mmap runs through that nasty nasty code faster than read runs through its. mmap loses on an idle system, I presume, because page-faulting is not smart enough to page-fault ahead as efficiently as read pre-reads ahead. Why am I complaining then? Because I want the nasty nasty code improved so that using mmap is beneficial for the single process too. Thank you very much! Yours, -mi ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: read vs. mmap (or io vs. page faults)
On Sunday 20 June 2004 08:16 pm, Julian Elischer wrote: = On Sun, 20 Jun 2004, Matthew Dillon wrote: [...] = It is usually a bad idea to try to populate the page table with = all resident pages associated with the a memory mapping, because = mmap() is often used to map huge files... [...] = pre-faulting is best done by a worker thread or child process, or it = will just slow you down.. Read is also used for large files sometimes, and never tries to prefetch the whole file at once. Why can't the same smarts/heuristics be employed by the page-fault handling code -- especially, if we are so proud of our unified caching? If anything mmap/madvise provide the kernel with _more_ information than read -- kernel just does not use it, it seems. According to my tests (`fgrep string /huge/file' vs. `fgrep --mmap string /huge/file') the total CPU time is much less with mmap. But sometimes the total wall clock time is longer with itj because the CPU is underutilized, when using the mmap method. 4.8-stable on Pentium2-400MHz mmap: 21.507u 11.472s 1:27.53 37.6% 62+276k 99+0io 44736pf+0w read: 10.619u 23.814s 1:17.67 44.3% 62+274k 11255+0io 0pf+0w recent -current on dual P2 Xeon-450MHz (mmap WINS -- SMP?) mmap: 12.482u 12.872s 2:28.70 17.0% 74+298k 23+0io 46522pf+0w read: 7.255u 16.366s 3:27.07 11.4%70+283k 44437+0io 7pf+0w recent -current on a Centrino-laptop P4-1GHz (NO win at all) mmap: 4.197u 3.920s 2:07.57 6.3% 65+284k 63+0io 45568pf+0w read: 3.965u 4.265s 1:50.26 7.4% 67+291k 13131+0io 17pf+0w Linux 2.4.20-30.9bigmem dual P4-3GHz (with a different file) mmap: 2.280u 4.800s 1:13.39 9.6% 0+0k 0+0io 512434pf+0w read: 1.630u 2.820s 0:08.89 50.0% 0+0k 0+0io 396pf+0w The attached md5-computing program is more CPU consuming than fgrep. It wins with mmap even on the sceptical Centrino-laptop -- presumably, because MD5_Update is not interrupted as much and remains in the instruction cache: read: 22.024u 8.418s 1:28.44 34.4%5+166k 10498+0io 4pf+0w mmap: 21.428u 3.086s 1:23.88 29.2%5+170k 40+0io 19649pf+0w Once mmap-handling is improved, all sorts of whole-file operations (bzip2, gzip, md5, sha1) can be made faster... -mi ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: read vs. mmap (or io vs. page faults)
=Both read and mmap have a read-ahead heuristic. The heuristic =works. In fact, the mmap heuristic is so smart it can read-behind =as well as read-ahead if it detects a backwards scan. Evidently, read's heuristics are better. At least, for this task. I'm, actually, surprised, they are _different_ at all. The mmap interface is supposed to be more efficient -- theoreticly -- because it requires one less buffer-copying, and because it (together with the possible madvise()) provides the kernel with more information thus enabling it to make better (at least -- no worse) decisions. That these theoretical advantages -- small or not -- are eaten by, what seems like, practical implementation deficiencies to the point, that using mmap is not only not faster, but frequently slower -- wallclock-wise -- is, in itself, a serious shortcoming, that stands between an OS and perfection. That other OSes have similar shortcomings simply gives us some breathing room from an advocacy point of view. I hope, my rhetoric will burn an itch in someone capable of addressing it technically :-) =The heuristic does not try to read megabytes and megabytes ahead, =however... Neither does the read-handling. =that might speed up this particular application a little, but it =would destroy performance for many other types of applications, =especially in a loaded environment. I'm not asking mmap (page fault handling) to cache any more aggressively, than read-handling does. =Well now hold a second... the best you can do here is compare relative =differences between mmap and read. This is all I am doing, actually. :-) =If you really want to compare operating systems, you have to run the =OS's and the tests on the same hardware. I am comparing relative differences between between read and mmap on different OSes. =: 4.8-stable on Pentium2-400MHz =: mmap: 21.507u 11.472s 1:27.53 37.6% 62+276k 99+0io 44736pf+0w =: read: 10.619u 23.814s 1:17.67 44.3% 62+274k 11255+0io 0pf+0w = =mmap 12% slower then read. 12% isn't much. Well, now we are venturing into the domain of humans' subjective perception... I'd say, 12% is plenty, actually. This is what some people achieve by rewriting stuff in assembler -- and are proud, when it works :-) =: recent -current on dual P2 Xeon-450MHz (mmap WINS -- SMP?) =: mmap: 12.482u 12.872s 2:28.70 17.0% 74+298k 23+0io 46522pf+0w =: read: 7.255u 16.366s 3:27.07 11.4%70+283k 44437+0io 7pf+0w = =mmap 39% faster. That's a significant difference. = =It kinda smells funny, actually... are you sure that you compiled =your FreeBSD-5 system with Witness turned off? There are no WITNESS options in the kernel's config file (unlike in NOTES). So, unless there has to be some sort of explicit NOWITNESS, I am sure. =: recent -current on a Centrino-laptop P4-1GHz (NO win at all) =: mmap: 4.197u 3.920s 2:07.57 6.3% 65+284k 63+0io 45568pf+0w =: read: 3.965u 4.265s 1:50.26 7.4% 67+291k 13131+0io 17pf+0w = =mmap 15% slower. =: Linux 2.4.20-30.9bigmem dual P4-3GHz (with a different file) =: mmap: 2.280u 4.800s 1:13.39 9.6% 0+0k 0+0io 512434pf+0w =: read: 1.630u 2.820s 0:08.89 50.0% 0+0k 0+0io 396pf+0w = =mmap 821% slower on Linux? With a different file? So these numbers =can't be compared to anything else (over and above the fact that this =machine is three times faster then any of the others). No, the file is different (as is the processor) -- relative performance difference only. I was quite surprised myself. My fmd5 program does not show such a dramatic difference, but `fgrep --mmap' is vastly slower on Linux, than the regular `fgrep'. Here are the results of the two new fgrep runs: mmap1: 1.450u 3.000s 0:46.00 9.6% 0+0k 0+0io 512439pf+0w read1: 1.830u 2.620s 0:09.51 46.7% 0+0k 0+0io 393pf+0w mmap2: 1.700u 4.040s 1:02.31 9.2% 0+0k 0+0io 512427pf+0w read2: 1.330u 3.150s 0:09.38 47.7% 0+0k 0+0io 396pf+0w =I'm not sure why you are complaining about FreeBSD. Because I have much higher expectations for it :-) I thought, I'll be able to use the powerful technique of presenting a Linux' superiority in some area to fire up rapid improvements in the same area in FreeBSD. Now I'm back to fighting the 12% gain is not worth the effort mentality. =:Once mmap-handling is improved, all sorts of whole-file operations =:(bzip2, gzip, md5, sha1) can be made faster... =Well, your numbers don't really say that. It looks like you might =eeek out a 10-15% improvement, and while this is faster it really =isn't all that much faster. It certainly isn't something to write =home about, and certainly not significant enough to warrant major =codework. Put it into perspective -- 10-15% is usually the difference between the latest processor and the previous one. People
Re: read vs. mmap (or io vs. page faults)
On Monday 21 June 2004 08:15 pm, Matthew Dillon wrote: = :The mmap interface is supposed to be more efficient -- theoreticly = :-- because it requires one less buffer-copying, and because it = :(together with the possible madvise()) provides the kernel with more = :information thus enabling it to make better (at least -- no worse) = :decisions. = Well, I think you forgot my earlier explanation regarding buffer = copying. = Buffer copying is a very cheap operation if it occurs = within the L1 or L2 cache, and that is precisely what is happening = when you read() int This could explain, why using mmap is not faster than read, but it does not explain, why it is slower. I'm afraid, your vast knowledge of the internals of the kernel workings obscure your vision. I, on the other hand, enjoy an almost total ignorance of it, and can see, that mmap interface _allows_ for a more (certainly, no _less_) efficient handling of the IO, than read. That the kernel is not using all the information passed to it, I can only explain by deficiencies/simplicity the implementation. This is, sort of, self-perpetuating -- as long as mmap is slower/less reliable, applications will be hesitant to use it, thus there will be little insentive to improve it. :-( = As you can see by your timing results, even on your fastest box, = processing a file around that size is only going to incur 1-2 = seconds of real time overhead to do the extra buffer copy. 2 = seconds is a hard number to beat. I'd rather call attention to my slower -- CPU-bound boxes. On them, the total CPU time spent computing md5 of a file is less with mmap -- by a noticable margin. But because the CPU is underutilized, the elapsed wall clock time is higher. As far as the cache-using statistics, having to do a cache-cache copy doubles the cache used, stealing it from other processes/kernel tasks. Here, again, is from my first comparision on the P2 400MHz: stdio: 56.837u 34.115s 2:06.61 71.8% 66+193k 11253+0io 3pf+0w mmap: 72.463u 7.534s 2:34.62 51.7% 5+186k 105+0io 22328pf+0w 91 vs. 78 seconds CPU time (15% win for mmap), but 126 vs. 154 elapsed (22% loss)? Why is the CPU so underutilized in the mmap case? There was nothing else running at the time. The CPU was, indeed, at about 88% utilization, according to top. This alone seems to invalidate some of what you are saying below about the immediate disadvantages of mmap on a modern CPU. Or is P2 400MHz not modern? May be, but the very modern Sparcs, on which FreeBSD intends to run are not much faster. = The mmap interface is not supposed to be more efficient, per say. = Why would it be? Puzzling question. Because the kernel is supplied with more information -- it knows, that I only plan to _read_ from the memory (PROT_READ), the total size of what I plan to read (mmap's len, optionally, madvise's len), and (optionally), that I plan to read sequentially (MADV_SEQUENTIONAL). With that information, the kernel should be able to decide how many pages to pre-fault in and, what and when to drop. Mmap also needs no CPU data-cache to read. If the device is capable of writing to memory directly (DMA?), the CPU does not need to be involved at all, while with read the data still has to go from the DMA-filled kernel buffer to the application buffer -- there being two copies of it in cache instead of none for just storing or one copy for processing. Also, in case of RAM shortage, mmap-ed pages can be just dropped, while the too large buffer needs to be written into swap. And mmap requires no application buffers -- win, win, and win. Is there an inherent lose somewhere, I don't see? Like: = On a modern cpu, where an L1 cache copy is a two cycle streaming = operation, the several hundred (or more) cycles it takes to process = a page fault or even just populate the page table is equivalent to a = lot of copied bytes. But each call to read also takes cycles -- in the user space (read() function) and in the kernel (the syscall). And there are a lot of them too... = mmap() is not designed to streamline large demand-page reads of = data sets much larger then main memory. Then it was not designed to take advantage of all the possibilities of the interface, I say. = mmap() works best for data that is already cached in the kernel, = and even then it still has a fairly large hurdle to overcome vs a = streaming read(). This is a HARDWARE limitation. Wait, HARDWARE? Which hardware issues are we talking about? You suggested, I pre-fault in the pages and Julian explained how best to do it. If that is, indeed, the solution, why is not kernel doing it for me, pre-faulting in the same number of bytes, that read pre-reads? = 15% is nothing anyone cares about except perhaps gamers. I = certainly couldn't care less about 15%. 50%, on the otherhand, = is something that I would care about. Well, here we have a server dedicated to
read vs. mmap (or io vs. page faults)
Hello! I'm writing a message-digest utility, which operates on file and can use either stdio: while (not eof) { char buffer[BUFSIZE]; size = read( buffer ...); process(buffer, size); } or mmap: buffer = mmap(... file_size, PROT_READ ...); process(buffer, file_size); I expected the second way to be faster, as it is supposed to avoid one memory copying (no user-space buffer). But in reality, on a CPU-bound (rather than IO-bound) machine, using mmap() is considerably slower. Here are the tcsh's time results: Single Pentium2-400MHz running 4.8-stable: -- stdio: 56.837u 34.115s 2:06.61 71.8% 66+193k 11253+0io 3pf+0w mmap: 72.463u 7.534s 2:34.62 51.7%5+186k 105+0io 22328pf+0w Dual Pentium2 Xeon 450MHz running recent -current: -- stdio: 36.557u 29.395s 3:09.88 34.7% 10+165k 32646+0io 0pf+0w mmap: 42.052u 7.545s 2:02.25 40.5%10+169k 16+0io 15232pf+0w On the IO-bound machine, using mmap is only marginally faster: Single Pentium4M (Centrino 1GHz) runing recent -current: stdio: 27.195u 8.280s 1:33.02 38.1%10+169k 11221+0io 1pf+0w mmap: 26.619u 3.004s 1:23.59 35.4%10+169k 47+0io 19463pf+0w Notice the last two columns in time's output -- why is page-faulting a page in -- on-demand -- so much slower then read()-ing it? I even tried inserting ``madvise(buffer, file_size, MADV_SEQUENTIAL)'' between the mmap() and the process() -- made difference at all (or made the mmap() take slightly longer)... I this how things are supposed to be, or will mmap() become more efficient eventually? Thanks! -mi ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: read vs. mmap (or io vs. page faults)
On Sunday 20 June 2004 11:41 am, Dan Nelson wrote: = In the last episode (Jun 20), Mikhail Teterin said: = I expected the second way to be faster, as it is supposed to avoid = one memory copying (no user-space buffer). But in reality, on a = CPU-bound (rather than IO-bound) machine, using mmap() is = considerably slower. Here are the tcsh's time results: = MADV_SEQUENTIAL just lets the system expire already-read blocks from = its cache faster, so it won't help much here. That may be what it _does_, but from the manual page, one gets an impression, it should tell the VM, that once a page is requested (and had to be page-faulted in), the one after it will be requested soon and may as well be prefeteched (and the ones before can be dropped if memory is in short supply). Anyway, using MADV_SEQUENTIAL is consintently making mmap behave slightly worse, rather then have no effect. But let's not get distracted with madvise(). Why is mmap() slower? So much so, that the machine, which is CPU-bound using read() only uses 90% of the CPU when using mmap -- while, at the same time -- the disk bandwidth is also less than that of the read(). It looks to me, like a lot of thought went into optimizing read(), but much less into mmap, which is supposed to be faster -- less memory shuffling. Is that true, is there something inherent in mmap-style of reading, that I don't see? = read() should cause some prefetching to occur, but it obviously = doesn't work all the time or else inblock wouldn't have been as high = as 11000. For sequential access I would have expected read() to have = been able to prefetch almost every block before the userland process = needed it. Thanks! -mi ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: read vs. mmap (or io vs. page faults)
On Sunday 20 June 2004 02:35 pm, you wrote: = = :I this how things are supposed to be, or will mmap() become more = :efficient eventually? Thanks! = : = : -mi = It's hard to say. mmap() could certainly be made more efficient, e.g. = by faulting in more pages at a time to reduce the actual fault rate. = But it's fairly difficult to beat a read copy into a small buffer. Well, that's the thing -- by mmap-ing the whole file at once (and by madvise-ing with MADV_SEQUENTIONAL), I thought, I told, the kernel everything it needed to know to make the best decision. Why can't page-faulting code do a better job using all this knowledge, than the poor read, which only knows about the partial read in question? I find it so disappointing, that it can, probably, be considered a bug. I'll try this code on Linux and Solaris. If mmap is better there (as it really ought to be), we have a problem, IMHO. Thanks! -mi ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: waking up from zzz(8)
On Sunday 02 May 2004 01:23 pm, Nate Lawson wrote: = On Sun, 2 May 2004, Mikhail Teterin wrote: = My Vaio laptop (5.2-current from April 7) duly goes to a quiet sleep = when I type `zzz'. = = Trouble is, I don't know, how to recover from that. If I hit a = keyboard key, there is some activity inside, but the screen never = turns on and rebooting seems to be my only option. = = The power button should wake the system if pressed briefly (don't hold = it down for more that 2-3 seconds since above that means hard power = off). Also, the lid switch should work if you close the lid and open = it again. That's what I thought. The laptop seems to wake up -- the lights come on, but the screen remains blank and the built-in NICs (fxp and ath) don't respond. I upgraded to Saturday's -current (May 1st) -- no changes. Thanks! -mi ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: waking up from zzz(8)
=Use a serial console. Sounds like your system is waking up but not =fully. The screen may be helped by loading acpi_video. I don't think, there is a serial port on this laptop. It has a built-in soft-modem, but no free serial port. I loaded the acpi_video: hw.acpi.video.crt0.active: 0 hw.acpi.video.tv0.active: 0 hw.acpi.video.out0.active: 0 hw.acpi.video.out1.active: 1 and will try to zzz again tonight. Should I be concerned about any of these values, though: hw.acpi.supported_sleep_state: S3 S4 S5 -- No S1? hw.acpi.power_button_state: S5 hw.acpi.lid_switch_state: S1 hw.acpi.standby_state: S1 hw.acpi.reset_video: 1 hw.acpi.disable_on_poweroff: 1 Thanks! -mi ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]