 | - for a FREE MKS Toolkit Evaluation |
WebProWorld Dev Forum | |
|
Recent Articles | Reports from the Linux/Java camp visit to Microsoft The competitive summit continues. I'm bummed that I haven't had much time to make it over there. It's cool that they let the attendees blog.
Linspire Releases Five-0 Linspire today announced the release of its latest operating system, Linspire Five-0. More than a year in the making and with more than 1,200 improvements, the newest version of Linspire boasts enhancements in every core application and provides the most secure
SSH Joins Novell's Technology Partner Program SSH Communications Security has joined Novell's Technology Partner Program and announced that SSH Tectia supports Novell's SUSE LINUX
Hardening your Kernel with OpenWall The Openwall Project provides security related kernel patches for Linux and BSD kernels.
IBM Investing In Linux IBM's affection for the open-source community and Linux continues to grow. Recently they allowed the community access to numerous IBM software patents with goals of quality improvement.
|
|
| 03.23.05
Controlling Linux Colors In Vi (vim)
By A.P. Lawrence
Because of an old application that apparently partially looks at termcap and partially hard-codes terminal info, a customer has to set TERM=ansi when using Alphacom to access his Linux box.
The Linux colorizing fouls things up royally. You can shut off command line colorizing by editing /etc/DIR_COLORS and changing "COLOR ttty" to "COLOR none" or (less drastically) by removing the "TERM ansi" line from the same file (which removes colorization for ansi but doesn't affect console use).
But that still leaves vi messing things up. The fix for that is to add
set t_Co=2
to the top of /etc/vimrc. I attempted to do this in ~/.vimrc but couldn't make it work, and also tried
if &term=="ansi"
  set t_Co=2
endif
in /etc/vimrc but that didn't work either.. not sure why yet. The idea there would be to let vim colorize if not using ansi, though in my case forcing it is fine because I don't want colors in vi ever.
I have seen the suggestion to "set syntax off"; that didn't work for me or the customer.
To my mind, colorizing is pretty messed up..
*Originally published at APLawrence.com
About the Author: A.P. Lawrence provides SCO Unix and Linux consulting services http://www.pcunix.com
Track Traffic With Webalizer
By Steve Friedl
The April 2005 issue of Linux Magazine has my Feature "Track Traffic With Webalizer - A Fast, Free and Feature-rich Log Analyzer", and it provides a decent overview of how to configure Webalizer.
I have been using it for years on my own webserver, and after setting it up enough times on different systems, I asked my editor if he thought it would make a good article; he thought it would.
What I have also worked on, but haven't packaged up yet, is a much faster inverse DNS resolver for Webalizer. When processing webserver logs, many of us like to see the DNS names where traffic is coming from, but doing bulk lookups can be slow.
| Use NetSupports Scan function to monitor exactly what is happening on your networked workstations and servers and to see what you users'are doing. Try it Free |
|
Webazolver spawns some user-given number of child processes to perform lookups one at a time, caching the results in a DB file for later use by webazolver. But this approach still limits the number of outstanding queries, and a few dead resolvers can really hang the process up.
I wrote a program that uses the excellent ADNS asynchronous resolver library, and in a single thread/process it's many, many times faster than the synchronous version.
I've really got to package and post it...
Links: The April 2005 issue of Linux Magazine
About the Author: Steve Friedl is a software and network security consultant in Southern California. He runs Unixwiz.net which features a collection of tools, tech tips, and other information in the scope of his consulting practice. |