Automating System Administration with Perl: Tools to Make You More Efficient

  • admin
  • October 14, 2016
  • Computers
  • Comments Off on Automating System Administration with Perl: Tools to Make You More Efficient

By David N. Blank-Edelman

If you do platforms management paintings of any type, you need to care for the transforming into complexity of your surroundings and lengthening calls for in your time. Automating method management with Perl, moment variation, not just provides you with definitely the right instruments on your task, but additionally indicates how you can technique particular difficulties and to safely automate routine projects. up-to-date and increased to hide the most recent working structures, applied sciences, and Perl modules, this variation of the "Otter booklet" might help you:
  • deal with person bills
  • Monitor filesystems and procedures
  • Work with configuration documents in very important codecs equivalent to XML and YAML
  • Administer databases, together with MySQL, MS-SQL, and Oracle with DBI
  • Work with listing companies like LDAP and lively listing
  • Script e mail protocols and junk mail keep an eye on
  • Effectively create, deal with, and study log records Administer community identify and configuration companies, together with NIS, DNS and DHCP
  • Maintain, video display, and map community companies, utilizing applied sciences and instruments reminiscent of SNMP, nmap, libpcap, GraphViz and RRDtool
  • Improve filesystem, strategy, and community protection

This variation contains extra appendixes to get you on top of things on applied sciences reminiscent of XML/XPath, LDAP, SNMP, and SQL. With this ebook in hand and Perl on your toolbox, you are able to do extra with less--fewer assets, much less attempt, and much much less hassle.

Show description

Preview of Automating System Administration with Perl: Tools to Make You More Efficient PDF

Best Computers books

UML: A Beginner's Guide

Crucial abilities for first-time programmers! This easy-to-use publication explains the basics of UML. you are going to learn how to learn, draw, and use this visible modeling language to create transparent and potent blueprints for software program improvement initiatives. The modular procedure of this series--including drills, pattern tasks, and mastery checks--makes it effortless to benefit to exploit this robust programming language at your personal velocity.

The Linux Programmer's Toolbox

Grasp the Linux instruments that might Make You a extra effective, powerful Programmer The Linux Programmer's Toolbox is helping you faucet into the giant choice of open resource instruments on hand for GNU/Linux. writer John Fusco systematically describes the main beneficial instruments to be had on such a lot GNU/Linux distributions utilizing concise examples that you should simply regulate to fulfill your wishes.

Advanced Visual Basic 2010 (5th Edition)

Within the 5th variation, complex visible easy 2010 is helping those people who are acquainted with the basics of visible simple 2010 programming harness its energy for extra complex makes use of. insurance of refined instruments and strategies utilized in the this day comprise numerous database, ASP. internet, LINQ, WPF and net providers subject matters.

Bayesian Methods for Hackers: Probabilistic Programming and Bayesian Inference (Addison-Wesley Data & Analytics)

Grasp Bayesian Inference via functional Examples and Computation–Without complex Mathematical research   Bayesian tools of inference are deeply average and very robust. notwithstanding, so much discussions of Bayesian inference depend on intensely complicated mathematical analyses and synthetic examples, making it inaccessible to a person with no robust mathematical heritage.

Extra info for Automating System Administration with Perl: Tools to Make You More Efficient

Show sample text content

Getpwuid($p->uid). "\n"; print 'proceed? (yes/no) '; chomp($ans = <>); subsequent until ($ans eq 'yes'); There’s a little a race situation right here: it really is attainable that the method country will switch throughout the hold up brought about by means of prompting the person. on condition that we're merely prompting for big approaches, although, and enormous approaches are these least prone to switch kingdom in a brief period of time, we’re most likely tremendous coding this manner. when you desired to be pedantic, you'll most likely gather the record of techniques to be killed first, steered for enter, after which recheck the nation of the method desk ahead of truly killing the specified approaches. This doesn’t get rid of the race , however it does make it less prone to happen. 122 | bankruptcy 4: User task There are occasions while dying is simply too stable for a procedure. occasionally it is very important detect approach is operating whereas it's operating in order that a few real-life motion (like “user angle correction”) could be taken. for instance, at our website we have now a coverage opposed to using web Relay Chat (IRC) bots. Bots are daemon procedures that hook up with an IRC community of chat servers and practice automatic activities. even though bots can be utilized for optimistic reasons, nowadays they play a ordinarily delinquent position on IRC. We’ve additionally had safeguard breaches come to our consciousness as the first (and usually in simple terms) factor the intruder has performed is publish an IRC bot of a few variety. for this reason, noting their presence on our method with out killing them is necessary to us. the most typical bot through a long way is termed eggdrop. If we needed to appear for this procedure identify being run on our process, shall we use code like this: use Proc::ProcessTable; my $logfile = 'eggdrops'; open my $LOG, '>>', $logfile or die "Can't open logfile for append:$! \n"; my $t = new Proc::ProcessTable; foreach my $p ( @{ $t->table } ) { if ( $p->fname() =~ /eggdrop/i ) { print $LOG time . "\t" . getpwuid( $p->uid ) . "\t" . $p->fname() . "\n"; } } shut $LOG; If you’re pondering, “This code isn’t more than enough! All somebody has to do is rename the eggdrop executable to avoid its check,” you’re completely correct. We’ll take a stab at writing a few much less naïve bot-check code within the final component of this bankruptcy. meanwhile, let’s have a look at yet another instance the place Perl assists us in handling consumer methods. thus far all of our examples were relatively adverse, concentrating on facing resource-hungry and naughty procedures. Let’s examine whatever with a sunnier disposition. there are occasions whilst a method administrator must recognize which (legitimate) courses clients on a method are utilizing. occasionally this can be precious within the context of software program metering, the place there are criminal issues in regards to the variety of clients operating a application simultaneously. In these instances there's often a licensing mechanism in position to deal with the bean counting. one other scenario the place this information is useful is that of desktop migration. when you are migrating a consumer inhabitants from one structure to a different, you’ll need to make definite all of the courses used at the prior structure can be found at the new one.

Download PDF sample

Rated 4.97 of 5 – based on 7 votes