Take a look at David Blank-Edelman's Perl for System Adminstration for a good set of Admin tools. Dave covers both Unix and Windows in the book, and it's worth reading the sections that cover the 'other' operating system (which ever OS you aren't using) to get a perspective on a different way to approach the fundamental challenges of the SA's job. There are a lot of 'out of the box' solutions in the book and it provides enough basic information to act as a spring board into the deeper end of the SysAdmin pool.
Highly Recomended, Bear-Bob says: "Check It Out"
----
I Go Back to Sleep, Now.
OGB
| [reply] |
| [reply] |
I would add:
- a script to add or modify a unix user account, including creation of home directory and site-specific initialisation of that directory.
- a script to do full or incremental backup/restore
- a script (or more likely a collection daemon and a reporting script) to monitor user behaviour including disk usage.
| [reply] |
This is another great craft from ++Gabor after CPAN::Forum. It's just simple and right to the point without gory details. And I'm sure that the examples will grow and grow. Perhaps you could add about service monitoring or quota alert?
I have my simple one myself you might want to consider. It's just another mass file operation type, similiar to the traverse file system stuff. But rather, mine's task is performing file permission changing (chmod), specifically, adding or repairing them to put 'w' bit for group. I'm not quite sure actually if this can be seen as sysadmin job. I usually run it for sharing purpose, for other users within the same group. However, the modes are customizable via command line options. Here it goes (I use -s for simpel CLO parsing).
#!/usr/bin/perl -ws
use strict;
use vars qw($f $d);
use File::Find;
my $start_dir = shift || '.';
my $dir_mode = $d ? oct($d) : 0775;
my $file_mode = $f ? oct($f) : 0664;
find \&wanted, $start_dir;
sub wanted {
my $mode = -d() ? $dir_mode : $file_mode;
chmod $mode, $_ or die "Can't chmod $_: $!\n";
}
__END__
Oh, a little note about this,
Writing an Excel file. (example coming soon). Many times we are required to create reports in text format. That's easy with Perl, that's what the Reporting part of the name Perl came from.
While it's a nice say, nevertheless, the name Perl was and is never meant as an acronym. The "Practical Extraction and Reporting Language" came later. | [reply] [d/l] |
| [reply] |
| [reply] |
Coming at this from a web perspective, here's some admin tools I've written in Perl which I use frequently from the command-line. Feel free to use, borrow, modify (or criticise :-)
WebConf: grep stuff out of the apache, samba, passwd and group files and the like...
http://webdev.co.nz/Perl/WebConf
MetaGeta: read STDIN for a list of HTML filenames, each of which is parsed looking for meta-data and URLs...
http://webdev.co.nz/Perl/MetaGeta
| [reply] |