Electricity bills got higher again? Does your computer waste too many power cycles? Or perpahs you just don’t feel green enough? In any case, this article is for you! You’ll learn how to save energy and CPU cycles with your Linux box, no matter how old it is. Short introductionSomehow, I’ve always had bad luck to new technologies. The world introduces more and more sophisticated methods of using the human knowledge each day, and I was always in the long tail of progress. Or simply, something didn’t want to work for me on Linux. It was similar when I tried to scale the CPU frequency. I didn’t pay much attention to this before, because the laptops I used, simply didn’t provide such a feature. Yes, I realize it was my bad luck to buy laptops like that — different Durons and Athlons, which didn’t allow economical scaling, visited my poor desktop computer. So I classified this topic as: ‘I don’t know, nor am I interested, I’m overworked’. And then, recently, I purchased a new laptop and installed Ubuntu on it, where such things as CPU scaling work out of the box. I would have got over this like “Well, because it’s a laptop, and they’re made to do this by default”, if not the fact, that the electricity price is rising, or that I feel responsible for the ozone depletion — well… I’ve developed a guilty conscience. Does my tiny desktop PC have to heat like a crazy one? The PlaygroundMy Debian desktop is so aged, that it remembers the time of capturing Saddam. Of course, the whole time I’ve been feeding him ‘unstable’ updates, but I didn’t even try to suspect, that in a ‘magical’ way, all the conveniences of Linux will start to work by themselves. So I’ve made a little look-around, and this is what we need to control the wild powers of the CPU:
We have already discussed how to install mail server with postfix Devcot SASL Squirrel Mail in this article we will see how to add spam filter for postfix mail server.
Apache SpamAssassin is an extensible email filter that is used to identify spam. Once identified, the mail can then be optionally tagged as spam for later filtering. It provides a command line tool to perform filtering, a client-server system to filter large volumes of mail, and Mail::SpamAssassin, a set of Perl modules allowing Apache SpamAssassin to be used in a wide variety of email systems. Install Spamassassin in Debian #apt-get install spamassassin spamc spamassassin package can also be integrated into a Mail Transport Agent such as postfix. Preparation By default Spamassassin will run as root users when you install from debian repository and is not started to avoid that, we are going to create a specific user and group for spamassassin. #groupadd -g 5001 spamd #useradd -u 5001 -g spamd -s /sbin/nologin -d /var/lib/spamassassin spamd #mkdir /var/lib/spamassassin #chown spamd:spamd /var/lib/spamassassin we need to change some settings in /etc/default/spamassassin and make sure you get the following values ENABLED=1 SAHOME=”/var/lib/spamassassin/” OPTIONS="--create-prefs --max-children 5 --username spamd --helper-home-dir ${SAHOME} -s ${SAHOME}spamd.log" PIDFILE=”${SAHOME}spamd.pid” We are going to run spamd daemon as user spamd and make it use its own home dir (/var/lib/spamassassin/) and is going to output its logs in /var/lib/spamassassin/spamd.log spamassassin Configuration we need to give spamassassin some rules. The default settings are quite fine, but you might tweak them up a bit. So let’s edit /etc/spamassassin/local.cf and make it looks like that #vi /etc/spamassassin/local.cf Modify this file looks like below rewrite_header Subject [***** SPAM _SCORE_ *****] required_score 2.0 #to be able to use _SCORE_ we need report_safe set to 0 #If this option is set to 0, incoming spam is only modified by adding some “X-Spam-” headers and no changes will be made to the body. report_safe 0 # Enable the Bayes system use_bayes 1 use_bayes_rules 1 # Enable Bayes auto-learning bayes_auto_learn 1 # Enable or disable network checks skip_rbl_checks 0 use_razor2 0 use_dcc 0 use_pyzor 0 we set spamassassin’ spamd default settings to rewrite email subject to [***** SPAM _SCORE_ *****], where _SCORE_ is the score attributed to the email by spamassassin after running different tests, only if the actual score is greater or equal to 2.0. So email with a score lower than 2 won’t be modified. Level: Advanced Noah Gift (noah.gift@giftcs.com), Software Engineer, Racemi 15 Apr 2008 Relational databases are not the only solution available for Python programmers in the enterprise. Often an object database can be a more natural fit for solving certain problems. This article discusses ZODB, a scalable and redundant object database that specializes in storing extensible objects, without the natural Object-relational impedance mismatch that can occur by attempting to make an Object Oriented Language and a Relational Query System map objects to relations. Just like their friends who program in statically typed languages, programmers of Python and in other dynamic languages often use relational databases as a back-end data store. Whether they directly define database tables using SQL or instead use a schema language that their framework or ORM provides as an alternative, all such solutions offer a similar workflow: the application designer must specify the name, type, and constraint of each attribute than an instance of each class will support, and in return, database relations are instantiated that can persist instances of those objects. Over a decade ago, the Zope Corporation first offered an alternative, which they designed to better fit the data model of a dynamic language: the Zope Object Database (ZODB), which specializes in the storage of extensible objects rather than classical relations. Today it is the database engine that most often underlies Zope-powered Web applications. The decision of whether to use the ZODB or an ORM atop a relational database involves important trade-offs, which we will explore in this article, along with a basic guide to the maintenance of a production ZODB instance. |
PostgreSQL is a powerful, open source relational database system. It has more than 15 years of active development and a proven architecture that has earned it a strong reputation for reliability, data integrity, and correctness. It runs on all major operating systems, including Linux, UNIX (AIX, BSD, HP-UX, SGI IRIX, Mac OS X, Solaris, Tru64), and Windows. It is fully ACID compliant, has full support for foreign keys, joins, views, triggers, and stored procedures (in multiple languages). It includes most SQL92 and SQL99 data types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and TIMESTAMP. It also supports storage of binary large objects, including pictures, sounds, or video. It has native programming interfaces for C/C , Java, .Net, Perl, Python, Ruby, Tcl, ODBC, among others.
pgAdmin III is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world. The application may be used on Linux, FreeBSD, OpenSUSE, Solaris, Mac OSX and Windows platforms to manage PostgreSQL 7.3 and above running on any platform, as well as commercial and derived versions of PostgreSQL such as EnterpriseDB, Mammoth PostgreSQL, Bizgres and Greenplum database. pgAdmin III is designed to answer the needs of all users, from writing simple SQL queries to developing complex databases. The graphical interface supports all PostgreSQL features and makes administration easy. The application also includes a syntax highlighting SQL editor, a server-side code editor, an SQL/batch/shell job scheduling agent, support for the Slony-I replication engine and much more. Server connection may be made using TCP/IP or Unix Domain Sockets (on *nix platforms), and may be SSL encrypted for security. No additional drivers are required to communicate with the database server. Install Postgresql and pgadmin3 in Ubuntu PostgreSQL 8.2 version will be installed in Ubuntu 7.10 (Gutsy Gibbon) sudo apt-get install postgresql-8.2 postgresql-client-8.2 postgresql-contrib-8.2 sudo apt-get install pgadmin3 This will install the database server/client, some extra utility scripts and the pgAdmin GUI application for working with the database. Level: Intermediate Martin Brown (mc@mcslp.com), Professional writer, Freelance 15 Apr 2008 The Simple Network Management Protocol (SNMP) is built in to many devices, but often the tools and software that can read and parse this information are too large and complicated when you only want to check a quick statistic or track a particular device or issue. This article looks at some simplified methods for getting SNMP information from your devices and how to integrate this information into the rest of your network's data map. The typical UNIX administrator has a key range of utilities, tricks, and systems he or she uses regularly to aid in the process of administration. There are key utilities, command line chains, and scripts that are used to simplify different processes. Some of these tools come with the operating system, but a majority of the tricks come through years of experience and a desire to ease the system administrator's life. The focus of this series is on getting the most from the available tools across a range of different UNIX environments, including methods of simplifying administration in a heterogeneous environment.
Documenting software architecture, Part 1: What software architecture is, and why it's important to document it Level: Intermediate Tilak Mitra (tmitra@us.ibm.com), Certified Senior IT Architect, IBM Global Services 15 Apr 2008 Software architecture has increasingly become important for the development of complex real-time systems. In this new series, learn why and how you should document software architecture. You will learn about the five different views, or aspects, that you should document for any medium- to large-scale software development project. This first article in the series introduces software architecture and the importance of documentation. You'll also get an overview of the architecture views that will be covered in upcoming articles. Software architecture as a discipline began in the 1970s. With the increasing complexity and pressures of developing complex real-time systems, software architecture emerged as a fundamental construct of mainstream systems engineering and software development. Like any other enduring discipline, software architecture also had its initial challenges. A software architecture represents the structural and behavioral aspects of a system. The textual and diagrammatic expressions that were used during early efforts to document software architectures were often insufficient and imprecise. What was needed was a consistent and well-understood pseudo- or meta-language to unify all the different ways of representing and documenting software architectures. Engineering and computer science communities, fostered by academic research, have made great strides in developing best practices and guidelines for effective documentation of software architecture. Level: Introductory Scott Davis (scott@aboutgroovy.com), Editor in Chief, AboutGroovy.com 15 Apr 2008 Many-to-many (m:m) relationships can be tricky to deal with in a Web application. In this installment of Mastering Grails , Scott Davis shows you how to implement m:m relationships in Grails successfully. See how they're handled by the Grails Object Relational Mapping (GORM) API and the back-end database. Also find out how a bit of Ajax (Asynchronous JavaScript XML) can streamline the user interface. Software development is about modeling the real world in code. For example, books have authors and publishers. In a Grails application, you'd create a domain class for each. GORM creates a corresponding database table for each class, and the scaffolding gives you a basic Create/Retrieve/Update/Delete (CRUD) Web interface for free. The next step in the process is to define the relationships among these classes.
A typical publisher publishes more than one book, so the relationship between a
publisher and its books is a straightforward one-to-many (1:m) relationship: one
Level: Intermediate Nathan Harrington (harrington.nathan@gmail.com), Programmer, IBM 15 Apr 2008 Use sndpeek and custom algorithms to match voices to a pre-recorded library. Create applications to let you know who is speaking in teleconferences, podcasts, and live media events. Build basic assistance programs to help the hearing-impaired identify speakers in a bandwidth-limited context. Reliable authentication of an individual through voice-print analysis is complex and difficult. However, sndpeek and some custom algorithms can provide a voice-print matching configuration of considerably reduced complexity while retaining a great deal of usefulness. This article demonstrates the tools and code you'll need to modify sndpeek to record individual voice-print files for a given speaker. Each of these files are then compared to the incoming real-time audio stream to provide best-guess matches and visualizations for the current speaker. You need a system with the capability of processing sound input, preferably from an external microphone. The code in this article was developed and tested on an IBM ThinkPad T42p sporting an 1,800-MHz processor and 1 GB of RAM. Less-powerful systems should be capable of using of the code presented here, as sndpeek is the primary resource consumer and is an efficient program. Level: Intermediate M. Tim Jones (mtj@mtjones.com), Consultant Engineer, Emulex Corp. 15 Apr 2008 It's not that Linux isn't fast or efficient, but in some cases fast just isn't good enough. What's needed instead is the ability to deterministically meet scheduling deadlines with specific tolerances. Discover the various real-time Linux alternatives and how they achieve real time—from the early architectures that mimic virtualization solutions to the options available today in the standard 2.6 kernel. This article explores some of the Linux architectures that support real-time characteristics and discusses what it really means to be a real-time architecture. Several solutions endow Linux with real-time capabilities, and in this article I examine the thin-kernel (or micro-kernel) approach, the nano-kernel approach, and the resource-kernel approach. Finally, I describe the real-time capabilities in the standard 2.6 kernel and show you how to enable and use them. Level: Intermediate Elizabeth Dancy (lizdancy@ca.ibm.com), Software Developer, IBM 15 Apr 2008 As IBM grows and develops autonomic technologies, the autonomic computing initiative relies heavily on research and development to present innovative ideas, improve existing technologies, and prototype in the most rapidly expanding development areas. In this article, take a look at two autonomic computing academic projects that are bringing new developments to IBM. The first project looks at converting legacy code to source code that is autonomic-ready, while the second project focuses on new methods for identifying problems in large-scale applications. For each project, you will understand the current research direction and then explore the project in detail. Finally, you will see how each project contributes to the Monitoring-Analysis-Planning-Execution (MAPE) loop design model and what future research directions are planned. Many of the problems and questions faced by IBM development teams are first explored as research projects in conjunction with top Canadian Universities at the IBM Centre for Advanced Studies (CAS). In Toronto, Ottawa, and Montreal, the CAS centres serve as incubators for the latest ideas, with a goal of producing new innovations and solutions relevant to IBM products as well as strengthening ties between IBM and academic CAS collaborators. As the IBM autonomic vision materializes, a host of new research problems are created, many of which are specific to an IBM development goal or product. Therefore, CAS is the ideal environment to engage top students and professors to conceptualize real, usable, deliverable solutions that can then be integrated into IBM products. This is not a trivial feat. CAS students, professors, and collaborators must cooperate to produce answers to IBM's most pressing research questions while maintaining conformance with the original IBM autonomic vision. Each respective solution must provide services that are compatible with the overall model of autonomic computing. This article gives you an understanding of the following two CAS projects: |
||||||||||||||