failure - write_dma issue
One of my servers -- I believe running 6.x -- developed a HD problem last night. The console was displaying the following, over and over again: g_vfs_done():ad0s1d[WRITE(offset=970506240, length=-16384)error= 5 ad0: FAILURE - WRITE_DMA status=71 error=4 LBA=3918703 My FreeBSD servers have been quite reliable since I started using them 4 or 5 years ago, so I don't have much experience debugging them. Can anyone give me a hint about what might be wrong (I assume with the HD), and how/if it might be fixable? TIA: John “Wealth is the ability to fully experience life.” – Henry David Thoreau ___ 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: IP Address not working?
Well, I figured it out. There was another machine configured with the same address. I was pinging another machine, in other words. The address is in my address range, but it isn't one of my two machines in the rack, so I'm working with the colo guys to figure out what is sitting on my address. A nice way to waste a morning! Thanks for your help, guys. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
IP Address not working?
I have a Freebsd box that has had just one IP address for a long time. I am trying to add another to run a website with it's own IP, ssl cert, etc. I've added IP addresses to boxes before without problem, but either this box has a problem, or I've forgotten something important (probably the latter.) on# uname -a FreeBSD on.identry.com 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May 1 07:18:07 UTC 2009 r...@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 I have the new address (66.111.0.251) configured: on# ifconfig em0: flags=8843 metric 0 mtu 1500 options=19b ether 00:0e:0c:ea:af:c2 inet 66.111.0.250 netmask 0xffc0 broadcast 66.111.0.255 inet 66.111.0.251 netmask 0x broadcast 66.111.0.251 media: Ethernet autoselect (100baseTX ) status: active The interface responds to pings: $ ping 66.111.0.251 PING 66.111.0.251 (66.111.0.251): 56 data bytes 64 bytes from 66.111.0.251: icmp_seq=0 ttl=20 time=16.474 ms And IFF I am logged into the server I can access the website using lynx, or by using telnet to access the page: on# telnet test.gradedstamps.com 80 Trying 66.111.0.251... Connected to test.gradedstamps.com. Escape character is '^]'. GET /test.html HTTP/1.1 host: test.gradedstamps.com HTTP/1.1 200 OK Date: Fri, 25 Mar 2011 12:25:40 GMT Server: Apache/2.2.14 (FreeBSD) mod_ssl/2.2.14 OpenSSL/0.9.8e PHP/5.2.12 with Suhosin-Patch Last-Modified: Fri, 25 Mar 2011 12:17:16 GMT ETag: "439155-63-49f4d93188b00" Accept-Ranges: bytes Content-Length: 99 Content-Type: text/html Test Page Hello, world However, I cannot access the website from outside the box, even with PF turned off: ~ 510 $ telnet test.gradedstamps.com 80 Trying 66.111.0.251... telnet: connect to address 66.111.0.251: Connection refused telnet: Unable to connect to remote host ~ 511 $ I'm stumped. Can anyone give me a clue where to look next? Thanks: John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: can't use godaddy SSL cert
Don't know if this applies, but I had to install the intermediate cert to get the godaddy Certs to work. You can download it from the gd website. -- John Sent from my iPhone, so may be a bit brief. On Nov 25, 2010, at 11:26, bluethundr wrote: > Hey list, > > I was having a similar SSL/openLDAP problem to this last week. I had > a chance to look at this again today and it still appears to not be > working. I called godaddy and had the last cert cancelled and reissued > as I had mis-typed the name of the CN on the last one. > > I am trying to setup a Godaddy turbo SSL certificate with an openLDAP > 2.4 server under FreeBSD 8.1. > > [r...@lbsd2:/usr/home/bluethundr]#pkg_info | grep openldap > openldap-sasl-client-2.4.23 Open source LDAP client implementation > with SASL2 support > openldap-sasl-server-2.4.23 Open source LDAP server implementation > > > > I have setup the certificate chain in my slapd.conf like so: > > [r...@lbsd2:/usr/home/bluethundr]#grep -i tls > /usr/local/etc/openldap/slapd.conf## TLS options for slapd > TLSCipherSuite HIGH:MEDIUM:+SSLv2 > TLSCertificateFile /usr/local/etc/openldap/cacerts/LBSD2.summitnjhome.com.crt > TLSCertificateKeyFile /usr/local/etc/openldap/cacerts/slapd.pem > TLSCACertificateFile /usr/local/etc/openldap/cacerts/sf_issuing.crt > > I have tried each of the following certs with no luck in getting my > cert to talk to it's CA: > > -rw-r--r-- 1 root bluethundr 2604 Nov 25 11:37 ca_bundle.crt > -r--r- 1 root ldap4604 Nov 24 18:57 gd_bundle.crt > -r--r- 1 root ldap1537 Nov 25 02:00 sf_issuing.crt > > > and I get the same result for each when I attempt to connect to SSL on > the LDAP server: > > [r...@lcent01:/tmp/Foswiki-1.1.2]#openssl s_client -connect > ldap.example.com:389 -showcerts -CAfile sf_issuing.crt > 13730:error:02001002:system library:fopen:No such file or > directory:bss_file.c:122:fopen('sf_issuing.crt','r') > 13730:error:2006D080:BIO routines:BIO_new_file:no such file:bss_file.c:125: > 13730:error:0B084002:x509 certificate > routines:X509_load_cert_crl_file:system lib:by_file.c:279: > CONNECTED(0003) > 13730:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake > failure:s23_lib.c:188: > > > ldapsearch -h ldap.example.com -d -1 -ZZ "dc=example,dc=com" > > TLS certificate verification: depth: 0, err: 20, subject: > /O=LBSD2.summitnjhome.com/OU=Domain Control > Validated/CN=LBSD2.summitnjhome.com, issuer: > /C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, > Inc./OU=http://certificates.godaddy.com/repository/CN=Go Daddy Secure > Certification Authority/serialNumber=07969287 > TLS certificate verification: Error, unable to get local issuer certificate > tls_write: want=7, written=7 > : 15 03 01 00 02 02 30 ..0 > TLS trace: SSL3 alert write:fatal:unknown CA > TLS trace: SSL_connect:error in SSLv3 read server certificate B > TLS trace: SSL_connect:error in SSLv3 read server certificate B > TLS: can't connect. > ldap_perror > ldap_start_tls: Connect error (-11) >additional info: error:14090086:SSL > routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed > > It seems to indicate that it can't talk to it's CA... > > does anyone have any suggestions on how to make this work? > > thanks! > > > -- > Here's my RSA Public key: > gpg --keyserver pgp.mit.edu --recv-keys B6D6EAC3 > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: 1 file system, 2 drives?
John Almberg wrote: If you have hardware controller with RAID capabilities, using native RAID is better, otherwise look towards gvinum or maybe ccd; see also: I've just been reading up on RAID in my Absolute FreeBSD book, and it occurs to me that my client has a SCSI RAID drive chassis that he is using stupidly... It's a 14 bay drive, and he's currently got seven 32G drives stuck in it, configured with RAID-0. This is the original 200G drive I was talking about. It's a few years old. Over the next few years, this guy is going to need lots of storage for his videos. After a bit of reading, I'm wondering if the best idea might be to toss out those 32G drives and replace them with 3 big (say, 300G) drives configured with RAID-5. It sounds to me like a RAID-5 array can be expanded by adding new drives. QUESTION: is expansion normally a matter of just plugging in a new drive? Is the new drive automatically grafted onto the old drives? Or do you have to go through a process like, backing up the data, plugging in the new drive, reformatting the expanded array of drives, and restoring the data. I don't know the brand/model of the RAID drive chassis, but the client thinks it can be switched to use RAID 5. I'm waiting for the technical details, but assuming it can handle RAID-5 for now. Answering my own question... So its a HP 6402 / 128 RAID controller. From a quick skim of the manual, it looks like the controller has to go through an 'expansion' process when adding a new drive. This sounds time consuming, but more or less automatic -- i.e., handled by the controller. Sounds like this might be the best way to go. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: 1 file system, 2 drives?
If you have hardware controller with RAID capabilities, using native RAID is better, otherwise look towards gvinum or maybe ccd; see also: I've just been reading up on RAID in my Absolute FreeBSD book, and it occurs to me that my client has a SCSI RAID drive chassis that he is using stupidly... It's a 14 bay drive, and he's currently got seven 32G drives stuck in it, configured with RAID-0. This is the original 200G drive I was talking about. It's a few years old. Over the next few years, this guy is going to need lots of storage for his videos. After a bit of reading, I'm wondering if the best idea might be to toss out those 32G drives and replace them with 3 big (say, 300G) drives configured with RAID-5. It sounds to me like a RAID-5 array can be expanded by adding new drives. QUESTION: is expansion normally a matter of just plugging in a new drive? Is the new drive automatically grafted onto the old drives? Or do you have to go through a process like, backing up the data, plugging in the new drive, reformatting the expanded array of drives, and restoring the data. I don't know the brand/model of the RAID drive chassis, but the client thinks it can be switched to use RAID 5. I'm waiting for the technical details, but assuming it can handle RAID-5 for now. Thanks: John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: 1 file system, 2 drives?
Volodymyr/Chuck, Is it possible to use the second drive to 'expand' the /videos file system? So it would miraculously look like a single 400G drive? The canonical way of doing this is to either create a RAID-0 concat or stripe volume. Wow, of course... I should have thought of that. Something like that should be just what the Dr. ordered. I will look into it. Thanks: John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
1 file system, 2 drives?
One of my clients has a server that hosts big public-access type videos. He started off with a separate 200G drive just for video storage (FreeBSD is on another drive). This video storage drive is mounted as /videos. He's just bought another drive, but now I'm thinking of what to do with it... I know this is probably impossible, but FreeBSD can do so many miraculous things, that I can't help asking... Is it possible to use the second drive to 'expand' the /videos file system? So it would miraculously look like a single 400G drive? I ask this, because logically, I"m going to use the second drive the same way as the first: to store videos. It will be really awkward to have two mount points, and try to decide which video should get stored on which drive. And no doubt it will get more complex as we go along. It would be much simpler if this logical drive could just expand as needed. Any ideas much appreciated. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: shrinking swap space
Robert & Chuck, Thanks for your answers... they sound like good clues. I'll need to read up some more to understand the answers :-) Thanks! -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
shrinking swap space
Since my server locked me out last week because it was out of swap space, I've been monitoring the swap space every 4 hours. It started off with 3% used and little by little it has crept up to 17% this morning. I've been reading up on the subject in my two FreeBSD books (Absolute and Complete) but neither give me a hint on how to find the program(s) that are slowly eating up my swap space. Is there a utility that shows which programs are using swap space? Or that can help debug this problem? Thanks: JOhn ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: ssh_exchange_identification: Connection closed by remote host
If you can't log in -- even on the console -- then rebooting is really your only option. Ctrl-Alt-Del should bring the system down cleanly if you haven't disabled that functionality. Otherwise, just toggle the power. The symptoms you're seeing could well be due to filesystem problems or to some filesystem filling up (/tmp is a prime suspect) or due to running out of memory+swap. Some sort of memory leak sounds pretty likely actually. Probably best to bring the system up in single user mode and run fsck on all the filesystems manually -- that will show if you've got h/w problems with drives and possibly with disk controllers or cabling too. Then check for overfull filesystems. You may not find any -- rebooting can clear a number of conditions where disk space is not released back to the OS properly after use. You may or may not find any clues as to what went wrong in the system logs. In the absence of any other clues, the only option is to monitor the server closely and wait for something similar to happen again. Hopefully if there is a next time, you'll be able to catch it and fix the underlying problem before it takes the machine out a second time. Yes, I can't log in. I get a login prompt, but no password prompt. I'm going to try ctrl-alt-del and see what happens. Crossing fingers... Sorry I missed that you can't login. Good luck So, ctrl-alt-del did the trick. I was able to log in and actually, the whole box came up and everything seems to be working. I thought for sure I'd find that my /var directory was full up, but it's only at 77% (that's the weak spot on this box... I wish I'd made the /var partition bigger.) The message log is full of these messages: 38054 Jul 2 08:13:02 qu kernel: swap_pager_getswapspace(16): failed If I run swapinfo, I get this: [mas...@qu:log]> swapinfo Device 1K-blocks UsedAvail Capacity /dev/ar0s1b 2055952 208 2055744 0% I looked back in the log file to see if there were any clues when the problem began and found this: Jul 2 03:19:25 qu kernel: swap_pager: out of swap space Jul 2 03:19:26 qu kernel: swap_pager_getswapspace(7): failed Jul 2 03:19:26 qu kernel: pid 93543 (mysqld), uid 88, was killed: out of swap space Jul 2 03:19:26 qu kernel: pid 85077 (ruby18), uid 1023, was killed: out of swap space Jul 2 03:19:25 qu root: Check for bad ssh behavior Jul 2 03:20:05 qu root: Check for bad ssh behavior Jul 2 03:20:49 qu kernel: swap_pager_getswapspace(16): failed Jul 2 03:20:49 qu kernel: swap_pager_getswapspace(15): failed Jul 2 03:20:49 qu kernel: swap_pager_getswapspace(14): failed Jul 2 03:20:49 qu kernel: swap_pager_getswapspace(16): failed Jul 2 03:20:49 qu last message repeated 2 times It pretty much goes on forever from there. Is there any other place I can look for clues as to why I ran out of swap space? This machine is basically a webserver, running apache/mysql and ruby on rails. It's been running for over a year with no problems. No new software introduced on the box, recently. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: ssh_exchange_identification: Connection closed by remote host
On that subject... does Ctrl-Alt-Del initiate an orderly shutdown? If you can't log in -- even on the console -- then rebooting is really your only option. Ctrl-Alt-Del should bring the system down cleanly if you haven't disabled that functionality. Otherwise, just toggle the power. The symptoms you're seeing could well be due to filesystem problems or to some filesystem filling up (/tmp is a prime suspect) or due to running out of memory+swap. Some sort of memory leak sounds pretty likely actually. Probably best to bring the system up in single user mode and run fsck on all the filesystems manually -- that will show if you've got h/w problems with drives and possibly with disk controllers or cabling too. Then check for overfull filesystems. You may not find any -- rebooting can clear a number of conditions where disk space is not released back to the OS properly after use. You may or may not find any clues as to what went wrong in the system logs. In the absence of any other clues, the only option is to monitor the server closely and wait for something similar to happen again. Hopefully if there is a next time, you'll be able to catch it and fix the underlying problem before it takes the machine out a second time. Yes, I can't log in. I get a login prompt, but no password prompt. I'm going to try ctrl-alt-del and see what happens. Crossing fingers... ___ 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: ssh_exchange_identification: Connection closed by remote host
Bas Smeelen wrote: On 07/02/2010 01:28 PM, John Almberg wrote: Christer Solskogen wrote: On Fri, Jul 2, 2010 at 12:52 PM, John Almberg wrote: ~ 510 $ ssh m...@my.example.com ssh_exchange_identification: Connection closed by remote host Locked account, maybe? I've tried several accounts and they all give the same result. There's also the fact that FTP and Apache seem to be broken, as well. It could be that your /var filesystem filled up I'm on the console, now. Looks like a swapspace problem... The first terminal is scrolling by the swapspace messages really fast (it kills httpd, but then starts again). I tried logging in on the 2nd and 3rd virtual console, but hangs after I type root - never prompts for password. Is there anything I can do besides rebooting? On that subject... does Ctrl-Alt-Del initiate an orderly shutdown? -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: ssh_exchange_identification: Connection closed by remote host
Christer Solskogen wrote: On Fri, Jul 2, 2010 at 12:52 PM, John Almberg wrote: ~ 510 $ ssh m...@my.example.com ssh_exchange_identification: Connection closed by remote host Locked account, maybe? I've tried several accounts and they all give the same result. There's also the fact that FTP and Apache seem to be broken, as well. ___ 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"
ssh_exchange_identification: Connection closed by remote host
Hi guys, Woke up this morning and discovered that one of my FreeBSD 7.2 servers was down. When I try to SSH into the box, I get this: ~ 510 $ ssh m...@my.example.com ssh_exchange_identification: Connection closed by remote host FTP doesn't work, either, but the DNS server on the machine responds to queries, and I can ping the box. Any ideas on what might be the problem? Thanks: John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Add watermark to PDF
Thanks CP, Nathan, & Kevin. You've given me some good places to start looking. -- John C. P. Ghost wrote: On Tue, Jun 1, 2010 at 4:15 PM, John Almberg wrote: So basically this script would have to read in the PDF and (ideally) a plain text file, and output a PDF with the plain text merged into the PDF as a footer. Maybe this will help? http://www.reportlab.com/software/opensource/rl-toolkit/ There's even a FreeBSD port for it: print/py-reportlab2 Any ideas, much appreciated. -- John -cpghost. ___ 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"
Add watermark to PDF
I've just spent a couple hours googling for an answer to this question without success... This is probably a bit off topic, but this list seems to be able to come up with answers to questions that stump other lists, so... I would like to add a customized footer (a stamp or watermark) to an existing PDF, like the guys at Pragmatic Programmers do with their PDFs. So basically this script would have to read in the PDF and (ideally) a plain text file, and output a PDF with the plain text merged into the PDF as a footer. Anyone know of an existing utility that might do something like this? Probably not, so anyone know of a PDF library that I could use to roll my own? I'm competent in Perl, PHP, and Ruby, and at this point, would be willing to learn Sanskrit if it could solve this problem for me. Unfortunatley, I've never done any PDF programming, so not quite sure where to start. Any ideas, much appreciated. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Why does soft link in /var/log disappear?
I didn't make my /var partition big enough, way back when, and have had to move my /var/log/www directory to another partition. I did this by moving the directory, and then adding a soft link from /var/log to the moved directory, using something like: ln -s /home/wwwlog /var/log/www This works great, but something is deleting the soft link. Is there anything in the freebsd base that 'cleans up' the /var/log directory? Any hints on how I can discover what is doing this clean up, or a way to protect this link from being deleted? Thanks: John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
required apache22 modules
I'm installing Apache22 on a new server and for once, I'd like to install just the modules I need, instead of the default mess. I've been googling for this answer, but can't seem to find it: Are any apache modules *required*? Or can I just disable them all and then add them in as I need them? -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: cvsup blues
John Almberg wrote: I am trying to update my ports collection on a new server using cvsup. I've added a mirror site to my ports-supfile, but keep getting the following error message: on# csup -g -L 2 /root/ports-supfile Parsing supfile "/root/ports-supfile" Connecting to cvsup7.us.FreeBSD.org Cannot connect to 64.215.216.140: Operation not permitted Will retry at 09:13:28 I've tried several different mirror sites, so the problem seems to be on my side (unless all the mirror sites are locked?) Okay, well, it must have been a short-term problem on the mirror side. I tried it several times over the last 1/2 hr, and it suddenly started working... Computers! -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: cvsup blues
The csup servers do have a rate-limiting feature on them. However, I think it gives a different error message than that. "Operating not permitted" makes it seem more like a networking issue on the local machine. Can you ping the IP? Firewall blocking outgoing ports? I pinged a few of the mirror sites to choose the fastest one, so, yes I can ping them. I turned off PF temporarily to see if it could be a firewall problem. No difference. I'm also having problems installing ports. I wanted to get vim installed while trying to figure out this port upgrade problem. Vim uses lots of files and a bunch of them downloaded when I typed 'make install clean', but then I ran into a batch that give an error message like below. I can fetch the files manually, using wget (which installed with no problem), but I'm getting a lot of these problems, which means its going to take about 5 years to install all the ports I need. I've never had this problem, before... weird. -- John => Attempting to fetch from ftp://ftp1.freebsd.org/pub/FreeBSD/ports/distfiles/gnome2/. fetch: libxml2-2.7.3.tar.gz: local modification time does not match remote => Attempting to fetch from ftp://fr.rpmfind.net/pub/libxml/. fetch: libxml2-2.7.3.tar.gz: local modification time does not match remote => Attempting to fetch from ftp://gd.tuwien.ac.at/pub/libxml/. fetch: libxml2-2.7.3.tar.gz: local modification time does not match remote => Attempting to fetch from ftp://xmlsoft.org/libxml2/. fetch: libxml2-2.7.3.tar.gz: local modification time does not match remote => Attempting to fetch from ftp://ftp1.freebsd.org/pub/FreeBSD/ports/distfiles/gnome2/. fetch: libxml2-2.7.3.tar.gz: local modification time does not match remote => Couldn't fetch it - please try to retrieve this => port manually into /usr/ports/distfiles/gnome2 and try again. *** Error code 1 Stop in /usr/ports/textproc/libxml2. *** Error code 1 Stop in /usr/ports/textproc/libxml2. *** Error code 1 Stop in /usr/ports/textproc/libxslt. *** Error code 1 Stop in /usr/ports/textproc/libxslt. *** Error code 1 Stop in /usr/ports/x11/libxcb. *** Error code 1 Stop in /usr/ports/x11/libX11. *** Error code 1 Stop in /usr/ports/x11-toolkits/libXt. *** Error code 1 Stop in /usr/ports/editors/vim. ___ 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"
cvsup blues
I am trying to update my ports collection on a new server using cvsup. I've added a mirror site to my ports-supfile, but keep getting the following error message: on# csup -g -L 2 /root/ports-supfile Parsing supfile "/root/ports-supfile" Connecting to cvsup7.us.FreeBSD.org Cannot connect to 64.215.216.140: Operation not permitted Will retry at 09:13:28 I've tried several different mirror sites, so the problem seems to be on my side (unless all the mirror sites are locked?) Any ideas? Thanks: John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Virtual box to do cross-browser testing
Jonathan Chen wrote: On Mon, Nov 16, 2009 at 11:02:59AM -0500, John Almberg wrote: Anyone have experience using Sun's "Virtual Box" on FreeBSD? I am looking for a way to run virtual Windows machines to do cross-browser testing... I've been using it to do some .NET programming, and it's been pretty good. No major problem, aside from the lack of CPU cycles the odd time or so. That sounds encouraging enough to give it a try. Thanks. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Virtual box to do cross-browser testing
Anyone have experience using Sun's "Virtual Box" on FreeBSD? I am looking for a way to run virtual Windows machines to do cross-browser testing... Don't need sound card or anything complex... if I can get it working good enough to have access to IE 6, 7, and 8 (with 3 different virtual boxes, probably), that would be enough for me. But before I jump through the hoops of setting up a new FreeBSD box and setting up this virtual box software, I'd like to hear how others have fared with this software. Any experience, much appreciated. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Fwd: upgrading remote server
Okay! After a lot of googling/reading I successfully upgraded to 7.2, now I'm trying to upgrade ports... I ran portmaster -L and got a long list of ports that need upgrading... From my reading, it seems like the only way to do this is to go through the list, one by one, and either (1) delete unused ports or (2) upgrade ports that seem to need it. This is going to take quite a bit of time... am I missing something (other than the fact that I should have been doing this all along?) -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Fwd: upgrading remote server
After you boot into single user mode, type mount -a. Then cd to /usr/src and run mergemaster -p. This worked, thanks. mergemaster -p then ran fine with no errors, but when I tried 'make installworld', it stopped on this error: -- cd /usr/src; make -f Makefile.inc1 install ===> share/info (install) ===> lib (install) ===> lib/csu/amd64 (install) install -o root -g wheel -m 444 crt1.o crti.o crtn.o gcrt1.o /usr/lib install: crt1.o: No such file or directory *** Error code 71 Stop in /usr/src/lib/csu/amd64. *** Error code 1 Stop in /usr/src/lib. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. # Ah well, tomorrow is another day! -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Fwd: upgrading remote server
The 7.2 GENERIC kernel includes PF, but not ALTQ. Okay, that's good to know. Thanks. Well, I was able to boot the new kernel in single user mode, but when I tried to run mergemaster -p, it couldn't find mergemaster. It looks like only one file system is mounted... nothing in /usr for instance. I should be able to figure out how to mount the others, but my brain is done for today. Will tackle this fresh tomorrow, but good progress, I think! Thank goodness for that serial port thingy... not sure how I would have booted into single user mode, otherwise. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Fwd: upgrading remote server
My build-world is finally done, so going to see if it works, now... H'mmm... I have a question about the kernel configuration file... I am currently using a customer kernel. Unfortunately, this machine was installed by someone before my time, so I don't know the details. Can I make a 7.2 kernel using this 6.3 custom kernel configuration file? Or should I start with the 7.2 generic, and somehow customize it correctly? I've been looking at the custom configuration file... so far, I can see that it: 1. adds PF to the kernel 2. deletes unneeded drivers, like unused RAID cards and unused serial interfaces. Or should I just try the GENERIC kernel, and maybe just add PF to it? -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Fwd: upgrading remote server
Jeronimo Calvo wrote: quiet interesting that serial port thingy! do you know the name of it btw? I will be interested to install on of them... and start saving some money going to my office :D when i can not use even ssh... I had to look it up... Here's what I have: http://www.digi.com/products/serialservers/portservertsmei.jsp#overview Basically, this box needs its own internet connection. You can ssh into it. I think it has some sort of embedded Linux system. Then the box has two serial port connectors -- this is a real rs-232 type interface, that most servers have, but hardly any desktops have anymore. You plug the serial connector into the computer and that's it. Knock on wood, I've never needed it, but I bought it for just this sort of thing. My build-world is finally done, so going to see if it works, now... -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: upgrading remote server
I've been reading the upgrade chapter in "Absolute FreeBSD", and it seems like the best option is to download the source files for 7.2 and upgrade from sources. I've done it several times via ssh between major and minor versions without any problems. You should read /usr/src/UPDATING for any additional information. Updating the source tree was no problem. So far so good. I'm running 'make buildworld' right now. Luckily I have a remote serial port thingy, so I should be able to login to the box, even if ssh doesn't come up after reboot. Pretty interesting, though I'd be a lot more nervous if this box had live applications running... Which is why it was still on 6.2! Hopefully after this I'll feel more comfortable doing major upgrades, instead of just running freebsd-update. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
upgrading remote server
I just reinstalled a server that was out for repair. It's on the network in the data center, but no applications are running on it, yet. I thought this would be a perfect time to upgrade the OS. It's currently running 6.2 Release, I want to bring it up to 7.2 Release. I'd like to do this remotely, if possible, since going to the data center is a pain. I've been reading the upgrade chapter in "Absolute FreeBSD", and it seems like the best option is to download the source files for 7.2 and upgrade from sources. >>> Sanity check: Am I on the right track? I've never done a major upgrade remotely, but I guess the worst that can happen is I have to burn a CD and drive into the data center. Any thoughts, much appreciated. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: reducing size of apache instances
In this case you don't want to look at processes with big RES, you want to find processes with a big difference between RES and SIZE and/or the ones with flat-out largest SIZE. Try sorting top by SIZE and see what bubbles up. (Ignore rpc.statd if it's running.) Huh... okay. That's interesting. Well the biggest SIZE process is mysql, followed by three mongrel instances (for a ruby on rails app), and then a bunch of httpd processes. Mysql is optimized for a small server, there isn't much I can do about the size of the Rails app, so the apache instances seemed like the logical place to start. I'm starting to wonder about the Swap info from top... it never changes. It has said the same thing all day, since I've been watching it. Does that make sense? Swap: 2008M Total, 150M Used, 1858M Free, 7% Inuse -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: reducing size of apache instances
You've misunderstood what you've done. You have not saved a couple of MB, you've saved one. Of the 18 MB, nearly all of it is shared memory which is only loaded once. Ah... Okay. That actually makes sense. Thanks for the clarification. 1GB web server is more than enough for basic www server, even more. I would have thought, but some times it really gets slow and I'm trying to figure out why. When bogged down, the load averages are low. The main thing that looks out of whack is swap space, which seems to never go below 7%, but sometimes gets up into the 20%-30% range. When it gets that high, the server slows to a crawl. last pid: 12732; load averages: 0.44, 0.31, 0.27 up 34+03:57:58 16:16:27 187 processes: 2 running, 185 sleeping CPU: 4.5% user, 0.0% nice, 1.1% system, 0.0% interrupt, 94.4% idle Mem: 425M Active, 106M Inact, 268M Wired, 3160K Cache, 110M Buf, 176M Free Swap: 2008M Total, 150M Used, 1858M Free, 7% Inuse ___ 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: reducing size of apache instances
Linda Messerschmidt wrote: On Fri, Sep 11, 2009 at 1:48 PM, John Almberg wrote: As a sanity check... I've been studying these processes all morning. When I use 'top', the column RES shows the amount of RAM used for the process, correct? This is the value I'd like to get down. How many Apache processes are involved, total? Because I'm really not sure how much success you're going to have with this. You're at 22mb already (by comparison mine are 44mb *without* mod_php). How much improvement are you looking for? A couple of megs? Yup... that's about what I got for my troubles. After turning off all the unneeded modules, they are now running about 17mb. Not a huge improvement... I definitely need more ram and I have it on order. While I'm waiting for it, I figured I'd see what processes I could slim down. My basic problem is at peak usage times (usually in the afternoon), the server starts using swap space, and then response times really bog down. This is on a 'spare' server that is temporarily in service while one of our 'big' servers is out for repair. This 'spare' server only has 1G ram and was never really meant for web server service. It's trying it's best. I'm just trying to lighten the load for it. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: reducing size of apache instances
PHP is incredibly buggy and will in all probability break Apache if you try running it in threaded mode. That doesn't sound so good. As a sanity check... I've been studying these processes all morning. When I use 'top', the column RES shows the amount of RAM used for the process, correct? This is the value I'd like to get down. Okay, well after a morning studying and observing, and thanks to suggestions from you all, I think I understand enough to start turning modules off. Crossing fingers... -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: reducing size of apache instances
Ivan Voras wrote: There is another thing you can try. Judging from the process size you've given it looks like you are not using PHP or a similar Apache module. Also, you didn't specify anything so I assume you are using the default configuration, which operates in "prefork" mode - MPM_PREFORK, which means a separate process is forked for every request. If all of this is true, you can trivially switch to the worker-threaded MPM in which every Apache process (which will be of comparable size to the one you currently have) will handle a large number of request. In effect, instead of e.g. 50 Apache processes active for 50 connections, you will have 2-3 Apache processes. Enable WITH_MPM=worker in /etc/make.conf to enable this. I am using PHP, in fact. I've listed all the loaded modules below, and marked the ones I added with an '*'. I need the proxy modules because I use Apache as a front end for Mongrel. BTW, this is Apache 2.2 on FreeBSD 7.1 This WITH_MPM=worker sounds interesting. I'll have to read up on it. I guess there is some downside to enabling it, like slower performance? -- John Loaded Modules: core_module (static) mpm_prefork_module (static) http_module (static) so_module (static) authn_file_module (shared) authn_dbm_module (shared) authn_anon_module (shared) authn_default_module (shared) authn_alias_module (shared) authz_host_module (shared) authz_groupfile_module (shared) authz_user_module (shared) authz_dbm_module (shared) authz_owner_module (shared) authz_default_module (shared) auth_basic_module (shared) auth_digest_module (shared) file_cache_module (shared) cache_module (shared) disk_cache_module (shared) dumpio_module (shared) include_module (shared) filter_module (shared) charset_lite_module (shared) deflate_module (shared) log_config_module (shared) logio_module (shared) env_module (shared) mime_magic_module (shared) cern_meta_module (shared) expires_module (shared) headers_module (shared) usertrack_module (shared) unique_id_module (shared) setenvif_module (shared) version_module (shared) *proxy_module (shared) *proxy_http_module (shared) *proxy_balancer_module (shared) *ssl_module (shared) mime_module (shared) *dav_module (shared) status_module (shared) autoindex_module (shared) asis_module (shared) info_module (shared) cgi_module (shared) dav_fs_module (shared) vhost_alias_module (shared) negotiation_module (shared) dir_module (shared) imagemap_module (shared) actions_module (shared) speling_module (shared) userdir_module (shared) alias_module (shared) *rewrite_module (shared) *php5_module (shared) Syntax OK ___ 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"
reducing size of apache instances
My Apache 2.2 instances are running about 18 Meg each. I've been thinking about doing something to trim these down, and I think tomorrow is the day to take action. They are getting out of hand. I've done a bit of research on this. I think the way to get started is to eliminate unused modules. Problem is, I know which ones I need, since I purposefully added them. I *don't* know which ones I don't need, if you see what I mean, since I inherited them from the default configuration. I assume that some are critical to the basic operation of Apache. I am hoping I can google a list of these tomorrow. Obviously these I'll have to live with. But what about the set that is left after I remove the ones the system needs, and the ones I need? How do I know which ones I can safely turn off? All I can think of is a trial and error process (i.e., turn them off one by one and see if anything breaks.) Is there a better way? -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: measuring mysql usage
>Check out mTop. >http://mtop.sourceforge.net/ Okay, got this running from ports. Cool tool, but after reading the man page and fooling around with it for a bit, I don't see how you can monitor usage by user with it. Am I missing something? -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
measuring mysql usage
Anyone know of a tool that can measure mysql usage per mysql user? My database is getting hammered by something, but I'm having a hard time figuring out what. It seems to come and go. Perhaps I have one or two websites that are just getting a lot of traffic, and maybe they just need their own machines. I'm not sure, which is why I'm looking for ways to start monitoring these sites and their resource usage - particularly db usage - more closely. Any thoughts or tips, much appreciated. Thanks: John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Can partitions span more than one drive?
Now that I've got my rsnapshot backup server working beautifully, backing up several servers to a central backup server (I like this a lot), I have a problem... I built my backup server from a machine I had lying around. It has two 140G hard drives. I dedicated one drive to a /backup partition. Unfortunately, that is now running at 88% capacity... i.e., only 16G left... Now that I know this approach is going to work, I'm going to run out and buy a big drive. Question: is it possible to just expand my existing /backup partition to encompass both the current drive and the new drive? I'm guessing not, since Chapter 8 in "Absolute FreeBSD" says that a partition is part of a slice, which is part of a physical drive, but maybe some bright person has come up with an app that overcomes that limitation. Thanks: John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Newbie discovers two useful apps...
Even after a year or so of administering a number of FreeBSD servers, I still consider myself to be a newbie (see my various posts for evidence of this fact!) I've been hoping to have something useful to contribute back, and I suddenly realized there are probably newbies that are even newbier than I. Hard to believe, but true! You pros can flip to the next post, there's nothing here for you, but my fellow newbies may find this interesting... Anyway, this weekend I 'discovered' two VERY useful utilities: 1. The 'at' command: http://tinyurl.com/nzz5a9 I don't know about you, but I am constantly promising clients that something will happen at an odd hour of the day or night. A typical example is someone who wants some promotion to end at 7:30 am. Accomplishing this is pretty simple, but has required me to log into the server to manually execute some command, or write some tiny script and have it execute by cron in some tortured way. Super inconvenient, or a waste of time, or worse (if you forget). But this weekend I discovered the 'at' command. The man page gives you the details, but basically it allows you to say "execute that command or set of commands at this time on this day". You can set up the 'at' command to do what you need to do at 2am on Tuesday and forget it. No more setting alarms or forgetting. And it's dead easy to set up. I can't believe I haven't found this sooner. Fantastic. 2. DJB Daemontools: http://thedjbway.org/daemontools.html Lots of programs that are meant to run as daemons come packaged with a nice rc.d script. You just configure them in /etc/rc.d and they come up automatically when you reboot. But not all, and frankly I have never had time to figure out how to write a rc.d script. I really, really needed to get a linux-oriented daemon to work this weekend -- rubycas-server, if you are interested. But it doesn't have an rc.d script. Bummer. However, I run tinydns as my dns server, and that program doesn't use rc.d scripts, either. DJB has his own way of doing things, apparently. The standard way to install tinydns has you install another DJB product called daemontools. Daemontools is good for, well, getting daemons to run at boot time, in a fairly platform independent way (UNIX only, of course). Anyway, I dimly remembered this and dug into the DJB docs. Some will wonder why I found it easier to read a DJB doc than to read how to write a rc.d script... An excellent question, but in 5 minutes, I had my rubycas-server running under daemontools. It is that easy. I still don't know how to write an rc.d script, but I have to believe it would take me more than 5 minutes to learn and write. If you have daemons running, that you started manually from the command line, and are just hoping you'll remember to re-start them the next time you reboot, you should really check out daemontools... Much better than putting a reminder in your MOD (Me??? I would never do that!!!) -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: What should be backed up?
If you have any databases or ldap service, then you want to add those as well, but it is recommended to dump these rather than backup the files themselves. I'm learning a lot from this thread. Thanks for all the suggestions. The paragraph above raises one more question... how to use the backup_script feature of rsnapshot. There is a mysql database on the server I want to backup. At the moment, I have a cron script on the web server that periodically dumps the database into one of the directories that gets backed up. This works fine, but I am about to experiment with the backup_script feature of rsnapshot. I'll be darned if I can find an example in the HowTo or on the web for using backup_script remotely, but I'm hoping it's possible... I'd like to have the backup script on the backup server, rather than the remote server. The difference is small for one server, but if you are backing up several servers, or several hundred servers, it would be much nicer for all the backup configuration and scripts to be on the backup server, rather than scattered around on the net. So, I'm going to take the trial and error approach to getting this to work today, unless someone has actually done this and can provide any information (for example "that's impossible... the backup script needs to be on the remote server" would save me a lot of work!) Thanks: John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: What should be backed up?
QUOTE My general advice is to back up everything and then explicitly excluding those things that you know that you don't need. Here is my exclude list from my rsnapshot.conf exclude /var/log exclude /var/tmp exclude /usr/obj exclude /usr/ports/distfiles exclude /usr/local/squid Also I backup by file system, so I'm already excluding /tmp UNQUOTE Interesting... That raises another question... How feasible is it to restore a server from these backups? Is it really possible to install 7.2 on a new machine and then just copy the backed up data onto the new machine? I guess I should really verify the value of my backups by trying to do exactly that! -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
What should be backed up?
I am currently using rsnapshot to back up these directories on a FreeBSD 7.2 webserver: /etc /usr/home /usr/local /var/cron These directories contain all the data and config files that I use... I think... Question: am I missing anything crucial? Thanks: John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: svn+ssh server only
So the only one you had marked was the svnserve-wrapper ? in Make config No, I just used the default config. You don't need svnserve-wrapper (what ever that is). You just run svnserve as a daemon, and access it like svn://host.name/project/trunk/ Note the importance of PF to control access, otherwise, your svn server will be wide open. But since PF allows me (or rather, any one or process using an allowed IP address) to access the repository without authentication, use is really simple and straight forward. This is a pretty simple set up and probably only works well for single-user repositories, but that's exactly my situation. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: svn+ssh server only
On Jul 26, 2009, at 7:35 PM, Kalle Møller wrote: Hi I'm trying to make a ssh+svn server only (apache is installed, but that is for view.vc) For what its worth, I just built a new svn server (to replace my old apache-based svn server that should have been replaced years ago, but it kept on doing the job). This time, I used a very simple set up, using svnserve without any authentication. I use pf to limit access to the small number of IP addresses that I use. This setup is super-simple, fast, and secure enough for my needs. -- John___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: limit to number of files seen by ls?
understanding what is going on. I'm reading up on this, and as soon as I know enough to either understand the issue, or ask an intelligent question, I will do so... When a program is executed with arguments, there is a system imposed limit on the size of this argument list. On FreeBSD this limit can be seen with sysctl kern.argmax, which is the length in bytes. When you do "ls *", what really happens is that the shell expands the asterisk to all entries in the current directory, except entries starting with a dot ("hidden" files and directories). As a result, ls is really called as: ls file1 file2 fileN If the string length of file1 to fileN is bigger then kern.argmax, then you will get argument list too long error. Mel, What I get is this: > sysctl kern.argmax kern.argmax: 262144 Which is why I'm starting to think that (a) my problem is different or (b) I'm so clueless that there isn't any problem at all, and I'm just not understanding something (most likely scenario!) I'm going to write a little script that generates a bunch of files to test my hypothesis that once I get more than n files in a directory, some things stop working correctly, like ls and ftp directory listings, and to discover the value of n. That will give me some hard data to work with. This problem has been nagging at me for a while, so it's time I nail it down once and for all... I'll be back... -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: limit to number of files seen by ls?
On Jul 26, 2009, at 4:45 AM, Mel Flynn wrote: On Saturday 25 July 2009 23:34:50 Matthew Seaman wrote: It's fairly rare to run into this as a practical limitation during most day to day use, and there are various tricks like using xargs(1) to extend the usable range. Even so, for really big applications that need to process long lists of data, you'ld have to code the whole thing to input the list via a file or pipe. ls itself is not glob(3) aware, but there are programs that are, like scp. So the fastest solution in those cases is to single quote the argument and let the program expand the glob. for loops are also a common work around: ls */* == for f in */*; do ls $f; done Point of it all being, that the cause of the OP's observed behavior is only indirectly related to the directory size. He will have the same problem if he divides the 4000 files over 4 directories and calls ls */* H'mmm... I haven't come back on this question, because I want my next question to be an intelligent one, but I'm having a hard time understanding what is going on. I'm reading up on this, and as soon as I know enough to either understand the issue, or ask an intelligent question, I will do so... Thanks for all the comments... -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
limit to number of files seen by ls?
I seem to have run into an odd problem... A client has a directory with a big-ish number of jpgs... maybe 4000. Problem is, I can only see 2329 of them with ls, and I'm running into other problems, I think. Question: Is there some limit to the number of files that a directory can contain? Or rather, is there some number where things like ls start working incorrectly? -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: SSO solution in ports?
Well, after a week of looking, I think I am going to go with a CAS solution, rubycas-server and rubycas-client. This supports several methods of authentication, including SQL, ActiveDirectory, LDAP, and GoogleAccounts. SQL is probably good enough for my application at the moment, but the LDAP option might come in handy someday. And it integrates nicely with Rails apps, which is my target platform. I looked at OpenID, which Rails also has good support for, but to my mind, it's just too complicated for the average user to use. I remember the first time I had to set one up, it was quite difficult to understand what it was they were looking for. I think it would scare away the average, non-technical, website user. Thanks for the ideas! Brgds: John On Jul 16, 2009, at 1:03 PM, Mel Flynn wrote: On Thursday 16 July 2009 06:54:39 Bill Moran wrote: In response to John Almberg : I am trying to build a set of web applications that are accessed through a web portal that uses a Single Sign On (SSO) solution. Problem is, there are MANY competing SSO solutions. Since building the client side of the SSO system is more than enough for me, I was wondering if there are any SSO servers in ports that I can just install and use? A CAS solution would be the best, but I'll look at anything. The most widely supported I know of is LDAP, and OpenLDAP works pretty well. That won't really work as LDAP can't read a browser cookie or maintain session information. LDAP is a good choice as storage backend. Your best bet is probably to use an OpenID based solution, as support for this sign on method is growing in web applications, so you lessen the chance of having to maintain your custom glue into the application. The security/phpmyid port is one implementation that allows you to run your own OpenID server. http://openid.net/ -- Mel ___ 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" ~~ Websites and Marketing for On-line Collectible Dealers ~~~~~~ IDENTRY, LLC John Almberg - Managing Partner (631) 546-5079 jalmb...@identry.com www.identry.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"
SSO solution in ports?
I am trying to build a set of web applications that are accessed through a web portal that uses a Single Sign On (SSO) solution. Problem is, there are MANY competing SSO solutions. Since building the client side of the SSO system is more than enough for me, I was wondering if there are any SSO servers in ports that I can just install and use? A CAS solution would be the best, but I'll look at anything. Any tips or ideas, much appreciated. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Should DNS be on same server as webserver?
On Jul 13, 2009, at 6:27 PM, Karl Vogel wrote: On Mon, 13 Jul 2009 13:03:24 -0400, Jon Radel said: J> Apache and Bind have both had their security issues over the years, and J> there's something to be said for running them on different servers to J> reduce both the "all eggs in one basket" factor and the ease of J> spreading an attack. (Yes, I'm assuming what you're actually J> running) You can fix the security problems by dumping Bind and using djbdns. It's very easy to set up a caching nameserver without using all the memory on your system. See http://www.lifewithdjbdns.com/ for more. I actually do use djbdns. Super easy to use, once you figure it out. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Should DNS be on same server as webserver?
On Jul 13, 2009, at 3:05 PM, Mel Flynn wrote: On Monday 13 July 2009 08:36:42 John Almberg wrote: The other day, a FreeBSD 'expert' told me that it is important to have the DNS server for a domain on the same server as the domain's web server. Supposedly, this saves doing tons of DNS look ups over the network. Instead, they are done locally. Bogus. A high-performance webserver should not be doing DNS lookups, other then application driven ones, like verification of email domains upon registration. If having hostnames in the live logs is mandatory by some weird company policy or the webserver does not provide a configuration setting to turn this behavior off, then more performance is gained by having the nameserver on the network gateway as the likeliness of cache hits and especially negative cache hits is increased. As others have mentioned, network overhead is negligible. Human noticeable delays are caused by upstream DNS servers slowly or not at all responding when a client IP is being resolved. Secondly, a named cache size depends on available memory. A high performance webserver uses plenty of that, so you wouldn't be able to grow the named cache to "almost caching the entire net" size, which you would be able to on a dedicated machine. Thanks for all the comments on this topic. Glad I put 'expert' in quotes. I had a feeling... -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Should DNS be on same server as webserver?
The other day, a FreeBSD 'expert' told me that it is important to have the DNS server for a domain on the same server as the domain's web server. Supposedly, this saves doing tons of DNS look ups over the network. Instead, they are done locally. This makes sense to me, but I wonder if the performance difference is really that significant? -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Compact Freebsd 'appliance'
I have a couple of Via Artigo a2000 boxes, one running FreeBSD-STABLE (post 7.2) and the other running FreeNAS. Both work well. I've seen posts from one fellow who's tracking a bug with the vge interface under very heavy load, but both of mine stream music and do Time Machine backups via netatalk without any trouble. Logic Supply has a custom FreeNAS build that recognizes the disks as SATA and that adds support for Gb ethernet to the NIC (rolling in changes from -STABLE to the 6.x series on which the stable FreeNAS is based). http://www.logicsupply.com/blog/2009/05/11/custom-a2000-freenas- image/ They're not the cheapest place to buy the box, but they're close and they do good support (I'm just a happy customer and I helped with the FreeNAS image, no other association). They're not Living Room quiet, but they're about as unobtrusive as you can get in a little box w/out going fanless. Also very nice looking boxes. Thanks! -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Compact Freebsd 'appliance'
On Jun 18, 2009, at 7:59 PM, Charlie Kester wrote: On Thu 18 Jun 2009 at 14:18:21 PDT Tim Judd wrote: I've read reports (and forgotten it's source since then) that some Intel Atom processors work well, some don't with FreeBSD. This was something I read within a couple months, so I would see if anyone here can provide input on pros and cons on weather that particular Atom model number is well received and well tested. The only problems I've seen reported re Atoms was back in the days before the FreeBSD 7.2 release (or was it 7.1?) when there were problems with not recognizing the Realtek networking chip included on the Intel motherboards. FWIW, I'm running FreeBSD 7.2 on an Intel D945GCLF motherboard, which has an Atom 230 CPU. I got mine from http://www.mini-box.com. (I *am* using a Intel networking card rather than the builtin Realtek chip, but only because the Realtek recognition problems still existed when I first set up the machine. One of these days I should probably see if those problems are truly fixed, so I can recover the single PCI slot for some other use.) Since this is a home machine, I can't say it's the best test of whether FreeBSD runs OK on it. But I haven't had any problems with it. Sounds good. They are so inexpensive, I will just give it a whirl and see if it cuts the mustard. Speed isn't really an issue, since it's going to be twiddling it's thumbs most of the time. Doesn't really matter if it takes 10 seconds or 30 minutes to translate the videos. Thanks: John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Compact Freebsd 'appliance'
There was a discussion on this a few days ago. I happen to have one of these Atom based systems, a Shuttle X27D: CPU: Intel(R) Atom(TM) CPU 330 @ 1.60GHz (1596.01-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x106c2 Stepping = 2 Features=0xbfe9fbffGE,MCA,CMOV,PAT,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE> Features2=0x40e31d2>> AMD Features=0x2010 AMD Features2=0x1 Cores per package: 2 Logical CPUs per core: 2 real memory = 2137915392 (2038 MB) avail memory = 2086662144 (1989 MB) ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP/HT): APIC ID: 1 cpu2 (AP): APIC ID: 2 cpu3 (AP/HT): APIC ID: 3 ioapic0: Changing APIC ID to 4 ioapic0 irqs 0-23 This works nicely with FreeBSD (needs only a sysctl setting to hush some messages on absurd temperature measurements - all onboard devices work). One disappointing thing about it: the one and only fan in the system failed about after a week of continuous operation. I can't find the discussion you mentioned, but this Shuttle looks pretty nice. You can't beat the price of these little boards. Thanks. --- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Compact Freebsd 'appliance'
I have a client who has an application that he wants to deploy in his customer's offices as a headless 'appliance'. Basically, just a black box that you can plug into a Lan, turn it on, and it runs. No floppy disk or CD, no monitor/keyboard, just remotely managed. This application won't store any critical data, so it doesn't need redundancy. It just needs to be reasonably reliable, compact, and quiet. My first recommendation was to use a Mac Mini, but that excellent bit of hardware was deemed 'not professional enough'. So now I am looking for a compact pc that can run FreeBSD, of course. I think it probably just needs a power supply, tiny motherboard with onboard ethernet, usb, etc., and hard drive. If anyone has a recommendation (or if their are any vendors lurking), please shoot me an email off list. I'll compile a list of recommendations and post it all at once, in case anyone else is interested in this. Thanks: John -- jalmberg at identry dot 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: Terminal / vim / shortcuts
I edit python code in vim using Terminal on xfce. I find myself, not surprisingly, having to exit "insert mode" and save changes frequently (when making code changes and wishing to test the immediate effects of the changes in a separate terminal). This requires pressing 4 keys: "esc", ":", "w", and "enter". How can I configure a shortcut (ideally using an F# key) that will perform this sequence of 4 key-presses? This would rather be a question for the Vim mailing list. imap :wsleep 1gi The purpose of the sleep is that you see the "written" message. It may be off topic, but also very cool! Thanks for the question and the answer. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: PDF inventory software
On Jun 8, 2009, at 5:17 PM, Daniel Underwood wrote: I'm looking for a way to manage my personal collection of research articles. Ideally I'd like some way to keep records on authors, keywords, journals, and publication years of articles (PDF files) downloaded onto my local drive. In the course of reading literature for research, it often happens that I find myself wanted to return to something I have previously read, but I only recall a few "things" about the article, often the author and a keyword. Is there some inventory/database software (for local use only) that can be easily used for this purpose? (The closest things that comes to mind (conceptually) is "image collection" software.) What are some of my options here? I know this probably won't help pure FreeBSD users, but if, like me, you use FreeBSD for servers, and Macs for desktop, I can't resist recommending my favorite program of all time, Yojimbo: http://www.barebones.com/products/Yojimbo/ This is a general purpose 'Memory Bank'. You can throw all kinds of information into it, tag it with keywords, and retrieve it in an instant. It integrates with all Mac programs, so I use it all the time... Any time I get a pdf or web page I think I *might* want to reference someday, I throw it into Yojimbo. It's also great for documenting how to do things, so you don't have to relearn how to do a certain complicated thing 6 months after you figured it out the first time (I hate that). It's hard to explain how it works, but it is the most incredibly useful program. Wish there was something like it in ports. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: What server hardware are you buying from the big companies these days?
Hi, I need to buy some new servers, and mgmt has decreed that we get them from someplace which will provide service contracts with on-site h/w suppport, which means HP, Dell, Sun, IBM, etc. I have two Intel servers that I like a lot. I don't have on-site support, but it might be available from one of Intel's official distributors. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Backing up FreeBSD and other Unix systems securely
Is there any possibility of using your own media locally - such as tape or a large USB attached disk?If security is such a primary concern, I can't see sending the data to that type of offsite thing. Get a couple of large USB SATAs and use dump(8) to back the stuff up on them.Write them encrypted if you need. I'd have to agree with this... After looking at a lot of options, I ended up building a simple freebsd server and connected it to my main server on a separate ethernet port via a twisted ethernet cable. Thus, the server and backup server had a 'private', high speed connection and I can pump tons of data through that connection without paying my colo provider for that bandwidth. A whole server, rather than a USB drive might be overkill, but its a little more flexible, and I can use the backup server for a DNS server, and a few other things, as well. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: [pure-ftpd] Security Scan question
On May 2, 2009, at 8:50 AM, Frank Denis wrote: Hello Josh, Le Fri, May 01, 2009 at 08:55:10AM -0500, Josh Trutwin ecrivait : Because I programmed a custom cart solution for one of my customers, their merchant account is doing a monthly server scan to check for known vulnerabilities. Great. I've had to endure these scans, myself, and I must say that they helped a lot. The scans are pretty thorough and they made me re-think some things I was doing... particularly limiting access to ports that I thought 'needed' to be open, but actually just needed to be open to a small number of outside addresses. Thank goodness for PF... would hate to try to pass one of those scans without a flexible firewall. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Is it necessary to generate a new SSL request each year?
You can reuse the old one. I'm not an expert on these, but it was my understanding that certificates carry in internal "expiration date" after which the application may respond as it pleases. Yes, but the *request* does not. Also, if using openssl, just set the defaults in /etc/ssl/ openssl.cnf to your values, so you can enter through the questions Cool... save a minute here and a minute there... at the end of a year, I might have enough saved up to take lunch! -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Is it necessary to generate a new SSL request each year?
When buying a new SSL cert, I've been generating a new request each year... I am just about to buy another and it occurred to me that I'm entering the same info. Do I really need a new request file each year? Or can I just reuse the same one (presuming none of the info has changed.) -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Sorting out owner and group permissions...
On Apr 20, 2009, at 2:48 PM, John Almberg wrote: I have a directory called 'scans' that is owned by 'master', but I want to allow 'customer' to FTP images to that directory. This is the way I have permissions set: # ls -l drwxrwxr-x 5 master customer 251904 Apr 20 10:29 scans The problem is that when customer ftp's a file to the directory, the permissions end up like this: -rw-r- 1 customer customer 772584 Apr 20 15:28 image.jpg When a process run by 'master' tries to copy this file to another directory (also owned by master), I get the following: # cp scans/image.jpg thumbs/image.jpg cp: scans/image.jpg: Permission denied The only solution that occurs to me smells like a newbie kludge: to have a root cron job periodically chown all the images to master:customer. This seems like the proverbial sledgehammer. There must be a better way? Any thoughts, much appreciated! Well, I did figure out one way that seems reasonable... since I am using pureftpd, I changed the upload mask in the pureftpd configuration so new files are created with permissions like: -rw-r--r-- 1 customer customer 93177 Apr 20 20:12 image.jpg This seems like a pretty good approach, but if there's a better one, I'm all ears! -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Sorting out owner and group permissions...
I have a directory called 'scans' that is owned by 'master', but I want to allow 'customer' to FTP images to that directory. This is the way I have permissions set: # ls -l drwxrwxr-x 5 master customer 251904 Apr 20 10:29 scans The problem is that when customer ftp's a file to the directory, the permissions end up like this: -rw-r- 1 customer customer 772584 Apr 20 15:28 image.jpg When a process run by 'master' tries to copy this file to another directory (also owned by master), I get the following: # cp scans/image.jpg thumbs/image.jpg cp: scans/image.jpg: Permission denied The only solution that occurs to me smells like a newbie kludge: to have a root cron job periodically chown all the images to master:customer. This seems like the proverbial sledgehammer. There must be a better way? Any thoughts, much appreciated! -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Upgrading from 6.3 to 7.1 -- how dangerous?
I need to upgrade a live, production server from 6.3 to 7.1. I can't afford to have any troubles with this server. I have Absolute FreeBSD and a few other BSD books, and the upgrade process looks fairly straightforward. That's the theory... Real world question: how scared should I be? I've thought about setting up a dummy server, just to practice on. Is this a good idea? Or am I just a nervous Nellie? -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: where to grab source tarball?
On Apr 15, 2009, at 4:10 PM, John Almberg wrote: I'm trying to upgrade FreeBSD from source, but my /usr/src directory is empty. "Absolute FreeBSD" glibly says to "grab the source tarball from a FreeBSD mirror". Never mind. I figured out how to do this using csup, which will help with later upgrades. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
where to grab source tarball?
I'm trying to upgrade FreeBSD from source, but my /usr/src directory is empty. "Absolute FreeBSD" glibly says to "grab the source tarball from a FreeBSD mirror". I found a list of mirrors here: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/mirrors- ftp.html But it isn't clear to me which tarball I need to 'grab', or where it is on the mirror. Basically, I want to get to the point where I can type: cd /usr/src make buildworld And build FreeBSD 7.1-RELEASE I'd like to download the source to the server, rather than inserting a CD in the machine, since I"m 2 hours away from the machine. Thanks: John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Fwd: How to diagnose hardware problem?
On Apr 13, 2009, at 2:32 PM, Wojciech Puchar wrote: The database ran well for about 2 minutes, then the server crashed again. The filesystem was again corrupted so badly that we could not even log in to look at the logs. did memtest? it looks like it's fine until you stress your hardware I didn't, but I just installed it and am running it at the moment. So far, so good. The machine has 1G of memory, but I could not get an mlock unless I request 100 Meg or less. That is, I need to run something like: # memtest 100 Does this sound right? If I run with 125 Meg, I get the following: # memtest 125 memtester version 4.0.8 (64-bit) Copyright (C) 2007 Charles Cazabon. Licensed under the GNU General Public License version 2 (only). pagesize is 4096 pagesizemask is 0xf000 want 125MB (131072000 bytes) got 125MB (131072000 bytes), trying mlock ...failed for unknown reason. Continuing with unlocked memory; testing will be slower and less reliable. Loop 1: Stuck Address : ok Random Value: ok Compare XOR : ok Compare SUB : ok Compare MUL : ok etc... -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: How to diagnose hardware problem?
First things first; if the machine is still in warranty, don't mess with it but send it back to the manufacturer and demand a replacement. It is in warranty and I am following their process. I'm hoping to short-circuit that process by finding the problem on my own, if possible. Plus, I've never really had to deal with a hardware failure before, so it's a good learning process. If the machine is out of warranty, you might consider replacing it altogether. My employer's IT department ditches PC's and servers at the first failure after the warranty runs out. Accordinf to them it's cheaper than repairing them. But if you want to have a go, this might help: http://www.daileyint.com/hmdpc/manual.htm Basically, it's just a problem of elimination. First check if your machine is the only one having problems at the hosting site. Maybe they have unstable electrical power. Then make sure that all expansion cards and RAM are well-seated, and that all connectors are OK. Also check that there is no dust build- up on e.g. fans and heatsinks. If necessary, clean carefully with (dry, oil free) compressed air. Dust can lead to short circuits or reduced cooling. Next, look for capacitors that have leaked fluid, or have bulging metal end plates on the motherboard; those are dead or dying. It's a leading cause of motherboard failure. It is possible to replace them, but you'll need the right equipment: http://www.tomshardware.com/reviews/fixing-motherboard,1606.html Install a monitoring program like mbmon or healthd, and have it log to another machine or a USB stick mounted syncronously. Monitor CPU temperature, fan speeds and the different voltages. Not all power supplies are created equally. See the articles at tom's hardware: http://www.tomshardware.com/reviews/Components,1/Power-Supplies,6/ If you've found nothing so far, it's time to start swapping out components, starting with the power supply. This is all good stuff to try. Thanks. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
How to diagnose hardware problem?
I have what looks like a hardware problem with an Intel 1U server, which I am using mainly as a mysql database server for some of my bigger website clients. The server went down last week with a badly corrupted file system. After spending a day trying to fix the file system, we gave up and did a fresh install of FreeBSD, PF, and mysql, using our daily backups to restore the database. It all seemed to work fine until I switched the websites from the temporary database server that I had been using, onto the restored server. The database ran well for about 2 minutes, then the server crashed again. The filesystem was again corrupted so badly that we could not even log in to look at the logs. We've reinstalled FreeBSD again, just to be able to SSH into the box. It looks like there is probably a hardware problem, like a bad power supply or overheating CPU that fails when the load of the database is applied. Problem is, I have no idea how to determine which bits are failing. Can anyone suggest a favorite book or website that focuses on how to troubleshoot hardware issues? Thanks: John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: low-level format before install?
Thanks for all the tips. At least I have something to start with. The guys in the data center reinstalled FreeBSD (the filesystem was totally corrupted again), and then ran what they called "SMART test", which might be smartctl, and said the hard drives look good. I am now able to get back in. So the system ran fine until I put a load on it with the database (many transactions a second). This corrupted the file system again. So I guess I need to load it enough to produce error messages (hopefully) but not enough to destroy the file system again. Sounds like fun :-( This is an Intel server, not a crummy white box, so hopefully it is smart enough to monitor its own hardware at least a bit. We'll see. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: low-level format before install?
On Apr 7, 2009, at 3:37 PM, Chuck Swiger wrote: On Apr 7, 2009, at 12:15 PM, John Almberg wrote: Well, I've got real problems with that database server that lost power over the weekend. We reloaded FreeBSD from scratch and then reinstalled mysql, and pf. I loaded up my database and switched over all my customer's websites. The database server ran fine for about 2 minutes, and then died. At the moment, I can't even ssh into the machine, although they can get into it using a keyboard/ monitor at the data center. In other words, sshd is not working. That sounds like either a hardware problem (ie CPU overheating or marginal PSU failing under production load), or less likely, some kind of software misconfiguration. System logs would be useful to see whether any signs of trouble are being mentioned. Apparently, power was fluctuating drastically before they decided to cut power, so a hardware problem is a definite possibility. A PSU failure would not surprise me in the circumstances. Assuming I can ever ssh in again, what log would hardware failures be reported to? -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
low-level format before install?
Well, I've got real problems with that database server that lost power over the weekend. We reloaded FreeBSD from scratch and then reinstalled mysql, and pf. I loaded up my database and switched over all my customer's websites. The database server ran fine for about 2 minutes, and then died. At the moment, I can't even ssh into the machine, although they can get into it using a keyboard/monitor at the data center. In other words, sshd is not working. I am now wondering what kind of format the FreeBSD install process does by default, and if it is possible to do a low level format, first, to block out any bad sectors (not sure if this is the right terminology). I'm starting to get real depressed about this machine... You would think a top-tier data center could keep the power on... -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: C programming question
On Apr 7, 2009, at 5:41 AM, Valentin Bud wrote: Hello community, I have built with a micro controller a system of power plugs that can be controlled through the serial port. I have 2 plugs that i can start/stop and check the status of them. This is accomplished by sending different letters (eg. A/W) to start/stop one of the plugs and another set of letter for the other plug and one letter to check the status. Taking into account the fact that my C skills are almost 0 how complicated would be to write a program so I can control that micro controller through the serial port. Or is there some kind of program that can read/write from/to the serial port from the command line. I don't want an interactive program like minicom, just a program that connects and send a command (a letter in my case) to the serial port. Why not minicom (or any other program like it)? My goal is to be able to start/stop the plugs using a web interface. I have tried using minicom and background it but when i log out minicom closes. If minicom is started i can send commands to ttyd0 with echo, but i can't read anything from serial. Now back to my original question, how hard/complicated will it be to write a C program to control the micro controller through the serial port. Of course on FreeBSD :). More complicated than you need. The last time I twiddled bits on a serial port, the choice was Assembler, or C, but today my choice would be Ruby. You can probably do whatever you want with a few lines of Ruby, rather than many lines of C. And since you don't know either language, you might as easily learn Ruby as C. Unless you are going to start writing low level code, a high level language like Ruby will let you write any program you need. I haven't needed to write a line of C code in probably 20 years. Check out the Ruby serial port library: http://ruby-serialport.rubyforge.org/ The standard Ruby book is "Programming Ruby" (http:// www.pragprog.com). If you don't know programming at all, they have a "Learn to Program" book that uses Ruby as a first language. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: How big can a tar file get?
With the default blocksize (16384) UFS2 can deal with files up to 128TB. However traditional tar only supports up to 8GB while the newer ustar format goes up to 64GB. It seems that at least on 7.x tar creates ustar archives by default Well, I'm already past 10GB, so good thing I'm on 7.1. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: How big can a tar file get?
On Apr 6, 2009, at 7:28 PM, Adam Vandemore wrote: John Almberg wrote: Because of a big problem I had this weekend, I need to do an emergency backup. I'm basically just creating a tar file of my / home directory. My question: how big can a file get on FreeBSD? This tar.gz file is already 5G. Hard drive space is no problem, but as I'm watching this file grow, I'm wondering if there is some file size limit that is going to make this long backup abort. Naturally, that will happen when the backup is almost complete :-) -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions- unsubscr...@freebsd.org" http://en.wikipedia.org/wiki/Unix_File_System Max file size 2^73 bytes (8 ZiB <http://en.wikipedia.org/wiki/Zebibyte>) That should just about do 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"
How big can a tar file get?
Because of a big problem I had this weekend, I need to do an emergency backup. I'm basically just creating a tar file of my /home directory. My question: how big can a file get on FreeBSD? This tar.gz file is already 5G. Hard drive space is no problem, but as I'm watching this file grow, I'm wondering if there is some file size limit that is going to make this long backup abort. Naturally, that will happen when the backup is almost complete :-) -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: How to remove all files with a certain extension
On Apr 6, 2009, at 5:11 PM, Dan Nelson wrote: In the last episode (Apr 06), John Almberg said: This is a real newbie question, but I can't figure it out... I want to remove all .tar files from a directory tree. I think something like the following should work, but I must have something wrong, because it doesn't: find . -name *.tar -exec rm /dev/null {} \; find . -name "*.tar" -delete Make sure you quote your wildcards so the shell doesn't expand them, and use the -delete primary to save a fork/exec for each filename. Fantastic. I never noticed the -delete option before. Amazing what you can find in a man page if you know it's there :-) Thanks: John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: How to remove all files with a certain extension
On Apr 6, 2009, at 4:57 PM, John Almberg wrote: This is a real newbie question, but I can't figure it out... I want to remove all .tar files from a directory tree. I think something like the following should work, but I must have something wrong, because it doesn't: find . -name *.tar -exec rm /dev/null {} \; What am I doing wrong? Oh, duh... that /dev/null shouldn't be there. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
How to remove all files with a certain extension
This is a real newbie question, but I can't figure it out... I want to remove all .tar files from a directory tree. I think something like the following should work, but I must have something wrong, because it doesn't: find . -name *.tar -exec rm /dev/null {} \; What am I doing wrong? Thanks: John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how to recover after power outage
Check the machine-hostname.err file when you manually try and start MySQL. Provided that you have mysql_enable="YES" in /etc/rc.conf you should be able to manually attempt to start with /usr/local/etc/rc.d/mysql-server start (it seems to work reliably when you type out the entire command path- wise). Note that if somehow permissions on the my.cnf file got changed MySQL won't start if my.cnf is world writable. Check for stale PID and sockets. Normally these shouldn't be a problem as a startup will just overwrite them. Check these to eliminate any wonkiness, e.g. some permission change isn't allowing for MySQL to wipe the old ones. The whateverthehostname.err log and possibly /var/log/messages might give some clue for what's going on. If the database files are corrupt just clean them out and replace with a backup done with dump. Ensure the /var/ db/mysql tree is chowned mysql:mysql. If you had to install/reinstall from ports the install should have created the appropriate uid/gid accounts. Check and see if these are missing. At any rate I wish you the best of luck. Now that you can SSH in you can probably fix it up. Okay, so my new database server is running with backup data and I am trying to salvage the old database, or what's left of it. Unfortunately, it seems like what's left of it, is not much. the /var/db/mysql directory tree is now a file: qu# ls -l /var/db/mysql -rwx-- 2 mysql wheel 1024 Jul 5 2008 /var/db/mysql The situation looks hopeless to me. Is it? Another question: given that the file system took a major hit, should I try to fix it, or just do a clean install? I'm leaning towards the clean install since I've been meaning to upgrade this machine to 7.1 anyway. Is there anyway to fix the file system, reliably? fsck doesn't seem to be able to solve all the problems. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how to recover after power outage
On Apr 5, 2009, at 2:10 PM, Michael Powell wrote: John Almberg wrote: [snip] Okay, so the machine is back online and I can log in again. The hardware is only 18 months old or so... good quality stuff, so hopefully nothing is physically damaged. We'll see... Unfortunately, mysql isn't working at the moment... will make a backup of data (I have the previous night's backup, of course, but would like the latest, if possible.) Then will try to figure out what's working and what's not. Check the machine-hostname.err file when you manually try and start MySQL. Provided that you have mysql_enable="YES" in /etc/rc.conf you should be able to manually attempt to start with /usr/local/etc/rc.d/mysql-server start (it seems to work reliably when you type out the entire command path- wise). Note that if somehow permissions on the my.cnf file got changed MySQL won't start if my.cnf is world writable. Check for stale PID and sockets. Normally these shouldn't be a problem as a startup will just overwrite them. Check these to eliminate any wonkiness, e.g. some permission change isn't allowing for MySQL to wipe the old ones. The whateverthehostname.err log and possibly /var/log/messages might give some clue for what's going on. If the database files are corrupt just clean them out and replace with a backup done with dump. Ensure the /var/ db/mysql tree is chowned mysql:mysql. If you had to install/reinstall from ports the install should have created the appropriate uid/gid accounts. Check and see if these are missing. At any rate I wish you the best of luck. Now that you can SSH in you can probably fix it up. Well, I had to give up, temporarily, on this server to get my clients back online. I took a nice machine I had laying around, loaded a fresh copy of FreeBSD on it, installed mysql, and loaded the Saturday morning database backup. I had to set up all the database permissions correctly, which took some time, but I'm happy to say that I've got all my clients back online with this new database server. Now I am going to catch a couple hours sleep (this has been going on since 2 am). Once I restore some brain cells, I'll see if I can figure out what's happening with the main database server. NYI has taken it off line, for some reason, and I can't log into it anyway, at the moment. Thanks for all the helpful advice. It's great to have this list to fall back on in a crisis. Brgds: John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how to recover after power outage
The main app is MySQL. I don't think it is running, but can't really tell unless I can log in. I have backups, and while NYI is trying to get this box running, I'm setting up a new database server, just in case... If you were lucky having the guys at NYI login to single user mode at the console and run fsck in an attempt to clear up minor file system damage would have squared things away. MySQL is not real happy if there has been fs damage to the underlying files and their .bin logs. However, not being able to log in to a basic service like SSH is not good. Whether or not MySQL wants to come up SSH should still be working. In the end the guys at NYI are probably going to have to do a full system load and restore the last backup, and/or replace defective hardware. I have seen old hard drives in RAID arrays that had perked along for years show no hint of any problem. Power down the machine to do something like blow the dust out or stick in some more memory sticks and it won't come up again. Had I not powered down it may have happily run a while longer. I have seen drives fail like this before, especially when they are fairly old. At this stage you can only emit SIGH and replace/rebuild. But if the NYI guys are responsible for providing you with a running system the onus is on them to get it going again, at least up to a certain point. After that you would need to pick up and carry the ball the rest of the way. Okay, so the machine is back online and I can log in again. The hardware is only 18 months old or so... good quality stuff, so hopefully nothing is physically damaged. We'll see... Unfortunately, mysql isn't working at the moment... will make a backup of data (I have the previous night's backup, of course, but would like the latest, if possible.) Then will try to figure out what's working and what's not. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how to recover after power outage
On Apr 5, 2009, at 4:41 AM, Glen Barber wrote: On Sun, Apr 5, 2009 at 2:59 AM, John Almberg wrote: Blast... my beautiful FreeBSD servers were rudely switched off when my data had a power outage a couple hours ago. They restored power about 30 minutes later, and one box came up no problem. The other has a login prompt on the serial console, but my login does not work. I get a "Login incorrect" message, even though the username/ password is correct. Can you log in as *any* user? Even root login fails? Can't log in at all. When I try to SSH into the box, I get this (server name changed): $ ssh u...@example.com -p 48420 ssh: connect to host example.com port 48420: Connection refused In other words, I seem to be locked out. I don't want to do anything drastic without having a good idea what I'm doing. Any suggestions, much appreciated. What was the previous (estimated) uptime on the machine? Several months, at least. In other words, did you change something and not/forget to restart the service? I don't believe so, but if I forgot it, then I guess anything is possible. Have you tried ssh-ing to port 22 to see if the setting was changed back to default? I can't at the moment, because the guys at NYI are working on the box. They have run fsck, which doesn't seem to have solved the problem. Are there any other services on this box? If so, are they running? The main app is MySQL. I don't think it is running, but can't really tell unless I can log in. I have backups, and while NYI is trying to get this box running, I'm setting up a new database server, just in case... -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
how to recover after power outage
Blast... my beautiful FreeBSD servers were rudely switched off when my data had a power outage a couple hours ago. They restored power about 30 minutes later, and one box came up no problem. The other has a login prompt on the serial console, but my login does not work. I get a "Login incorrect" message, even though the username/ password is correct. When I try to SSH into the box, I get this (server name changed): $ ssh u...@example.com -p 48420 ssh: connect to host example.com port 48420: Connection refused In other words, I seem to be locked out. I don't want to do anything drastic without having a good idea what I'm doing. Any suggestions, much appreciated. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: utility that scans lan for client?
I suspect that you don't have a switch that can port 'mirror' or 'span'. If you do, let us know. Otherwise, if you *really* want to find out what is on your switched Ethernet network, and nmap/arp etc. isn't enough, then I'd recommend an application called 'ettercap'. It runs on the CLI, and a colleague also has a nice GUI for it (under Linux) as well. This will allow you to infiltrate the network at Layer-2 by arp poisoning all connected devices, and intercepting all traffic. Essentially, you perform a MitM, and you become the host (or in a small environment the default gw) that the device is trying to talk to. This way, you can find out not only what the host is, but what it is saying. Please understand that this approach has significant side effects. You can do extensive harm to your local network by using this approach, so read up on it, and be careful. Know what you are doing, and know the ramifications of simply disconnecting yourself from the network prior to stopping the procedure. Not only that, but if you don't own control of the switched environment, this is a very good way to get yourself blocked completely from it. This tactic, and port mirror/span/monitor are the easiest ways to know what is really going on with regards to the wire (if you don't have ACL's and other mitigation/protection strategies already in place). Thanks. This is probably overkill for this little LAN. There are only 8 machines on it, mainly servers and a big printer and this Vonage device. The clients are mainly wireless devices that come and go, depending on who is in the building. The network is just one Cisco router and an Apple Airport Extreme for wireless (the best wireless access point I've ever used.) The wireless network just extends the wired LAN, so all wired and wireless devices are in the same address space. We actually have a couple cheap Airport Express boxes spread around the building, but they are essentially repeaters for the Airport Extreme, to extend the range. All the machines are either FreeBSD servers or Apple laptops (with the occasional rogue Windows laptop that sneaks in :-) The whole network is simple and cheap, with a minimum of wires, but it works. It just bugged me that I didn't know the IP address of the Vonage box. - John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: utility that scans lan for client?
On Mar 23, 2009, at 3:19 PM, David Kelly wrote: On Mon, Mar 23, 2009 at 02:59:36PM -0400, John Almberg wrote: I've tried googling for this, but I guess I don't know the name of a utility such as this... What I'm looking for is a utility that can scan a LAN for attached clients... i.e., computers that are attached to the LAN. I have one box (an appliance that I have no access to), that is on the LAN but I don't know what IP address it's using. I'd like to complete my network map, and that is the one empty box on my chart. How about something as simple as "arp -a"? This lists the arp cache of machines recently heard by your machine. If you know the IP address of the machine in question and its not in your arp table, ping it. Then the MAC address will appear unless there is a router between here and there. No need to be root. H'mmm. This is also very interesting. nmap did not find this appliance, as it turns out. But arp -a did found something on 192.168.1.107 (see below) server1 (192.168.1.106) at 0:13:d4:45:45:31 on en1 [ethernet] server2 (192.168.1.107) at (incomplete) on en1 [ethernet] server3 (192.168.1.108) at 0:23:12:f8:5e:fd on en1 [ethernet] I'm guessing this appliance (a Vonage phone adapter) is doing something non-standard. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: utility that scans lan for client?
On Mar 23, 2009, at 3:10 PM, Mel Flynn wrote: On Monday 23 March 2009 19:59:36 John Almberg wrote: I've tried googling for this, but I guess I don't know the name of a utility such as this... What I'm looking for is a utility that can scan a LAN for attached clients... i.e., computers that are attached to the LAN. I have one box (an appliance that I have no access to), that is on the LAN but I don't know what IP address it's using. I'd like to complete my network map, and that is the one empty box on my chart. security/nmap If the box pings, you can simply scan your LAN like: $ nmap -sP 192.168.2.0/24 Starting Nmap 4.76 ( http://nmap.org ) at 2009-03-23 11:05 AKDT Nmap done: 256 IP addresses (18 hosts up) scanned in 1.11 seconds There's tons of options available (including OS fingerprinting), most of which will require root to run as it needs on-the-fly changes to IP packets. That did it. Beautiful. Thanks. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
utility that scans lan for client?
I've tried googling for this, but I guess I don't know the name of a utility such as this... What I'm looking for is a utility that can scan a LAN for attached clients... i.e., computers that are attached to the LAN. I have one box (an appliance that I have no access to), that is on the LAN but I don't know what IP address it's using. I'd like to complete my network map, and that is the one empty box on my chart. Yes, I am obsessive :-) Any help, much appreciated. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: links vs real directories
On Mar 16, 2009, at 11:47 AM, John Almberg wrote: On Mar 16, 2009, at 11:39 AM, Erik Trulsson wrote: On Mon, Mar 16, 2009 at 11:22:13AM -0400, John Almberg wrote: I always thought that links to real directories were pretty much the same as real directories, but I've just discovered a situation where they are not and I'm wondering if I'm doing something wrong... A *soft* link to a directory entry (be it a directory or a file or something else) is not quite equivalent to the original entry since they are easily distinguished and some programs do treat softlinks differently from other targets. I can see that, now... If I create a soft link to ~/shared/config, and then cd into the directory, when I type 'ls ..', I get the listing for ~/shared, not ~/app. Bummer... I've just dug through man ln, and don't see any obvious solution. Since this must be a problem for anyone who wants to do something like this, I guess I am taking the wrong approach, altogether. Will have to re-think this Okay! I guess I wasn't the first to have this problem... lndir (in ports) solves the problem by creating a set of soft links for all the files in the 'linked' directory. Kinda kludgy, but it works. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: links vs real directories
On Mar 16, 2009, at 11:39 AM, Erik Trulsson wrote: On Mon, Mar 16, 2009 at 11:22:13AM -0400, John Almberg wrote: I always thought that links to real directories were pretty much the same as real directories, but I've just discovered a situation where they are not and I'm wondering if I'm doing something wrong... A *soft* link to a directory entry (be it a directory or a file or something else) is not quite equivalent to the original entry since they are easily distinguished and some programs do treat softlinks differently from other targets. I can see that, now... If I create a soft link to ~/shared/config, and then cd into the directory, when I type 'ls ..', I get the listing for ~/shared, not ~/app. Bummer... I've just dug through man ln, and don't see any obvious solution. Since this must be a problem for anyone who wants to do something like this, I guess I am taking the wrong approach, altogether. Will have to re-think this -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: links vs real directories
On Mar 16, 2009, at 11:22 AM, John Almberg wrote: I always thought that links to real directories were pretty much the same as real directories, but I've just discovered a situation where they are not and I'm wondering if I'm doing something wrong... I have a Ruby on Rails application running on a FreeBSD server. All Rails apps use the same directory structure, that consists of an application directory, plus a number of subdirectories. One of these sub directories is called 'config'. I would like to move this config directory out of the main Rails app directory, and then add a link from the app directory to the moved config directory. so: app --> config will become app --> config(link) --> config Basically, what I'm doing is: cd ~/app # now in directory with real 'config' dir mv config ~/shared/config ln -s ~/shared/config config That moves the directory and creates a functional link to it (I tested it), but Rails doesn't like it and refuses to run the app. The permissions are correct, I believe: [mas...@on:current]> ls -l total 34 ... snip ... drwxrwxr-x 3 master master 512 Mar 16 11:06 bin drwxrwxr-x 3 master master 512 Mar 16 11:06 components lrwxr-xr-x 1 master master26 Mar 16 11:07 config -> /home/ master/shared/config drwxr-xr-x 4 master master 512 Mar 16 11:06 db etc... So, I guess a link is NOT exactly equivalent to a directory. At least not the way I am doing it. I'm guessing I'm making a real newbie mistake, so if anyone can set me straight, I'd appreciate it. Thank: John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions- unsubscr...@freebsd.org" A little more information on this... from the Rails log, I can see that a Ruby script in the config directory cannot load ('require') a needed file because it can't find it: /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- application (MissingSource File) It looks like this require statement is using a relative path, like '../path/to/file'. Does '..' not work properly with a soft link? In other words, '..', should mean ~/app, but since the config directory is really in '~/shared', perhaps '..' translates to '~/shared'? That would cause the problem finding the file. Is there a way around this problem? Digging in man ls, right now.. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
links vs real directories
I always thought that links to real directories were pretty much the same as real directories, but I've just discovered a situation where they are not and I'm wondering if I'm doing something wrong... I have a Ruby on Rails application running on a FreeBSD server. All Rails apps use the same directory structure, that consists of an application directory, plus a number of subdirectories. One of these sub directories is called 'config'. I would like to move this config directory out of the main Rails app directory, and then add a link from the app directory to the moved config directory. so: app --> config will become app --> config(link) --> config Basically, what I'm doing is: cd ~/app # now in directory with real 'config' dir mv config ~/shared/config ln -s ~/shared/config config That moves the directory and creates a functional link to it (I tested it), but Rails doesn't like it and refuses to run the app. The permissions are correct, I believe: [mas...@on:current]> ls -l total 34 ... snip ... drwxrwxr-x 3 master master 512 Mar 16 11:06 bin drwxrwxr-x 3 master master 512 Mar 16 11:06 components lrwxr-xr-x 1 master master26 Mar 16 11:07 config -> /home/ master/shared/config drwxr-xr-x 4 master master 512 Mar 16 11:06 db etc... So, I guess a link is NOT exactly equivalent to a directory. At least not the way I am doing it. I'm guessing I'm making a real newbie mistake, so if anyone can set me straight, I'd appreciate it. Thank: John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: / partition full
On Mar 13, 2009, at 8:46 AM, Bill Moran wrote: In response to Wojciech Puchar : good lesson to NOT make multiple partitions :) And when a rogue app fills up /var and kills 4 other apps that could have kept going ... are we then learning conflicting lessons? Enterprise-class servers should have many partitions to separate different functions and protect apps from each other. This newbie admin agrees with this. Having a separate /var partition, in particular, has saved my bacon several times, at least until I figured out how to turn mysql-bin files off. The /var partition was at 100%, but the server kept going so I could diagnose and find the problem. Whew! -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Battery powered, SBC that can run BSD
On Mar 5, 2009, at 9:12 AM, George Davidovich wrote: soekris.com Nice. Thanks. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Battery powered, SBC that can run BSD
Hope this isn't too off topic... And I'm not sure of my terminology... I'm looking for a small, single board computer that can run for a week or two on batteries (so very low power drain), topped up by solar cells when the sun is out, and that can run some sort of unix... preferably one of the BSDs. No hard drive, obviously, or any other power draining peripherals. The user interface would be a low powered LCD display plus some buttons. The application is for a custom measuring instrument that would run in a marine environment. I've been Googling for it for the last hour, but can't find what I'm looking for. Any ideas much appreciated. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: tab-delimited to csv
On Feb 16, 2009, at 1:25 PM, Adam Vande More wrote: John Almberg wrote: On Feb 16, 2009, at 12:55 PM, Roland Smith wrote: On Mon, Feb 16, 2009 at 11:55:50AM -0500, John Almberg wrote: Can anyone suggest a way to convert a tab-delimited file to csv using standard unix utilities? I could whip up a Ruby script to do it, but As long as the files don't contain commas themselves, Right, that's the tricky bit. I could use tr otherwise. I hate to reinvent the wheel. I'd whip up that script. There is a shareware tab2csv utility for windows for $49.95: http://www.download32.com/info-pack-com- tab2csv-i31827.html I'm working on it, right now. I also saw that windows utility, but doesn't help me much. OTOH, if you have a spreadsheet program like Gnumeric or OpenOffice installed, you might be able to script those to import from tab- delimited and export to CSV. Admittedly that is like using a nuke to kill a fly. Actually, the problem arises because I have a client who is exporting a 'database' file from Excel 2000 (don't ask), to .csv, and Excel is so stupid that it is not putting quotes around a field that contains commas. Duh. Excel seems to export to tab-delimited format without making any fatal errors, but I need a real .csv file for import. Thus my need to convert from tab to (real) csv. -- John There is this: http://www.sat.dundee.ac.uk/arb/psion/ Have no idea if it complies or works as you want. But if you're dealing with just one so called "database" from Excel I would go with either checking the settings on the Excel export(in OO.org you can specify w/ or w/out quotes) as they may have missed the option. That was my first hope, but there doesn't seem to be a quote option in Excel 2000, hard as that is to believe... Unfortunately, they are a remote client, so I can't look at the 'Save As' options myself, but I spent a long time on the phone with them, trying to get them to look for such an 'advanced' option. No luck. It's either not there, or they are blind. Or simply get the original file, open it in OO.org and do it from there as was basically suggested earlier. That would be easy, but they upload this file frequently, and I need an automated solution. I would have thought something like would exist as it's certainly useful like dos2unix Me too. Weird. I've got a prototype working, but now I've discovered that even the tab delimited file is malformed... the Ruby CSV Library chokes on one of the data lines. Illegal use of quotes. Bummer... -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"