LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Common Administration Task (https://www.linuxquestions.org/questions/linux-server-73/common-administration-task-775632/)

worm5252 12-14-2009 03:57 PM

Common Administration Task
 
I need to brush up on my scripting skills. What are some common day to day task that need to be done in a NOC enviornment for a Linux Node?

One of the day to day task I used to do was all of our Network Routers Config files were backed up to a CentOS machine. I had a script that would allow our network engineers to select a date and it would email them the config files that were backed up on that date. I also had a script that would copy files to a remote windows server to be backed up to tape. Another script I had was to clean up the archive of the router back ups that were made nightly.

Any similar task like that you do that I could tinker with to work on my scripting skills?

rweaver 12-14-2009 04:14 PM

There's a ton of common tasks that people do on a regular basis.

Make backups, rotate backups, take a daily dump of the databases for all databases on a system automatically, perform a md5sum check on a file on a remote machine vs the locally backed up copy, add all users on a remote machine that don't exist there that exist on central server, clean up /tmp directory, verify that the logrotate graceful restarts of apache have been actually occuring and that apache isn't effectively doubling memory usage nightly (nice spiral of death from hung G/W connections), etc.

There's an invite number of probabilities of varying complexity, you have to have some tasks you still do manually on your servers, find a way to automate them :)

Posting a couple 'easy to use' remote backup scripts using rsync that do verification would probably be of notable benefit to much of the community, backups seem to be something most people skip (at least until the first time they lose important data.)

choogendyk 12-14-2009 08:35 PM

Write a cron script to check for partitions that are filling up and email sysadmins with details if any are found, write a script to automatically check the integrity of raid arrays and alert sysadmins by email if any are in degraded mode, write a script to tail a log file (only read what hasn't already been read) and look for something that needs action (e.g. attempt at ssh root login noted in authlog, echo IP address in the form "ALL: xxx.xxx.xxx.xxx" to the end ">>" of hosts.deny), use your imagination to think of anything you might do regularly enough to want to automate and then automate it.

The flip side is that many of these things have been done and done better than you could hope to do yourself. Check out public domain software and see how things have been done. They aren't necessarily all in C or C++. You can find projects that are in perl and pieces that are in shell. You can gain a lot of mileage by learning open source software, adopting it, and adapting details to your own needs. Good sysadmins learn to code, but they also learn not to code when it's already been done for them. If you have the time and passion, you could join in on an open source project and contribute pieces. You don't have to dive into the core code, you can add utilities or wrappers, or you can read through reported bugs, try to actually locate them in the code and submit a patch. Learning how to make a patch is a useful skill. Follow your nose and chase your interests.


All times are GMT -5. The time now is 09:42 AM.