natd is with high cpu use
Hello, The natd is with 100% cpu usage. What is the issue ? can you help me with that ? CPU: 3.4% user, 0.0% nice, 22.2% system, 9.5% interrupt, 64.9% idle Mem: 161M Active, 493M Inact, 345M Wired, 652K Cache, 417M Buf, 2934M Free Swap: 4096M Total, 4096M Free PID USERNAME THR PRI NICE SIZERES STATE C TIME WCPU COMMAND 52273 root 1 1180 13200K 1640K CPU22 32:52 99.07% natd 833 nobody 1 440 11068K 4864K select 3 3:03 0.00% openvpn Regards, Savi DISCLAIMER : This email and any files transmitted with it are property of Poornam Info Vision Pvt. Ltd. This email contains confidential information intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender immediately and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: GELI file systems unusable after glabel label operations
On Thu, 14 Jan 2010 10:55:35 +0300 Boris Samorodov b...@ipt.ru wrote: Thanks so much for responding so fast! On Thu, 14 Jan 2010 01:31:55 -0600 (CST) Scott Bennett wrote: hellas# geli attach -k work.key /dev/label/work geli: Cannot read metadata from /dev/label/work: Invalid argument. Did you try to mount it via geom consumer (/dev/daX)? Um, no, a GELI-encrypted partition must first be attached. The attach operation fails, as shown above, so there's no way to mount it. Can you show apropriate glabel list? hellas# geom ELI list geom: Cannot get GEOM tree: Unknown error: -1 hellas# I'm afraid I'm clueless here. What should I try next? Scott Bennett, Comm. ASMELG, CFIAG ** * Internet: bennett at cs.niu.edu * ** * A well regulated and disciplined militia, is at all times a good * * objection to the introduction of that bane of all free governments * * -- a standing army. * *-- Gov. John Hancock, New York Journal, 28 January 1790 * ** ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: 8.0-R-p2 ZFS: unixbench causing kmem exhaustion panic
Doug Poland wrote: Ok, I re-ran with same config, but this time monitoring the sysctls you requested* ( and the rest I was watching ): I failed to mention that kstat.zfs.misc.arcstats.size seemed to fluctuate between about 164,000,00 and 180,000,000 bytes during this last run Is that with or without panicking? If the system did panic then it looks like the problem is a memory leak somewhere else in the kernel, which you could confirm by monitoring vmstat -z. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: GELI file systems unusable after glabel label operations
Scott Bennett wrote: I used glabel label to label each of the file systems I have on external disk drives. Unfortunately, afterward I am now unable to geli attach any of the GELI-encrypted file systems. The system is FreeBSD 7.2-STABLE. Hmm, did you say you had geli-encrypted drives, then you have overwritten the last sector with glabel, and then you are surprised you cannot get to the data any more? Or have I just lost everything in the encrypted file systems? I think you did. From the geli(8) man page: init ... The last provider’s sector is used to store metadata. From the glabel(8) man page: label ... metadata is stored in a provider’s last sector. If you did geli init ... da0 and then glabel label ... da0 then you have lost the geli metadata, which contains keys, etc. You might recover this, though, by reading geli(8) about the restore command. There is no way you can label your devices after you applied geli to them (which is one of the points of using geli...). You could destroy the geli layer (and the data), apply the label and then apply geli to the label. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: any port use /dev/dsp directly?
Gary Kline wrote: On Wed, Jan 13, 2010 at 08:37:46PM -0500, Glen Barber wrote: Gary Kline wrote: I have a couple short programs where I mess with /dev/dsp. I'll open check to be sure the speed is right, open in mono or stereo, c. is there anything is ports that uses this dev by opening, doing ioctls and so forth? I think I may need to flush my data before closing the FILE *FP. Not sure; just guessing. I don't know if this directly answers your question, but from sound(4): hw.snd.default_unit Default sound card for systems with multiple sound cards. When using devfs(5), the default device for /dev/dsp. Equivalent to a symlink from /dev/dsp to /dev/dsp${hw.snd.default_unit}. FWIW, www/linux-f10-flashplugin10 is using /dev/dsp0.0 on my system at the moment. Regards, Thanks, but I already read the sound man page. I am trying to emulate /bin/cat WAVEFILE /dev/dsp which works well by opening /dev/dsp, making sure everything is set, the writing the bytes of the WAVEFILE thru/into the device with a write() call. It works, the sound echoes, but at the end is an ugly HISSing or FI sound. Anybody seen anything like this? Doesn't hurt to ask, given the brainpower on this list. But this may be something I have got to figure out. (There doesn't seem to be any way of getting rid of that annoying HISS. ... .) I have no idea how /dev/dsp really works but what you say sounds like there is some canonical buffer size it expects - like 64 kB or something like that, and it (wrongly) interprets garbage memory past your write as sound data. Try creating a larger buffer and fill the memory past the end of your sound with zeroes. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
About device characteristics and CD/DVD drives
Hi, i have installed ftp://ftp.freebsd.org/pub/FreeBSD/ISO-IMAGES-amd64/8.0/8.0-RELEASE-amd64-dvd1.iso.gz with the intention to provide full technical support for libburn on FreeBSD. I myself am used to Linux and older workstation systems. The MMC stuff to operate CD drives seems to still work well, thanks to a contribution of bland in 2006 or alternatively the FreeBSD driver of upcomming libcdio-0.83. Nevertheless a few questions arised. Any link enhanced RTFM is welcome. - How to detect by a C program that a character device is indeed block-wise readable and writeable ? I.e. devices which would be block devices on Linux. libburn can emulate DVD+RW on regular files or random-access-read-write devices. I would like to use USB sticks as ISO 9660 multi-session storage. It already works by a hack that boldly regards any /dev/da[0-9] as block device. Eligible would be devices which allow to lseek(2), write(2), read(2) with 2 kB granularity. Does handbook 18.2 Device Names describe a hard rule ? Is every CAM CD drive accessible as /dev/cdN and is every /dev/cdN a CAM CD drive ? Is every /dev/daN a random-rw storage device ? What about fd, fla, sa, ad, ast ? - How to determine the storage capacity of a device file ? Most interesting with the random-access devices of the previous question. - How to revive a USB CD drive after power cycle ? How to kill a stuck cdrecord process ? $ cdrecord -v -sao -multi dev=2,0,0 test.iso reliably gets stuck with SATA and USB drive. (One should disable this mode.) The stuck SATA drive needs power cycle of the whole system. The USB drive should be resettable independently but FreeBSD does not make it accessible as /dev/cd* after a power cycle of the drive. It might have to do with the failed cdrecord run which still sat there and said: Writing pregap for track 1 at -150 (The -150 is normal with SAO. Being stuck is not. libburn SAO works fine on FreeBSD 8.0.) Nothing but reboot could end that process. On Linux, the same drive gets always back to life after being power-cycled or re-plugged. On FreeBSD i currently have to perform shutdown -p now a bit more often than i would like to. (Confessed: i provoke it intentionally.) Is there a hard reason why cdrecord is so old on the FreeBSD 8.0 DVD ? Is there a maintainer for it on FreeBSD ? I would like to cooperate. - Are there specs what mkisofs is supposed to do when preparing a bootable FreeBSD image ? Anything more than pointing an El Torito record to the boot file in the ISO image ? - Where to read about this phenomenon: - xterm on SuSE Linux 10.2 - ssh to FreeBSD 8.0 - Backspace key works, Delete key prints ~ Strange: My program xorriso uses libreadline. Its Delete key does work in the same SSH session. Only the one of the shell does not. - What is the meaning of the ruleset numbers ? I combined the advise of the libburn ports maintainer and handbook 18.5 USB Storage Devices. J.R. Oldroyd enabled my SATA drive cd0 by [localrules=10]. The other set [localrules=5] is composed from handbook and my guessing. If i do not repeat the lines about 'pass*' and 'cd*' in number 5, then the USB drive cd1,pass1 stays rw-r-. man 5 devfs.rules does not bring insight. I executed after each rules change: /etc/rc.d/devfs start Now working content of /etc/devfs.rules : # Advise by J.R.Oldroyd for SATA and libburn: [localrules=10] # rules for grip and xfburn support add path 'acd*' mode 0666 add path 'cd*' mode 0666 add path 'pass*' mode 0666 add path 'xpt*' mode 0666 # From handbook 18.5 : [localrules=5] # This is for USB sticks: add path 'da*' mode 0666 group operator # Why do i have to do this again for USB cd1 ? add path 'pass*' mode 0666 add path 'cd*' mode 0666 # This i need for USB cd0 if no atapicam is up add path 'xpt*' mode 0666 # This is needed for normal users with acd0 # if no atapicam is up add path 'acd*' mode 0666 (I know 0666 is very lax. My advise to users is to have an extra group for CD devices.) - Would there be interest in comments and small objections with handbook chapters 18.6 (CDs), 18.7 (DVDs), 18.12 (Backup) ? Especially 18.12.7 (dump(8) Period) could need a little discussion about why, what, and how to backup. Coordination seems indicated with 18.14 (Snapshots) and the optical media chapters. Have a nice day :) Thomas ___
Re: Q: recommendation for external USB disk
El día Tuesday, January 12, 2010 a las 08:12:17AM +0100, Bas Smeelen escribió: I use Freecom hard drive XS 1.5TB USB2.0 on our fallback servers as back-up disks. These are always connected to the servers for over half a year now. I have not had any problems with them and the price was ok. da1 at umass-sim0 bus 0 target 0 lun 0 da1: Freecom Hard Drive XS 1.00 Fixed Direct Access SCSI-2 device da1: 40.000MB/s transfers da1: 1430799MB (2930277168 512 byte sectors: 255H 63S/T 182401C) /dev/da1s1d on /usr/home/www/backup (ufs, local, soft-updates) This is on FreeBSD 7.2-RELEASE-p6 I ordered exactly this device. Your /dev/da1s1d let me think that you have created more than one partition... matthias -- Matthias Apitz t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e g...@unixarea.de - w http://www.unixarea.de/ Vote NO to EU The Lisbon Treaty: http://www.no-means-no.eu ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Q: recommendation for external USB disk
I use Freecom hard drive XS 1.5TB USB2.0 on our fallback servers as back-up disks. These are always connected to the servers for over half a year now. I have not had any problems with them and the price was ok. da1 at umass-sim0 bus 0 target 0 lun 0 da1: Freecom Hard Drive XS 1.00 Fixed Direct Access SCSI-2 device da1: 40.000MB/s transfers da1: 1430799MB (2930277168 512 byte sectors: 255H 63S/T 182401C) /dev/da1s1d on /usr/home/www/backup (ufs, local, soft-updates) This is on FreeBSD 7.2-RELEASE-p6 I ordered exactly this device. Your /dev/da1s1d let me think that you have created more than one partition... matthias It's only one partition. I created it with sysinstall. fb1:/ # fdisk /dev/da1 *** Working on device /dev/da1 *** parameters extracted from in-core disklabel are: cylinders=182401 heads=255 sectors/track=63 (16065 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=182401 heads=255 sectors/track=63 (16065 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 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 63, size 2930272002 (1430796 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 1023/ head 254/ sector 63 The data for partition 2 is: UNUSED The data for partition 3 is: UNUSED The data for partition 4 is: UNUSED fb1:/ # bsdlabel /dev/da1s1 # /dev/da1s1: 8 partitions: #size offsetfstype [fsize bsize bps/cpg] c: 29302720020unused0 0 # raw part, don't edit d: 293027200204.2BSD 2048 16384 28552 DISCLAIMER: This e-mail is for the intended recipient(s) only. Access, disclosure, copying, distribution or reliance on any of it by anyone else is prohibited. If you have received it by mistake please let us know by reply and then delete it from your system. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: GELI file systems unusable after glabel label operations
On Thu, 14 Jan 2010 10:30:00 +0100 Ivan Voras ivo...@freebsd.org wrote: Scott Bennett wrote: I used glabel label to label each of the file systems I have on external disk drives. Unfortunately, afterward I am now unable to geli attach any of the GELI-encrypted file systems. The system is FreeBSD 7.2-STABLE. Hmm, did you say you had geli-encrypted drives, then you have overwritten the last sector with glabel, and then you are surprised you cannot get to the data any more? No, I am not surprised, just disappointed that when I asked exactly that question on this list, the only response I got was one that missed the point of my question. So I experimented first with an unencrypted UFS2 file system and saw no problem with it. I then proceeded, but stupidly did it to both the primary encrypted file systems and the encrypted backup file system at the same time, so I can't restore from the backups I had taken because they are also hosed. Neither the man page nor the handbook covers the combination of a partition labeled by glabel label and encryption with GELI. Apparently, though, the two are completely incompatible. The label metadata have to be readable at boot time in order to create the /dev/label/whatever device file, but the metadata apparently occupy the same place as GELI metadata. What a mess. I have no idea how many hundreds, or perhaps thousands, of hours of work were lost, but it was a *lot* of time and effort. Or have I just lost everything in the encrypted file systems? I think you did. From the geli(8) man page: init ... The last providerâs sector is used to store metadata. From the glabel(8) man page: label ... metadata is stored in a providerâs last sector. That was why I had originally posted my questions. It seemed to me that the usage of that sector might have been designed in such a way as to allow both GELI and labeling to be used together. It seem, however, that that capability was not included in the design. If you did geli init ... da0 and then glabel label ... da0 then you have lost the geli metadata, which contains keys, etc. You might recover this, though, by reading geli(8) about the restore command. The restore only works if a backup operation had been done to produce a file from which to restore the metadata, which I had never done. There is no way you can label your devices after you applied geli to them (which is one of the points of using geli...). You could destroy the geli layer (and the data), apply the label and then apply geli to the label. As noted above, that would not work because then the label would not be readable at boot time. It now looks to me as though the only way the two could be used in combination would require that the label and the GELI metadata be stored in separate places and that the label would have to be applied *after* the GELI data were created, so that the label would be readable at boot time. So the two features are currently unusable in combination. That means that a GELI-encrypted partition cannot be mounted by a /dev/label/whatever device, which means, in effect, that a GELI- encrypted partition cannot be mounted from a drive in a multiple-drive system using a device name given in /etc/fstab. Such a partition has to be mounted manually with the device file name entered explicitly. :-( Now I have one more question. If I use the same key file to do a geli init on one of the damaged partitions, what will happen? Is there a chance that the rest of the data might then be accessible? Scott Bennett, Comm. ASMELG, CFIAG ** * Internet: bennett at cs.niu.edu * ** * A well regulated and disciplined militia, is at all times a good * * objection to the introduction of that bane of all free governments * * -- a standing army. * *-- Gov. John Hancock, New York Journal, 28 January 1790 * ** ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: GELI file systems unusable after glabel label operations
Scott Bennett wrote: As noted above, that would not work because then the label would not be readable at boot time. Yes it would. What you would have is a nested configuration, geli within a label. The label would be read when the device is present, then you would be able to attach the geli device (probably as /dev/label/blah.geli, I didn't try it). ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: 8.0-R-p2 ZFS: unixbench causing kmem exhaustion panic
On Thu, January 14, 2010 03:17, Ivan Voras wrote: Doug Poland wrote: Ok, I re-ran with same config, but this time monitoring the sysctls you requested* ( and the rest I was watching ): I failed to mention that kstat.zfs.misc.arcstats.size seemed to fluctuate between about 164,000,00 and 180,000,000 bytes during this last run Is that with or without panicking? with a panic If the system did panic then it looks like the problem is a memory leak somewhere else in the kernel, which you could confirm by monitoring vmstat -z. I'll give that a try. Am I looking for specific items in vmstat -z? arc*, zil*, zfs*, zio*? Please advise. -- Regards, Doug ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: 8.0-R-p2 ZFS: unixbench causing kmem exhaustion panic
2010/1/14 Doug Poland d...@polands.org: On Thu, January 14, 2010 03:17, Ivan Voras wrote: Doug Poland wrote: Ok, I re-ran with same config, but this time monitoring the sysctls you requested* ( and the rest I was watching ): I failed to mention that kstat.zfs.misc.arcstats.size seemed to fluctuate between about 164,000,00 and 180,000,000 bytes during this last run Is that with or without panicking? with a panic If the system did panic then it looks like the problem is a memory leak somewhere else in the kernel, which you could confirm by monitoring vmstat -z. I'll give that a try. Am I looking for specific items in vmstat -z? arc*, zil*, zfs*, zio*? Please advise. You should look for whatever is allocating all your memory between 180 MB (which is your ARC size) and 1.2 GB (which is your kmem size). ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
USB 3.0
I just found this regarding USB 3.0: Hewlett-Packard has begun shipping some Envy 15 laptop configurations with USB 3.0 technology, becoming one of the first PC makers to do so. The full article is available here: http://www.win7news.net/100114-HP-Laptop-USB3 Will FreeBSD be able to take advantage of this updated technology? -- Jerry ges...@yahoo.com |=== |=== |=== |=== | Vermouth always makes me brilliant unless it makes me idiotic. E. F. Benson ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: 8.0-R-p2 ZFS: unixbench causing kmem exhaustion panic
On Thu, January 14, 2010 08:50, Ivan Voras wrote: 2010/1/14 Doug Poland d...@polands.org: kstat.zfs.misc.arcstats.size seemed to fluctuate between about 164,000,00 and 180,000,000 bytes during this last run Is that with or without panicking? with a panic If the system did panic then it looks like the problem is a memory leak somewhere else in the kernel, which you could confirm by monitoring vmstat -z. I'll give that a try. Â Am I looking for specific items in vmstat -z? arc*, zil*, zfs*, zio*? Please advise. You should look for whatever is allocating all your memory between 180 MB (which is your ARC size) and 1.2 GB (which is your kmem size). OK, another run, this time back to vfs.zfs.arc_max=512M in /boot/loader.conf, and a panic: panic: kmem malloc(131072): kmem map too small: 1294258176 total allocated I admit I do not fully understand what metrics are important to proper analysis of this issue. In this case, I was watching the following within 1 second of the panic: sysctl kstat.zfs.misc.arcstats.size: 41739944 sysctl vfs.numvnodes: 678 sysctl vfs.zfs.arc_max: 536870912 sysctl vfs.zfs.arc_meta_limit: 134217728 sysctl vfs.zfs.arc_meta_used: 7228584 sysctl vfs.zfs.arc_min: 67108864 sysctl vfs.zfs.cache_flush_disable: 0 sysctl vfs.zfs.debug: 0 sysctl vfs.zfs.mdcomp_disable: 0 sysctl vfs.zfs.prefetch_disable: 1 sysctl vfs.zfs.recover: 0 sysctl vfs.zfs.scrub_limit: 10 sysctl vfs.zfs.super_owner: 0 sysctl vfs.zfs.txg.synctime: 5 sysctl vfs.zfs.txg.timeout: 30 sysctl vfs.zfs.vdev.aggregation_limit: 131072 sysctl vfs.zfs.vdev.cache.bshift: 16 sysctl vfs.zfs.vdev.cache.max: 16384 sysctl vfs.zfs.vdev.cache.size: 10485760 sysctl vfs.zfs.vdev.max_pending: 35 sysctl vfs.zfs.vdev.min_pending: 4 sysctl vfs.zfs.vdev.ramp_rate: 2 sysctl vfs.zfs.vdev.time_shift: 6 sysctl vfs.zfs.version.acl: 1 sysctl vfs.zfs.version.dmu_backup_header: 2 sysctl vfs.zfs.version.dmu_backup_stream: 1 sysctl vfs.zfs.version.spa: 13 sysctl vfs.zfs.version.vdev_boot: 1 sysctl vfs.zfs.version.zpl: 3 sysctl vfs.zfs.zfetch.array_rd_sz: 1048576 sysctl vfs.zfs.zfetch.block_cap: 256 sysctl vfs.zfs.zfetch.max_streams: 8 sysctl vfs.zfs.zfetch.min_sec_reap: 2 sysctl vfs.zfs.zil_disable: 0 sysctl vm.kmem_size: 1327202304 sysctl vm.kmem_size_max: 329853485875 sysctl vm.kmem_size_min: 0 sysctl vm.kmem_size_scale: 3 vmstat -z | egrep -i 'zfs|zil|arc|zio|files' ITEM SIZE LIMIT USED FREE REQUESTS Files: 80,0, 116, 199, 850713 zio_cache:720,0,53562, 98, 86386955 arc_buf_hdr_t:208,0, 1193, 31,11990 arc_buf_t: 72,0, 1180, 120,11990 zil_lwb_cache:200,0,11580, 2594,62407 zfs_znode_cache: 376,0, 605, 55, 654 vmstat -m |grep solaris|sed 's/K//'|awk '{print vm.solaris:, $3*1024}' solaris: 1285068800 The value I see as the culprit is vmstat -m | grep solaris. This value fluctuates wildly during the run and is always near kmem_size at the time of the panic. Again, I'm not sure what to look for here, and you are patiently helping me along in this process. If you have any tips or can point me to docs on how to easily monitor these values, I will endeavor to do so. -- Regards, Doug ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: 8.0-R-p2 ZFS: unixbench causing kmem exhaustion panic
2010/1/14 Doug Poland d...@polands.org: On Thu, January 14, 2010 08:50, Ivan Voras wrote: 2010/1/14 Doug Poland d...@polands.org: kstat.zfs.misc.arcstats.size seemed to fluctuate between about 164,000,00 and 180,000,000 bytes during this last run Is that with or without panicking? with a panic If the system did panic then it looks like the problem is a memory leak somewhere else in the kernel, which you could confirm by monitoring vmstat -z. I'll give that a try. Am I looking for specific items in vmstat -z? arc*, zil*, zfs*, zio*? Please advise. You should look for whatever is allocating all your memory between 180 MB (which is your ARC size) and 1.2 GB (which is your kmem size). OK, another run, this time back to vfs.zfs.arc_max=512M in /boot/loader.conf, and a panic: panic: kmem malloc(131072): kmem map too small: 1294258176 total allocated I admit I do not fully understand what metrics are important to proper analysis of this issue. In this case, I was watching the following within 1 second of the panic: sysctl kstat.zfs.misc.arcstats.size: 41739944 sysctl vfs.numvnodes: 678 sysctl vfs.zfs.arc_max: 536870912 sysctl vfs.zfs.arc_meta_limit: 134217728 sysctl vfs.zfs.arc_meta_used: 7228584 sysctl vfs.zfs.arc_min: 67108864 sysctl vfs.zfs.cache_flush_disable: 0 sysctl vfs.zfs.debug: 0 sysctl vfs.zfs.mdcomp_disable: 0 sysctl vfs.zfs.prefetch_disable: 1 sysctl vfs.zfs.recover: 0 sysctl vfs.zfs.scrub_limit: 10 sysctl vfs.zfs.super_owner: 0 sysctl vfs.zfs.txg.synctime: 5 sysctl vfs.zfs.txg.timeout: 30 sysctl vfs.zfs.vdev.aggregation_limit: 131072 sysctl vfs.zfs.vdev.cache.bshift: 16 sysctl vfs.zfs.vdev.cache.max: 16384 sysctl vfs.zfs.vdev.cache.size: 10485760 sysctl vfs.zfs.vdev.max_pending: 35 sysctl vfs.zfs.vdev.min_pending: 4 sysctl vfs.zfs.vdev.ramp_rate: 2 sysctl vfs.zfs.vdev.time_shift: 6 sysctl vfs.zfs.version.acl: 1 sysctl vfs.zfs.version.dmu_backup_header: 2 sysctl vfs.zfs.version.dmu_backup_stream: 1 sysctl vfs.zfs.version.spa: 13 sysctl vfs.zfs.version.vdev_boot: 1 sysctl vfs.zfs.version.zpl: 3 sysctl vfs.zfs.zfetch.array_rd_sz: 1048576 sysctl vfs.zfs.zfetch.block_cap: 256 sysctl vfs.zfs.zfetch.max_streams: 8 sysctl vfs.zfs.zfetch.min_sec_reap: 2 sysctl vfs.zfs.zil_disable: 0 sysctl vm.kmem_size: 1327202304 sysctl vm.kmem_size_max: 329853485875 sysctl vm.kmem_size_min: 0 sysctl vm.kmem_size_scale: 3 vmstat -z | egrep -i 'zfs|zil|arc|zio|files' ITEM SIZE LIMIT USED FREE REQUESTS Files: 80, 0, 116, 199, 850713 zio_cache: 720, 0, 53562, 98, 86386955 arc_buf_hdr_t: 208, 0, 1193, 31, 11990 arc_buf_t: 72, 0, 1180, 120, 11990 zil_lwb_cache: 200, 0, 11580, 2594, 62407 zfs_znode_cache: 376, 0, 605, 55, 654 vmstat -m |grep solaris|sed 's/K//'|awk '{print vm.solaris:, $3*1024}' solaris: 1285068800 The value I see as the culprit is vmstat -m | grep solaris. This value fluctuates wildly during the run and is always near kmem_size at the time of the panic. Again, I'm not sure what to look for here, and you are patiently helping me along in this process. If you have any tips or can point me to docs on how to easily monitor these values, I will endeavor to do so. The only really important ones should be kstat.zfs.misc.arcstats.size (which you very rarely print) and vm.kmem_size. The solaris entry above should be near kstat.zfs.misc.arcstats.size in all cases. But I don't have any more ideas here. Try taking this post (also include kstst.zfs.misc.arcstats.size) to the freebsd-fs@ mailing list. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: any port use /dev/dsp directly?
In the last episode (Jan 13), Gary Kline said: On Wed, Jan 13, 2010 at 08:37:46PM -0500, Glen Barber wrote: Gary Kline wrote: I have a couple short programs where I mess with /dev/dsp. I'll open check to be sure the speed is right, open in mono or stereo, c. is there anything is ports that uses this dev by opening, doing ioctls and so forth? I think I may need to flush my data before closing the FILE *FP. Not sure; just guessing. I don't know if this directly answers your question, but from sound(4): hw.snd.default_unit Default sound card for systems with multiple sound cards. When using devfs(5), the default device for /dev/dsp. Equivalent to a symlink from /dev/dsp to /dev/dsp${hw.snd.default_unit}. FWIW, www/linux-f10-flashplugin10 is using /dev/dsp0.0 on my system at the moment. Thanks, but I already read the sound man page. I am trying to emulate /bin/cat WAVEFILE /dev/dsp which works well by opening /dev/dsp, making sure everything is set, the writing the bytes of the WAVEFILE thru/into the device with a write() call. It works, the sound echoes, but at the end is an ugly HISSing or FI sound. You're probably playing an mp3-style tag at the end of the file, or some other metadata encoded in the wav file format. /dev/dsp takes raw bytes, and doesn't parse a file headers at all. A better way to play wav files would be to install the sox port and use its included play command, which will parse the wav file format and only send the audio data to /dev/dsp. It'll also play compressed audio files (mp3, or other non-raw wav encodings). If you want a simple example of how to play a raw sound file, try this. You can tell its age by the fact that it can play through /dev/pcaudio, but it still works :) #include sys/soundcard.h #include machine/pcaudioio.h #include stdlib.h #include fcntl.h #include stdio.h #include unistd.h int main(int argc, char *argv[]) { int fd; int rate = 8012; int bits = 8; int speaker = 0; int channels = 1; int c; int len; char buf[1024]; while ((c = getopt(argc, argv, r:b:c:s)) != EOF) { switch (c) { case 's': speaker = 1; break; case 'r': rate = atoi(optarg); break; case 'c': channels = atoi(optarg); break; case 'b': bits = atoi(optarg); break; case '?': case 'h': printf (play [-s] [-c channels] [-r rate] [-b bits] audio_file\n); exit(1); break; } } if (speaker) { audio_info_t ait; ait.play.sample_rate = rate; ait.play.encoding = AUDIO_ENCODING_RAW; ait.play.gain = 150; ait.play.pause = -1; fd = open(/dev/pcaudio, O_WRONLY); ioctl(fd, AUDIO_SETINFO, ait); } else { fd = open(/dev/dsp, O_WRONLY); ioctl(fd, SNDCTL_DSP_SETFMT, bits); ioctl(fd, SOUND_PCM_WRITE_RATE, rate); ioctl(fd, SOUND_PCM_WRITE_CHANNELS, channels); } while ((len = read(fileno(stdin), buf, sizeof(buf))) 0) write(fd, buf, len); return 0; } -- Dan Nelson dnel...@allantgroup.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: GELI file systems unusable after glabel label operations
On Thu, Jan 14, 2010 at 01:31:55AM -0600, Scott Bennett wrote: I used glabel label to label each of the file systems I have on external disk drives. Unfortunately, afterward I am now unable to geli attach any of the GELI-encrypted file systems. The system is FreeBSD 7.2-STABLE. Is there a way to get this to work? Or have I just lost everything in the encrypted file systems? Did you use 'geli init /dev/daXsY' and 'glabel label /dev/daXsY'? That will overwrite the geli metadata with the glabel metadata! Check /var/backups. There should be *.eli files there. Those are the automatic metadata backups that 'geli init' makes (at least in 8.0). You can restore those backups with 'geli restore'. Running 'geli init' again with the same parameters will not work, because 'geli init' uses a random component in the key generation. In other words, two inits with the same password will not generate the same key! What you should have done (for future refrence) is use geli(8) to create the encrypted device, then create a filesystem on that encrypted device with newfs(8) using the '-L' flag to set the volume name. Or use tunefs(8) to set the volume name later. These names will be automatically recognized next time you attach it and listed in /dev/ufs/. Roland -- R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) pgpHuSU1N8tAm.pgp Description: PGP signature
Regular Expression Editor
I am looking for a RegExp editor. I have one that I have used under Windows; however, it will not obviously work on FreeBSD. What I need is one that I can write the expression in and then have it test the expression for both syntax and against example text that I enter. I have not been able to locate a FOSS solution for that although there are numerous commercial products available. -- Carmel carmel...@hotmail.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Regular Expression Editor
Carmel == Carmel carmel...@hotmail.com writes: Carmel I am looking for a RegExp editor. I have one that I have used under Carmel Windows; however, it will not obviously work on FreeBSD. What I need is Carmel one that I can write the expression in and then have it test the Carmel expression for both syntax and against example text that I enter. I Carmel have not been able to locate a FOSS solution for that although there are Carmel numerous commercial products available. You need to be specific about the kind of regex. While most regexp engines have common things like . and * and ^ and $, the meanings may vary a bit, and the more exotic things are certainly going to vary. (For example, despite the name, Perl Compatible [sic] Regular Expressions are *not* Perl compatible.) What tool are you using your regexes with? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Problem with USB serial in linux emulation
Dear list. I have an USB smartcard reader that emulates a serial port. It uses the uftdi.ko kernel module and creates the following device nodes when plugged in. System is FreeBSD 7.2-RELEASE-p3 amd64. crw-rw 1 uucp dialer0, 110 Jan 14 19:27 /dev/cuaU0 crw-rw 1 uucp dialer0, 111 Jan 7 14:01 /dev/cuaU0.init crw-rw 1 uucp dialer0, 112 Jan 7 14:01 /dev/cuaU0.lock crw--- 1 root wheel 0, 107 Jan 14 19:25 /dev/ttyU0 crw--- 1 root wheel 0, 108 Jan 7 14:01 /dev/ttyU0.init crw--- 1 root wheel 0, 109 Jan 7 14:01 /dev/ttyU0.lock dmesg output: ucom0: FTDI USB - Serial, class 0/0, rev 1.10/4.00, addr 2 on uhub5 I'm trying to access it with a linux program and the program initializes and manages to read at least some basic info from the card but any further communication with the card results in the following message regardless of what device node I use: linux_sys_futex: unknown op 265 Same software and reader works on a pure linux machine. Does anyone have any hints on what I can do to try to track this problem down? Some clarification on what the difference is between cuaU0 and ttyU0 would be appreciated too and which of them I should use primarily. Regards Morgan ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
RE: NFS exporting mounted msdosfs subdir
Hi, A quick search on the internet shows that people use msdosfs with NFS, at least on NetBSD (sorry): http://arkiv.netbsd.se/?ml=dfbsd-bugsa=2004-04t=104901 My FreeBSD mount also shows that the msdosfs mount point is NFS exported. So, from the side of whether nfsd supports msdosfs, I am convinced. Any further idea for this error: 22:47:45.184593 IP 10.0.0.4.1973235244 10.0.0.2.nfs: 116 readdir [|nfs] 22:47:45.184707 IP 10.0.0.2.nfs 10.0.0.4.1973235244: reply ok 608 readdir 22:47:45.186389 IP 10.0.0.4.1973235245 10.0.0.2.nfs: 120 readdirplus [|nfs] 22:47:45.186499 IP 10.0.0.2.nfs 10.0.0.4.1973235245: reply ok 116 readdirplus ERROR: Operation not supported ? -Balazs From: cswi...@mac.com Date: Wed, 13 Jan 2010 14:24:55 -0800 To: sbre...@hotmail.com CC: freebsd-questions@freebsd.org Subject: Re: NFS exporting mounted msdosfs subdir Hi-- On Jan 13, 2010, at 1:52 PM, sbre...@hotmail.com wrote: Anyone has got an idea how this can be resolved? Thanks. Does FreeBSD even support NFS-exporting a locally mounted MS-DOS filesystem? Traditionally, NFS was implemented over the default UFS filesystem and it was common for other filesystem typess to not be exportable -- -Chuck ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org _ Windows Live: Friends get your Flickr, Yelp, and Digg updates when they e-mail you. http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Regular Expression Editor
On Thu, 14 Jan 2010 10:38:41 -0800 Randal L. Schwartz mer...@stonehenge.com replied: You need to be specific about the kind of regex. While most regexp engines have common things like . and * and ^ and $, the meanings may vary a bit, and the more exotic things are certainly going to vary. (For example, despite the name, Perl Compatible [sic] Regular Expressions are *not* Perl compatible.) What tool are you using your regexes with? OK, I was using RegExp Buddy http://www.regexbuddy.com/ on a Windows machine. I would like to find something similar to it for a FreeBSD environment. The expressions I create are used primarily with 'sieve' in conjunction with Dovecot. I am also thinking of possibly creating a few for use with Postfix. -- Jerry ges...@yahoo.com |=== |=== |=== |=== | Do not try to solve all life's problems at once -- learn to dread each day as it comes. Donald Kaul ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Problem with USB serial in linux emulation
Morgan Wesström wrote: Dear list. I have an USB smartcard reader that emulates a serial port. It uses the uftdi.ko kernel module and creates the following device nodes when plugged in. System is FreeBSD 7.2-RELEASE-p3 amd64. crw-rw 1 uucp dialer0, 110 Jan 14 19:27 /dev/cuaU0 crw-rw 1 uucp dialer0, 111 Jan 7 14:01 /dev/cuaU0.init crw-rw 1 uucp dialer0, 112 Jan 7 14:01 /dev/cuaU0.lock crw--- 1 root wheel 0, 107 Jan 14 19:25 /dev/ttyU0 crw--- 1 root wheel 0, 108 Jan 7 14:01 /dev/ttyU0.init crw--- 1 root wheel 0, 109 Jan 7 14:01 /dev/ttyU0.lock dmesg output: ucom0: FTDI USB - Serial, class 0/0, rev 1.10/4.00, addr 2 on uhub5 I'm trying to access it with a linux program and the program initializes and manages to read at least some basic info from the card but any further communication with the card results in the following message regardless of what device node I use: linux_sys_futex: unknown op 265 Same software and reader works on a pure linux machine. Does anyone have any hints on what I can do to try to track this problem down? Some clarification on what the difference is between cuaU0 and ttyU0 would be appreciated too and which of them I should use primarily. Adding some more info myself here. Initially I only copied the shared libraries the program needed from my Linux computer and loaded the linux kernel module. Installing the full linux_base-f10 port seems to get rid of the error message so it seems unrelated to the actual communication problem I experience. The program initially detects the card in the reader but as soon as I try to communicate with it, the program thinks the reader is empty. Does anyone recognize this behaviour? /Morgan ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: any port use /dev/dsp directly?
On Thu, Jan 14, 2010 at 10:57:17AM -0600, Dan Nelson wrote: In the last episode (Jan 13), Gary Kline said: On Wed, Jan 13, 2010 at 08:37:46PM -0500, Glen Barber wrote: Gary Kline wrote: I have a couple short programs where I mess with /dev/dsp. I'll open check to be sure the speed is right, open in mono or stereo, c. is there anything is ports that uses this dev by opening, doing ioctls and so forth? I think I may need to flush my data before closing the FILE *FP. Not sure; just guessing. I don't know if this directly answers your question, but from sound(4): hw.snd.default_unit Default sound card for systems with multiple sound cards. When using devfs(5), the default device for /dev/dsp. Equivalent to a symlink from /dev/dsp to /dev/dsp${hw.snd.default_unit}. FWIW, www/linux-f10-flashplugin10 is using /dev/dsp0.0 on my system at the moment. Thanks, but I already read the sound man page. I am trying to emulate /bin/cat WAVEFILE /dev/dsp which works well by opening /dev/dsp, making sure everything is set, the writing the bytes of the WAVEFILE thru/into the device with a write() call. It works, the sound echoes, but at the end is an ugly HISSing or FI sound. saved the program to /tmp, thanks! You're probably playing an mp3-style tag at the end of the file, or some other metadata encoded in the wav file format. /dev/dsp takes raw bytes, and doesn't parse a file headers at all. A better way to play wav files would be to install the sox port and use its included play command, which will parse the wav file format and only send the audio data to /dev/dsp. It'll also play compressed audio files (mp3, or other non-raw wav encodings). the hiss at the end probably is due to whatever metadata at the end of my WAV file. Can sox translate this file into a raw byte-stream of data that I can cat of write() into the device? (I thought that /dev/dsp was associated with the *.WAV files ... but evidently not.) If you want a simple example of how to play a raw sound file, try this. You can tell its age by the fact that it can play through /dev/pcaudio, but it still works :) Ear-to-ear!! gary -- Dan Nelson dnel...@allantgroup.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org The 7.79a release of Jottings: http://jottings.thought.org/index.php ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Problem with USB serial in linux emulation
Adding some more info myself here. Initially I only copied the shared libraries the program needed from my Linux computer and loaded the linux kernel module. Installing the full linux_base-f10 port seems to get rid of the error message so it seems unrelated to the actual communication problem I experience. The program initially detects the card in the reader but as soon as I try to communicate with it, the program thinks the reader is empty. Does anyone recognize this behaviour? /Morgan Debug output shows a read timeout. Are there any tricks with stty that has to be performed to make serial communication work through the linux emulation layer? /Morgan ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: any port use /dev/dsp directly?
In the last episode (Jan 14), Gary Kline said: On Thu, Jan 14, 2010 at 10:57:17AM -0600, Dan Nelson wrote: In the last episode (Jan 13), Gary Kline said: On Wed, Jan 13, 2010 at 08:37:46PM -0500, Glen Barber wrote: Gary Kline wrote: I have a couple short programs where I mess with /dev/dsp. I'll open check to be sure the speed is right, open in mono or stereo, c. is there anything is ports that uses this dev by opening, doing ioctls and so forth? A better way to play wav files would be to install the sox port and use its included play command, which will parse the wav file format and only send the audio data to /dev/dsp. It'll also play compressed audio files (mp3, or other non-raw wav encodings). the hiss at the end probably is due to whatever metadata at the end of my WAV file. Can sox translate this file into a raw byte-stream of data that I can cat of write() into the device? Didn't I just say that in the paragaph above? :) The sox port comes with its own play command that can parse many containers and encodings, including wav files. (I thought that /dev/dsp was associated with the *.WAV files ... but evidently not.) Well, it's an audio device, and wav files contain audio data, but that's about it. The driver doesn't parse its input looking for file headers or anything. If you're lucky and /dev/dsp's default settings happen to match the format of a raw-encoded wav file, then you can cat your file to /dev/dsp. But otherwise you'll get static. Try catting any of the sample wavs at http://en.wikipedia.org/wiki/WAV to /dev/dsp and see how many sound good. -- Dan Nelson dnel...@allantgroup.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Regular Expression Editor
In the last episode (Jan 14), Carmel said: On Thu, 14 Jan 2010 10:38:41 -0800 Randal L. Schwartz mer...@stonehenge.com replied: You need to be specific about the kind of regex. While most regexp engines have common things like . and * and ^ and $, the meanings may vary a bit, and the more exotic things are certainly going to vary. (For example, despite the name, Perl Compatible [sic] Regular Expressions are *not* Perl compatible.) What tool are you using your regexes with? OK, I was using RegExp Buddy http://www.regexbuddy.com/ on a Windows machine. I would like to find something similar to it for a FreeBSD environment. The expressions I create are used primarily with 'sieve' in conjunction with Dovecot. I am also thinking of possibly creating a few for use with Postfix. Have you tried running regexbuddy under Wine? For a small program like that it should work pretty well. -- Dan Nelson dnel...@allantgroup.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Regular Expression Editor
On Thu, 14 Jan 2010 15:22:13 -0600 Dan Nelson dnel...@allantgroup.com articulated: Have you tried running regexbuddy under Wine? For a small program like that it should work pretty well. I have no desire to use 'wine'. It would probably be a lot easier and simpler to simply use it on the Windows machine. I had thought that since RegExp are probably more commonly used on non-win32 machines that I would be able to locate a similar FOSS. Thanks anyway! -- Carmel carmel...@hotmail.com |=== |=== |=== |=== | Eating chocolate is like being in love without the aggravation. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Regular Expression Editor
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Carmel wrote: On Thu, 14 Jan 2010 15:22:13 -0600 Dan Nelson dnel...@allantgroup.com articulated: Have you tried running regexbuddy under Wine? For a small program like that it should work pretty well. I have no desire to use 'wine'. It would probably be a lot easier and simpler to simply use it on the Windows machine. I had thought that since RegExp are probably more commonly used on non-win32 machines that I would be able to locate a similar FOSS. Thanks anyway! Hi Carmel, How about Regex Coach? http://weitz.de/regex-coach/#older The older version (0.9.0) runs under Linux and FreeBSD, but the author has discontinued support for non-Windows platforms in the latest version. The old one may still be useful, and you get bonus points if you write a port for it! Cheers, Greg - -- Greg Larkin http://www.FreeBSD.org/ - The Power To Serve http://www.sourcehosting.net/ - Ready. Set. Code. http://twitter.com/sourcehosting/ - Follow me, follow you -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFLT5MF0sRouByUApARAvMdAJ9//xAI6e5NQOKe+yHZlHs+DQZDZwCghB4V ukUemVKBb0J5Go5prqiG7IQ= =mdN9 -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: any port use /dev/dsp directly?
On Thu, Jan 14, 2010 at 03:19:47PM -0600, Dan Nelson wrote: In the last episode (Jan 14), Gary Kline said: On Thu, Jan 14, 2010 at 10:57:17AM -0600, Dan Nelson wrote: In the last episode (Jan 13), Gary Kline said: On Wed, Jan 13, 2010 at 08:37:46PM -0500, Glen Barber wrote: Gary Kline wrote: I have a couple short programs where I mess with /dev/dsp. I'll open check to be sure the speed is right, open in mono or stereo, c. is there anything is ports that uses this dev by opening, doing ioctls and so forth? A better way to play wav files would be to install the sox port and use its included play command, which will parse the wav file format and only send the audio data to /dev/dsp. It'll also play compressed audio files (mp3, or other non-raw wav encodings). the hiss at the end probably is due to whatever metadata at the end of my WAV file. Can sox translate this file into a raw byte-stream of data that I can cat of write() into the device? Didn't I just say that in the paragaph above? :) The sox port comes with its own play command that can parse many containers and encodings, including wav files. I did see that. I'm wondering of theses is some sox translation that would do say %sox -w WAV -r [rawoutfile] I found that using your code, or part of it, I can do very nearly what my own dspplayer.c was doing. Only yours works and mine works with the hiss. I'm only using the dev/dsp part of your program; it reads from stdin; I well, I'm not sure where I screwup rats. time to take printouts and go in a corner and see why my 109-lines fails. --Of course, it worked before to create two flawless sine waves. I modified it, but not correctly. Meanwhile, I've rebuilt sox and will poke it with a stick! (I thought that /dev/dsp was associated with the *.WAV files ... but evidently not.) Well, it's an audio device, and wav files contain audio data, but that's about it. The driver doesn't parse its input looking for file headers or anything. If you're lucky and /dev/dsp's default settings happen to match the format of a raw-encoded wav file, then you can cat your file to /dev/dsp. But otherwise you'll get static. Try catting any of the sample wavs at http://en.wikipedia.org/wiki/WAV to /dev/dsp and see how many sound good. Wow, great; thanks for the pointer... -- Dan Nelson dnel...@allantgroup.com -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org The 7.79a release of Jottings: http://jottings.thought.org/index.php ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: any port use /dev/dsp directly?
On Thu, 14 Jan 2010 14:31:05 -0800, Gary Kline kl...@thought.org wrote: I'm wondering of theses is some sox translation that would do say %sox -w WAV -r [rawoutfile] That's possible, but you have to tell sox how the raw file should be parameterized, e. g. sampling frequency, channels, bit width. There are command line parameters that can be used for that, e. g. % sox mysound.wav -r 44100 -c 2 -w -s mysound.raw The type raw means that there's no header in the file, it's just the plain data, for example as the hardware CD player uses it (which is the CDR file format - CD audio). In this case, you have to specify how to build those raw data elements from the original waveform file (WAV does have a header that describes its content). -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: any port use /dev/dsp directly?
In the last episode (Jan 14), Gary Kline said: On Thu, Jan 14, 2010 at 03:19:47PM -0600, Dan Nelson wrote: The sox port comes with its own play command that can parse many containers and encodings, including wav files. I did see that. I'm wondering of theses is some sox translation that would do say %sox -w WAV -r [rawoutfile] Certainly; file conversion is one of the basic purposes of sox. Something like: sox myfile.wav -b 16 -e signed -r 22050 -c 2 myfile.raw will convert the wav file (whatever its format is) to a signed 16-bit stereo raw file. For raw files, you can also use special file extensions that specify the encoding (myfile.s16 for example, for a signed 16-bit file). Adding -V3 to the beginning of the command will print the full input and output specs, plus the filter chain required to do the conversion (if any). The sox and soxformat manpages are pretty comprehensive. -- Dan Nelson dnel...@allantgroup.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Regular Expression Editor
On Thu, 14 Jan 2010 14:24:49 -0500 Carmel carmel...@hotmail.com wrote: On Thu, 14 Jan 2010 10:38:41 -0800 Randal L. Schwartz mer...@stonehenge.com replied: You need to be specific about the kind of regex. While most regexp engines have common things like . and * and ^ and $, the meanings may vary a bit, and the more exotic things are certainly going to vary. (For example, despite the name, Perl Compatible [sic] Regular Expressions are *not* Perl compatible.) What tool are you using your regexes with? OK, I was using RegExp Buddy http://www.regexbuddy.com/ on a Windows machine. I would like to find something similar to it for a FreeBSD environment. The expressions I create are used primarily with 'sieve' in conjunction with Dovecot. I am also thinking of possibly creating a few for use with Postfix. Try this http://www.fastmail.fm/docs/sieve/sievetest.php It's based on Cyrus but AFAIK they both use the libc regex implementation. Sieve is a little odd in that you need double escaping In general I think most people would use command line tools to test expressions. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: any port use /dev/dsp directly?
On Thu, Jan 14, 2010 at 05:08:25PM -0600, Dan Nelson wrote: In the last episode (Jan 14), Gary Kline said: On Thu, Jan 14, 2010 at 03:19:47PM -0600, Dan Nelson wrote: The sox port comes with its own play command that can parse many containers and encodings, including wav files. I did see that. I'm wondering of theses is some sox translation that would do say %sox -w WAV -r [rawoutfile] Certainly; file conversion is one of the basic purposes of sox. Something like: sox myfile.wav -b 16 -e signed -r 22050 -c 2 myfile.raw will convert the wav file (whatever its format is) to a signed 16-bit stereo raw file. For raw files, you can also use special file extensions that specify the encoding (myfile.s16 for example, for a signed 16-bit file). Adding -V3 to the beginning of the command will print the full input and output specs, plus the filter chain required to do the conversion (if any). The sox and soxformat manpages are pretty comprehensive. yes, the man page is thorough, but almost unreadable, at least to me. i found a tutorial with exaples that should the WAV to RAW conversion. on my freebsd desktop, sox didn't like it. it kept echoing the usage. on my ubuntu system, sox failed completely complaining that that it wasn't set for auto . [?] I checked again here to see if sox as play would work, and it does. so at least that much works. the error output escapes me. doesn't the ``-r 22050'' specify the sampling rate? play FAIL formats: bad input format for file `myfile.raw': sampling rate was not specified -- Dan Nelson dnel...@allantgroup.com -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org The 7.79a release of Jottings: http://jottings.thought.org/index.php ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Regular Expression Editor
Carmel wrote: I am looking for a RegExp editor. I have one that I have used under Windows; however, it will not obviously work on FreeBSD. What I need is one that I can write the expression in and then have it test the expression for both syntax and against example text that I enter. I have not been able to locate a FOSS solution for that although there are numerous commercial products available. -- Carmel carmel...@hotmail.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org If you run Firefox, this addon is decent: https://addons.mozilla.org/en-US/firefox/addon/2077 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Regular Expression Editor
In general I think most people would use command line tools to test expressions. Although I favor command line tools for most of my work (if only, because it can work remotely, through a slow phone connection, across the world); I like The Regex Coach (GUI tool) because it highlights the various strings and substrings matched. Also I like it because the regex (as far as I have used it) have the exact syntax of Perl, so it is just a matter of cut paste: usefull to find a mistake in a long and intricated regex. Bests, Olivier ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Regular Expression Editor
2010/1/14 Carmel carmel...@hotmail.com: I am looking for a RegExp editor. I have one that I have used under Windows; however, it will not obviously work on FreeBSD. What I need is one that I can write the expression in and then have it test the expression for both syntax and against example text that I enter. I have not been able to locate a FOSS solution for that although there are numerous commercial products available. I've enjoying using Kodos[1] in the past. Andrew [1] http://kodos.sourceforge.net/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: any port use /dev/dsp directly?
On Thu, Jan 14, 2010 at 04:13:51PM -0800, Gary Kline wrote: On Thu, Jan 14, 2010 at 05:08:25PM -0600, Dan Nelson wrote: In the last episode (Jan 14), Gary Kline said: On Thu, Jan 14, 2010 at 03:19:47PM -0600, Dan Nelson wrote: The sox port comes with its own play command that can parse many containers and encodings, including wav files. I did see that. I'm wondering of theses is some sox translation that would do say %sox -w WAV -r [rawoutfile] Certainly; file conversion is one of the basic purposes of sox. Something like: sox myfile.wav -b 16 -e signed -r 22050 -c 2 myfile.raw will convert the wav file (whatever its format is) to a signed 16-bit stereo raw file. For raw files, you can also use special file extensions that specify the encoding (myfile.s16 for example, for a signed 16-bit file). Adding -V3 to the beginning of the command will print the full input and output specs, plus the filter chain required to do the conversion (if any). The sox and soxformat manpages are pretty comprehensive. Well, what I mentioned earlier about the similarities of the pcaudio.c code and my test code gave me the clue: In the read() and write(), the number of bytes read in before the read failed was the right number, len, to be written. In my test code I reused my code from 1996. Then my sizeof buf was valid because it was a simple sine wave. This time I was using a different array. gary -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org The 7.79a release of Jottings: http://jottings.thought.org/index.php ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Regular Expression Editor
Carmel == Carmel carmel...@hotmail.com writes: What tool are you using your regexes with? Carmel OK, I was using RegExp Buddy http://www.regexbuddy.com/ on a Windows Carmel machine. Nice non-answer. I'm sorry I wasn't clear. What *thing* will these regexs eventually be used in? PHP? Perl? Awk? Sed? Java? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Regular Expression Editor
On Thu, Jan 14, 2010 at 06:50:59PM -0800, Randal L. Schwartz wrote: Carmel == Carmel carmel...@hotmail.com writes: What tool are you using your regexes with? Carmel OK, I was using RegExp Buddy http://www.regexbuddy.com/ on a Windows Carmel machine. Nice non-answer. I'm sorry I wasn't clear. What *thing* will these regexs eventually be used in? PHP? Perl? Awk? Sed? Java? I don't know if I've just overlooked your presence before, or if this is actually the first time I've seen a comment from you on this mailing list, but hi, Randal. Okay, that aside: I think you must have overlooked the part where Carmel mentioned writing regexen for use with sieve+Dovecot and possibly with Postfix. I get the impression from that and later comments in the thread that Carmel is particularly focused on sieve's regex syntax, which may use libc's regex implementation. -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] pgpQLPctP5cuG.pgp Description: PGP signature
Re: GELI file systems unusable after glabel label operations
On Thu, 14 Jan 2010 18:42:32 +0100 Roland Smith rsm...@xs4all.nl On Thu, Jan 14, 2010 at 01:31:55AM -0600, Scott Bennett wrote: I used glabel label to label each of the file systems I have on ex= ternal disk drives. Unfortunately, afterward I am now unable to geli attach a= ny of the GELI-encrypted file systems. The system is FreeBSD 7.2-STABLE. Is t= here a way to get this to work? Or have I just lost everything in the encrypt= ed file systems? Did you use 'geli init /dev/daXsY' and 'glabel label /dev/daXsY'? That will overwrite the geli metadata with the glabel metadata!=20 It has been a long time since I created those GELI partitions, but I think I used the geli init -K keyfilename /dev/daXsYP, where P is the partition identifier in slice Y of drive X. What I did when I screwed the pooch on this was of the form glabel label fsname /dev/daXsYP, which I had thought would produce a /dev/label/fsname device and that doing a geli attach afterward would produce a /dev/label/fsname.eli device. Check /var/backups. There should be *.eli files there. Those are the automa= tic No joy. :-( metadata backups that 'geli init' makes (at least in 8.0). You can restore those backups with 'geli restore'. Those must be new in 8.0. I don't see any in 7.2, just {aliases,group, master.passwd}.bak{,2} in /var/backups. Running 'geli init' again with the same parameters will not work, because 'geli init' uses a random component in the key generation. In other words, = two inits with the same password will not generate the same key! Is there some way to recover using the existing key files, which I do still have? And of course, I do know the passphrases. What you should have done (for future refrence) is use geli(8) to create the encrypted device, then create a filesystem on that encrypted device with newfs(8) using the '-L' flag to set the volume name. Or use tunefs(8) to set the volume name later. These names will be automatically recognized next ti= me you attach it and listed in /dev/ufs/. Thank you for that information. If only it had been laid out that way in the man page of the handbook when I read it before starting on the labeling procedure...sigh. I have a new 1 TB drive that I will soon connect to the system and begin creating file systems. I will make gzipped image files with dd(1) of the damaged partitions and store them on the new drive for a while in case a workable idea turns up. Scott Bennett, Comm. ASMELG, CFIAG ** * Internet: bennett at cs.niu.edu * ** * A well regulated and disciplined militia, is at all times a good * * objection to the introduction of that bane of all free governments * * -- a standing army. * *-- Gov. John Hancock, New York Journal, 28 January 1790 * ** ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org