Jim's Depositorythis code is not yet written |
help |
|
anonymous comment, 3 days ago
Hello Jim, This looks like just what the doctor ordered but it failed to compile for me: Did I do something wrong or do you have any suggestions to help fix it? Thanks much, Patrick -> patrickkirchner AT yahoo . com Current Directory = /tmp/vhd2img -->make cc -g -MMD -Wstrict-prototypes -Wall -Werror vhd2img.c -o vhd2img vhd2img.c:38:38: error: missing terminating ' character vhd2img.c:59:37: error: missing terminating ' character vhd2img.c:67:67: error: missing terminating ' character make: *** [vhd2img] Error 1 comment by jim, 6 weeks ago
comment by jim, 2 months ago
I think a better tool would be one that used a central repository with a copy of each package and called on the observed machine to generate on the fly signatures of files with a random seed. A truly nasty rooter could still thwart that by faking things in either the C runtime library or the appropriate system calls.
comment by jim, 2 months ago
Going forward: I will have to drop dcc. Their licensing is no longer free enough to be distributed by Debian. That will slow more messages, but in practice anything dcc catches is also caught by spamassassin.
I'd like to add an adaptive whitelist out front to prevent false positives and give me a stream of known good messages for training the bogofilter. I haven't found one I like yet, but I keep looking. Maybe I'll have to write it.
comment by jim, 2 months ago
An extra note on bogofilter: Bogofilter is built with a single user in mind. I'm sure it works better when it has a single user's mail to think about and can rely on the human to tag the false positives and negatives.
In a 150 user common filter you can rely on exactly 0 of them to report their miscategorized spam. If you try to force them to comply you will find that 10% of them do it backwards and pollute your statistics so badly you have to erase everything and start again.
That said, it works quite well and is speedy and doesn't rely on external network servers so it makes a good first line of defense.
anonymous comment, 2 months ago
If you want to collect apache statistics with Munin you need to enable extended server status in apache. ExtendedStatus OnIf your web server does not bind to localhost (127.0.0.1), you need to define the server status URL in your /etc/munin/plugin-conf.d/munin-node config file. [apache_*] anonymous comment, 2 months ago
If you run sendmail as your mail server munin has 3 plugins that are in the base Debian install. Link all 3 into your /etc/munin/plugins directory. One, sendmail_mailqueue will work out of the box. The other two depend on sendmail stats files that do not get created in a base Debian install. To enable stats logging you must manually create the stats files.
Once these files have been created, with sendmail write permission, sendmail will start logging to them. Gotta love sendmail, "If you create the log file for me, I will write to it." You can test your mail statistics file creation manually with the mailstats command. comment by jim, 3 months ago
anonymous comment, 3 months ago
comment by jim, 3 months ago
comment by jim, 3 months ago
I have made contact with the robots. We should all be afraid. Thus far the robots have attempted to add these comments:
I suppose some filtering software will now block my site because it talks about sex.
comment by jim, 4 months ago
comment by jim, 4 months ago
comment by jim, 9 months ago
A word about cheap web cameras: Many webcams are cheap webcams. Unfortunately some of them cost a lot of money. Logitech I have found to be a crap shoot. Some of their camera models are nice devices, others are utter crap sensors. The problem is you can't tell which is which without buying one. After getting burned with a 'pro' model that was built on a terrible imaging element I now buy web cams that are crap, know they are crap, and are priced like they are crap.
My current favorite is the Aiptek Mini PenCam 1.3, which is a 1.3Mpixel camera, maybe if you count the red, green, and blue elements separately and round up… a couple of times. 640x480 pixels, JPEG encoded, 10 frames per second using the gspca drivers in linux. Their autobrightness logic is insane and will drift off to unintelligible pictures over time, but thats ok, I do my own autobrightness. The gspca driver is wrong about how to set and retrieve the brightness, contrast, and saturation parameters, but I fix that. The nice part is that the cameras are $9.99, with a stand, cable, and a handy leatherette carrying pouch that you can throw in the trashcan.
I don't mind a crappy camera that is honest about it.
comment by jim, 9 months ago
Bleh, timeout was harder than I had hoped. I use a simple watchdog thread per request scheme, but even that takes a mutex and some care to get everything deallocated safely. Worse, if thread A is in an fgets() on file F when it is phtread_canceled, then when thread B tries to fclose(F) it hangs. I suppose there is a lock inside the FILE *. I punted stdio and just did my input at the socket level. I was already doing output at the socket level to avoid a copy operation.
Now to add some comments, forget all about this code, and move on with the actual problem.
comment by jim, 9 months ago
comment by jim, 9 months ago
Well that wasn't half hard. wc reports 279 lines of code weighing in at 7.5kb source and just under 4k of binary for an HTTP/1.0 and HTTP/1.1 compliant httpd function. (Well, still a few more lines to enforce a maximum concurrent thread limit and a thread timeout so I needn't fear nefarious people… but it is nearly done.) I thought going in that getting HTTP/1.1 pipelining right was going to be the trickiest part, but on further investigation none of the major browsers use it. Apparently enough web servers screw it up to prevent it.
In the absence of pipelining I decided to forgo keep-alive entirely in favor of simplicity. By careful use of TCP options I only need 3 outgoing packets for each request (up to 1.mumble kbytes). The SYN-ACK, an ACK-Data-FIN, and a FIN-ACK.
An interesting performance issue: Safari shotguns me with many simultaneous connections, to which my httpd responds quickly. If I were supporting keep-alive I think Safari would be encouraged to only use two connections and serialize the requests over them. I wonder which is faster? I may have to add keep-alive support just to answer this question.
Another interesting tidbit: Some people on the web maintain that TCP_QUICKACK and TCP_DEFER_ACCEPT are inherited from the listener socket to the accepted socket. I don't think so. At least the only way I can get QUICKACK turned off is to not use TCP_DEFER_ACCEPT on the listening socket and slam TCP_QUICKACK off on the accepted socket before the first data arrives. Otherwise I end up sending an ACK before my first data packet.
And a last tidbit: You can keep your TCP_CORK in all the to shutdown(), that gets your FIN piggybacked on your last data packet.
comment by jim, 10 months ago
Why are there so many packages ruined by people using autoconfigure and libtool? Just write a simple Makefile and let it be. The application where I was going to use libmicrohttpd requires me to crosscompile and after hours of thrashing about I still can't get it to build.
Back to the bit heap with it. I'll write my own httpd code.
The femtoblogger software is being written by Jim Studt. The content of this page is provided by anonymous individuals. If you believe something on this page is innapropriate contact Jim Studt. |
Contributeloginlogout post create account (12 seconds) recent comments FilterSearchBrowsers
Archives
|
Well, err, uh, duh! I poked around in the .c file and removed the whole license preamble then it compiled just fine. Sorry about that. It worked great but the resulting .raw and converted .qcow2 file give me a BSOD when run with kvm.
Thanks,
Patrick.