Scripting with wireless network cards
Hey everyone, My laptop has a problem where the wireless network card stops sending and receiving every now and again. I'll run the ifdown and ifup scripts to know effect. It will get an ip address from the router, but it won't actually communicate with anything. I'd like to learn more about what is happening under the hood, so that maybe I could write some sort of script to re-initialize it and get it going again. Does anyone have any suggestion where I should start? Thanks, Kjel ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: Scripting with wireless network cards
On 6/3/07, Kjel Anderson <[EMAIL PROTECTED]> wrote: > I'd like to learn more about what is happening under the hood ... > Does anyone have any suggestion where I should start? To learn about what "ifup", "ifdown", and friends do: First, try "man ifup", "man ifdown", and so on. Follow references to other commands and files, especially in "SEE ALSO" sections. Find out what package contains the relevant files, and see if there is non-manpage documentation. This typically appears under /usr/share/doc/ for the package name. For example, on my Fedora 6 system: $ rpm -qf `which ifup` initscripts-8.45.7-1 $ cd /usr/share/doc/initscripts-8.45.7 $ ls ... Check the logs. You can see recent kernel log messages with "dmesg". Pipe it through "less" for more control, i.e., "dmesg | less". Other logs will typically be found somewhere under the /var/log/ directory. Finally, you can read the source. Use "which ifup" to find the actual file -- on my Fedora 6 box, it's /sbin/ifup. Then use the file(1) command to determine the type of file. Again on my box: $ file /sbin/ifup /sbin/ifup: Bourne-Again shell script text executable Since that's a shell script, I can read it directly. If it was a binary, I could pull the source package, and look at that. That should get you started. :-) -- Ben ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Search Engine software
Hey all, Thought I'd ask around to see what software folks are using these days for providing searches on their websites. The site (in my particular case) that needs the search is an engineering company with a decent sized parts list and lots of industry lingo. They need the engine to be able to do matching based on phonetic matches (soundex or similar is good enough) but they also need to be able to have the search engine understand searching for different word tenses (not just substring searches) For instance, when searching on the term "connector", the software should be able to figure out that "connection" is also a match. The other thing is that they want is to be able to customize the search results in a very particular manner. That is, for any of the search results that are for a product page, they want the result to include a thumbnail picture of the part. It's definitely fine if this bit of functionality requires some coding on my part. For a long time, it seemed the "the" answer was ht://Dig (http://www.htdig.org). In fact, the main page still seems like it covers everything I want (not sure if that last bit is possible or not though) but it seems like it is no longer actively developed? The last (beta) release was in 2004. I gave it a try anyway and while it largely seemed like the old ht://Dig that I used to know and love, it seems awfully slow. There's only about 300-400 pages to index and the indexing seemed to take a long time (30 minutes plus) and the searches seemed rather slow as well (10-15 seconds). This is all on what I would consider pretty reasonable hardware under non-existent load. I played briefly with mnoGoSearch (http://www.mnogosearch.org). It seemed alright, though I couldn't seem to get it to do anything but exact searches. (Probably just needed to play with it more). In any case, I thought I'd turn to the list to see what recent experiences folks have had with search engines. Thanks! -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting annoying in email? Cole Tuininga [EMAIL PROTECTED] http://www.code-energy.com/ ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: Scripting with wireless network cards
> Date: Sun, 3 Jun 2007 21:26:19 -0400 > From: "Ben Scott" <[EMAIL PROTECTED]> > Finally, you can read the source. Use "which ifup" to find the > actual file -- on my Fedora 6 box, it's /sbin/ifup. Then use the > file(1) command to determine the type of file. Again on my box: > > $ file /sbin/ifup > /sbin/ifup: Bourne-Again shell script text executable > > Since that's a shell script, I can read it directly. If it was a > binary, I could pull the source package, and look at that. Actually, reading the shell script is where I would *start*. If you can read bash, it's probably the fastest way to find out what you need to know (well, beyond what the man page tells you). Source, however, has one unique advantage over documentation: it's always up to date! If your wireless interface is flaking out (if it decides to quit sending/receiving packets or whatever), unloading and reloading the wifi module may help. However, taking an interface down and bringing it back up has the potential to sever existing TCP/IP connections. (This is probably what you're seeing.) There are some workarounds: (1) If you have another point of presence on the 'Net, you can tunnel all your packets to it, and gateway onto the net from there. That way, if your IP ever changes, you can reconfigure your tunnel and your connections will remain intact. Of course, this could be scripted. (2) When your wifi goes haywire, you can look for the modules which need to be reloaded, make a note of your network settings, remove and reload the modules, and manually restore the network settings. This could be scripted too. (3) (Warning: this workaround comes close to being an actual *fix*!) You could look for a more recent version of your wifi driver and use that. Note, if you know C, you needn't necessarily upgrade your kernel to do this. Often, copying the .c and .h files from a newer kernel tree will suffice. I run Frankenkernels like this all the time. ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/