Slashdot Mirror


New Year's Resolutions For Linux Admins: Automate More, Learn New Languages (networkworld.com)

An anonymous reader writes: A long-time Unix sys-admin is suggesting 18 different New Year's resolutions for Linux systems adminstrators. And #1 is to automate more of your boring stuff. "There are several good reasons to turn tedious tasks into scripts. The first is to make them less annoying. The second is to make them less error-prone. And the last is to make them easier to turn over to new team members who haven't been around long enough to be bored. Add a small dose of meaningful comments to your scripts and you have a better chance of passing on some of your wisdom about how things should be done."

Along with that, they suggest learning a new scripting language. "It's easy to keep using the same tools you've been using for decades (I should know), but you might have more fun and more relevance in the long run if you teach yourself a new scripting language. If you've got bash and Perl down pat, consider adding Python or Ruby or some other new language to your mix of skills."

Other suggestions include trying a new distro -- many of which can now be run in "live mode" on a USB drive -- and investigating the security procedures of cloud services (described in the article as "trusting an outside organization with our data").

"And don't forget... There are now only 20 years until 2038 -- The Unix/Linux clockpocalypse."

55 of 139 comments (clear)

  1. I can do all this, I've got time now... by Anonymous Coward · · Score: 1

    that systemd has been purged from our infra. No more redhat derivatives.

    This years looking like it's going to be a lot fun.

    1. Re:I can do all this, I've got time now... by iggymanz · · Score: 1

      if you don't know what problems systemd creates, you're too ignorant to comment

      systemd is bloated and unreliable garbage

    2. Re:I can do all this, I've got time now... by tepples · · Score: 1

      No admin worth their salt repeatedly boots their systems for maintenance.

      Like Windows, linux-image in many distributions has its own monthly security update schedule. And unless you subscribe to Oracle Ksplice, these updates require a reboot.

      If you really understand [service dependencies], then handling them in startup scripts is trivial. If you can't handle them at that level, then you shouldn't have the root password.

      Then who should have the root password for a home desktop PC? Or how does it benefit the public to require non-technical users to use locked-down, touch-controlled appliances?

  2. Also take off the blinkers by Anonymous Coward · · Score: 1

    Above all learn that your job title should be sysadmin. Be aware that there are other kernels and indeed operating systems with merits.

    You wonâ(TM)t learn much of value if you stick to Linux.

    1. Re:Also take off the blinkers by PPH · · Score: 1

      BSD (various), HP-UX, AIX, Solaris, OS X, TPF, z/VM.

      No other useful OSs come to mind at the moment.

      --
      Have gnu, will travel.
  3. Or perhaps not. by gallondr00nk · · Score: 1, Insightful

    "And the last is to make them easier to turn over to new team members who haven't been around long enough to be bored."

    Or in other words, automate yourself out of your own job and get replaced by someone cheaper, using your scripts. Never make your job look easy.

    1. Re: Or perhaps not. by Anonymous Coward · · Score: 1

      You should absolutely automate most of your job. Use what lawyers and accountants call "efficiency" billing. The first time they fill out a form it might take an hour or four to figure it out. That price is how much it costs, even if it only takes two minutes to fill it out again via template and esig. For best results figure out how to automate it at home on your own time and dine. And invoke it from your own toolkit, even if just a text file you paste into a terminal window/into a shell based on your personal email proc lists.

      If your employer has more interesting things for you to do, do them too. If not, you should figure out what you want to do and find a way that can be useful to them in the time you automated. But if you have a typical short term thinking boss, your cutting your own throat if you automate it all. Ditch diggers don't build and give away ditchwitches.

    2. Re:Or perhaps not. by DamonHD · · Score: 5, Insightful

      I disagree; that's a bad way to look at things from your point of view and your employer's.

      I have always considered myself to be on a day's notice whenever contracting/consulting, and always work to make myself expendable.

      And guess what:
        1) The person paying you appreciates that you aren't trying to lock them in.
        2) There's usually better, more interesting and more valuable stuff to be done once you have the previous rounds of tedium scripted.
        3) False heroics, ie manually doing things that could easily be automated, makes for cockups and unhappiness. I've seen friends I otherwise respect and admire do this.

      For this I got to be one of the better paid IT guys in my field, and always had interesting stuff to tackle.

      Rgds

      Damon

      --
      http://m.earth.org.uk/
    3. Re:Or perhaps not. by Anonymous Coward · · Score: 2, Insightful

      I'm with Damon on this one. That effort being provincial and guarded is better spent learning. Let junior staff take over the work, there is always more interesting and challenging work to be had. This is better for both the employee's career and the employer's business. I've done that for 25 years and quite happy with what I'm doing now.

      Ironically, it's a moot point. Automating work doesn't make a job unnecessary. Automation usually fails. If it's too sophisticated to fail, it's too brittle and needs an expert to fix it when the system needs changing, and it makes the whole system rigid. If it's simple, it fails occasionally. So either way the expertise is still required to be on hand.

      What automation does is free up time.

    4. Re:Or perhaps not. by aqui · · Score: 3, Insightful

      Its time to stop treating systems like pets, rather treat them like cattle. This is what's needed to manage growth / and scale without more staff. A cornerstone of this is automation. Its just the next skill set for admins to build out. Automation is part of commoditization and standardization, the next steps in the evolution of a service or product.

      The assumption that automation requires less staff is only valid if nothing is changing. The reality is that IT use is growing rapidly, where I work the number of applications and servers we're managing has more than doubled in less than 5 years. Most of the servers are now virtual and the only reason we've

      If you're scared of automation, then your current job description is probably so simple that it will be automated, or you don't understand automation.

      At that point you have two choices:
      1) Wait until someone else automates things without you or outsources it to a company that has already built and automation library / skills and lose your job.
      or
      2) Become the local automation expert. Or if not local be ready for a job market that will be asking for admins with automation skills.

      The reality is autiomation will happen with or without you, the business case for it is there. For the windows admins: Powershell is here to stay and if you don't learn it someone else will. Beyond that automated deployment, or even self provisioning are quickly becoming the norm.

      I'm currently working on 2). When you start to look at automation you'll find that:
      (a) automation isn't trivial and requires lots of set up work and maintenance when done right...
      (b) when not done right it just scales up the screw ups... (aka wrong command as a domain admin with two broad a target)... Just ask the guy that formated all machines on campus ( https://it.slashdot.org/story/... )
      (b) over time it frees you from the mundane tasks to actually start tackling real IT issues in the organization, and get to the projects you never had time for before.
      (c) it scales, it improves your productivity, and it makes you harder to replace, not easier.

      Automation will happen with or without you. The cool thing is that there are tools out there that once you learn them enable your productivity as an admin to offer better quality service, and shift from reactive to proactive management off your environment.

      --
      ----- "Profanity is the one language that all programmers understand."
    5. Re:Or perhaps not. by 0100010001010011 · · Score: 2

      If you don't do it someone else will.

      And when the axe comes swinging that person will keep the job because they're the one that 'knows the system'.

      Additionally how do you continue to work on the same thing year after year without getting bored? Automate my workflow, volunteer to take on additional work. Take on additional work. Rinse and repeat.

    6. Re:Or perhaps not. by lucasnate1 · · Score: 1

      1) The person paying you appreciates that you aren't trying to lock them in.

      If the company is big enough, the person paying you doesn't see as human, but as another machine in the process.

    7. Re:Or perhaps not. by DamonHD · · Score: 1

      If that is the case then you should change manager or company, not dig deeper into the one you're in.

      Rgds

      Damon

      --
      http://m.earth.org.uk/
    8. Re:Or perhaps not. by iggymanz · · Score: 1

      you vastly overestimate most employers, IT are slaves and treated as such

    9. Re:Or perhaps not. by lucasnate1 · · Score: 1

      To me it is possible, and indeed I only work at startups. To people above 50, it can be more difficult.

    10. Re: Or perhaps not. by yes-but-no · · Score: 1

      It's more likely your (greedy) boss won't appreciate your scripts. So you automate but don't show your boss. The time you save, you put on your own growth (personal skills that are portable, that comes with you when your employer hands the pink slip). eg study finance, investment, hobbies; If your boss is tracking you, do it in the mind. Think/meditate. At the end, only you help yourself.

    11. Re:Or perhaps not. by sad_ · · Score: 1

      I'm sure there is tons and tons of other stuff waiting to be solved/improved/implemented that you finally get some time to do because all the other things are automated.

      --
      On a long enough timeline, the survival rate for everyone drops to zero.
  4. Re:Useless advice by Hognoxious · · Score: 2

    Does shytstaind contain its own scripting language yet?

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  5. Re:Best News Year Resolutions 4 Linux Admins: by enrique556 · · Score: 1

    Whoah! Got to step 10 and stopped dead. Admittedly, windows 10 runs visual studio and *games*, but what slashdotter doesn't automatically disqualify operating systems that force ads in the start menu?

    PS: Rogue One is by far the best star wars movie of all.

  6. clockpocalypse by JohnVanVliet · · Score: 1

    if we ( linux users ) are using 32 bit OS's in 20 years WE DESERVE it
    the only 32 bit os i have is on a very old box from 2001 - that is on itt's last legs

    --
    "I don't pitch OpenSUSE Linux to my friends, i let Microsoft do it for me
    1. Re:clockpocalypse by iggymanz · · Score: 1

      har har har, for my employer I have to run some windows programs, and the standard image is 32 bit windows 7 that I run in a VM

      you can bet 32 bit OS are alive and well at your banks, insurance companies, etc.

    2. Re:clockpocalypse by iggymanz · · Score: 1

      the 360 could access 64 bit double words. And with an add-on for scientific calcs could do 128 bit floats

    3. Re:clockpocalypse by ebvwfbw · · Score: 1

      They fixed it many years ago. I have a feeling he doesn't know what he's talking about. I know, hard to believe on /.

  7. Re: Useless advice by iamgnat · · Score: 1

    Here's a new year's resolution for you: Strap yourself to a rocket and launch it to demonstrate that the Earth is flat.

    The GP isn't wrong though. As part of pushing "DevOps" my company is pushing the Admins to become "real" programmers and as such is trying to shove Python down their throats.

    While I'm a firm believer in fresh/relevant skills keeps the agism boogyman away, there is also a lot of risk in such a move. What I've seen:

    • They can't produce the scripts as fast which leads to delays.
    • The scripts are more error prone due to the lack of experience.
    • Simple BASH scripts can typically take twice the Python code (again, delays)
    • BASH and KSH are "loved" because they are everywhere and predictable . While Python is everywhere, it's a damn box of chocolates! What version is installed? Which modules have been installed? Multiple versions of Python that conflict with one another is always fun. etc..
    • One Admin that thinks it's great to write all their scripts in Python/Ruby/whatever when the rest of their team has no experience in that language provides "fun" in emergency situations and prevents proper code reviews.

    I'm sure there are more if I put my mind to it too.

    Yes you should always learn new skills and keep up with technology, but you should never do just to do.

    A good [insert role here] knows that while they need to keep their tool box up to date they also need to use the right tool for the right job. Any one-size-fits-all approach is always doomed to problems that should never be.

  8. Re:Best News Year Resolutions 4 Linux Admins: by HermMunster · · Score: 1

    Windows 10 is not better than Linux.

    --
    You can lead a man with reason but you can't make him think.
  9. Re:Net Neutrality is really about video streaming by HermMunster · · Score: 1

    It is about making all bits equal regardless of the source without any policy or practice being allowed that would allow that to be interfered with by anyone for any purpose.

    --
    You can lead a man with reason but you can't make him think.
  10. Re:Why new languages? by 0100010001010011 · · Score: 2

    Learn something. Way too many of my peers thought that once college was done they were done learning. College got them the job and there was no reason to continue learning.

    Learn something completely unrelated to your job and bridge the gap.

    Right now I'm a mechanical engineer that is trying to play the job of IT DevOps. Because our IT department doesn't understand or want to understand the specific needs of what my group does. "Throw RAM and CPU" at it hasn't worked as our entire toolchain is single threaded and my 8600k beats the pants off of the 16 core dual socket Xeons they give us.

  11. Re:Useless advice by chispito · · Score: 1

    Learning another scripting language in order to do the exact same stuff.....

    You're confusing the means and the end here. You don't learn a new scripting language to duplicate work, you duplicate work to learn a new scripting language.

    --
    The Daddy casts sleep on the Baby. The Baby resists!
  12. OK by PPH · · Score: 1

    I piped incoming user help messages to the emacs psychiatrist.

    - BOFH.

    --
    Have gnu, will travel.
    1. Re:OK by iggymanz · · Score: 1

      the (l)users at my company find Eliza more engaging

  13. Re:Things that are not well. by arth1 · · Score: 1

    Why is too complicated to fit a Linux's LiveDVD to 4.7GB DVD instead of 2 GB?

    Why is there not a Linux's LiveBD in a 50GB BD?

    You live in the past. Newer systems don't come with shiny media readers, much like they haven't had tape stations for a while either.
    Booting off a USB stick (or good old bootp for those who know how) is what's done these days. Then media size isn't much of a concern.

  14. Re:Useless advice by arth1 · · Score: 3, Insightful

    Why would you need to do exact same stuff ... with a new tool?

    You don't. But it's useful to learn new scripting languages because some devop or other will surely use it, very badly, in an installer or maintenance script, which you will have to fix to get it working.

    So that resolution isn't all bad. #16, on the other hand, truly is.
    "It's hard to break old habits, but get used to the newer commands. Maybe it's time to use ip instead of ifconfig and ss instead of netstat. Look into the newer commands and try to roll them into your daily work."
    No, no and no. Compatibility is key. You will still maintain 20 year old systems that cannot be upgraded, and needs more than your department's resources to replace. So you will be stuck using the old commands anyhow. Then what is better, to be able to use the same script snippets everywhere, and know what they do, or to use different commands, some of which change APIs more often than you change your underwear?
    Learn the new commands, but don't use them. Much as you avoid bashisms when there's not a particular reason to use them, you also avoid new commands when there's not a particular reason to use them.

    If you only have a homogenous set of servers, sure, do whatever you like, but then you're not much of a sysadmin either.

  15. "new" languages? pfffft... by iggymanz · · Score: 1

    Python is from 1989, Ruby 1995.

    if someone wants to learn a new language there are others like Rust, Go....though those might just be fads

  16. Re:Best News Year Resolutions 4 Linux Admins: by iggymanz · · Score: 1

    hmmm, what does windows 10 do out of the box without spending additional money? can I harden a windows 10 system such that it could be directly connected to the internet without issue? unless explicitly configured, will it not send private information to 3rd party? Do I have a choice of scripting languages and can I access all system calls (subject to permissions of course) with them?

  17. Re:"new" languages? pfffft... by iggymanz · · Score: 1

    the point is sysadmins been using those for years

    now call upstairs and have your mother order you some pizza so you can calm down

  18. Re:Useless advice by Lost+Race · · Score: 1

    By that time they'll have moved on from system-d; they'll probably be up to about system-v or so.

  19. Re: Useless advice by donaldm · · Score: 1

    Here's a new year's resolution for you: Strap yourself to a rocket and launch it to demonstrate that the Earth is flat.

    Not really since "flat earthers" would not believe no matter what they were shown. However, it would be an excellent example of how the so-called "flat earther" could win a coveted Darwin Award .

    --
    There ain't no such thing as proprietary standards only proprietary formats. Standards are by definition open.
  20. Re:I know APK's New Year's resolutions by arth1 · · Score: 1

    Offtopic, as no one would ever mistake apk for a Linux Admin.

  21. Re: Useless advice by iamgnat · · Score: 2

    You can potentially code solutions in fewer lines of Python compared to bash too

    For complex things, certainly and at that point you should be using something more practical than BASH anyway.

    If, however, I want to simply execute a shell command (that does not have a Python/Perl/whatever builtin analog), capture it's output to a variable, and check the exit status, BASH is pretty damn simple. Those last two requirements are the biggest killer of Python as that forces you to use subprocess which makes it much more complex than BASH (especially if you want to capture stdout and stderr).

    It's not that things like that are hard or not well documented, but they are more complex to write and don't read as simply. Not only does simplicity serve when writing the code, it also serves when it has to be debugged at 4am due to a Production issue.

    I've done my time as an Admin and much prefer writing real code (of which I happen to specialize in automation), but I recognize that the language I may choose to solve a problem might not really be the best option when all facets of it's deployment and support are taken into account.

    Now what most admins leave out of their code which would do wonders regardless of the language is error checking. I've lost track of the number of messes I've had to cleanup that simply came down to scripts that blindly carry on assuming the world is perfect without bother to check... "if [ $? -ne 0 ] ; then" really isn't THAT complicated...

  22. Re:"new" languages? pfffft... by 93+Escort+Wagon · · Score: 1

    Python is from 1989, Ruby 1995.

    All right then, I'm gonna learn COBOL!

    --
    #DeleteChrome
  23. Re: Useless advice by TechyImmigrant · · Score: 1

    >If, however, I want to simply execute a shell command (that does not have a Python/Perl/whatever builtin analog), capture it's output to a variable, and check the exit status, BASH is pretty damn simple. Those last two requirements are the biggest killer of Python as that forces you to use subprocess which makes it much more complex than BASH (especially if you want to capture stdout and stderr).

    I have a healthy dislike for subprocess in python, although my primary language has been python in the past few years because I find it productive for the work I do. Instead of subprocess, where interaction with bash is needed, I tend to write python to generate bash commands that write their results to a file which is then read by a python program. This leaves a record of the commands executed and the results, which turns out to be a heck of a lot simpler than wrestling with subprocess.

    --
    I should use this sig to advertise my book ISBN-13 : 978-1501515132.
  24. How about... by zifn4b · · Score: 1

    ...just learn how to do your job adequately? The Linux Administrator team at my work are largely a bunch of bullshit artists hacking through the forest.

    --
    We'll make great pets
  25. Re:"new" languages? pfffft... by zifn4b · · Score: 1

    Python is from 1989, Ruby 1995.

    if someone wants to learn a new language there are others like Rust, Go....though those might just be fads

    bash scripting + curl only gets you so far with REST...

    --
    We'll make great pets
  26. what is this? by sad_ · · Score: 1

    Just a list of what it means to be a sys admin.
    If you don't already do these things, you suck at your job.

    --
    On a long enough timeline, the survival rate for everyone drops to zero.
  27. Re:Useless advice by pnutjam · · Score: 1

    ifconfig has been depreceated, net-tools last release was 2001. I think it's time to update your skills.
    Yeah, we all deal with old systems, but those should be the exception, not drive the rule.

  28. Re: Useless advice by Walter+White · · Score: 1

    Sometimes I surprise myself with what can be accomplished with a simple shell script. I was working on a program to copy pictures from an SD card (from a camera) to directories organized as ".../Pictures/yyyy/mm/dd/." The initial effort was in C# and .net. At the time I could not find a .net library that could extract EXIF tags from the image files. I ran into further troubles trying to port it to Linux. It eventually occurred to me that I could code it as a shell script using various commands to do things like extract and parse EXIF tags, create directories and copy files. The result is a 31 line script that copies all images from the current directory (that have not already been copied) to subdirectories under $HOME/Pictures by EXIF date or, barring that, file creation time.

    I'm still using /bin/sh for scripts. I suppose it's time to move on to /bin/bash. ;)

  29. Re: Useless advice by iamgnat · · Score: 1

    I developed a set of BASH scripts to automate building a GNU/Linux distribution from scratch based on Linux From Scratch releases. After creating the package build definition files you can launch the build process by running a single master script. https://github.com/gdhorne/abs...

    I know a guy that wrote a Puppet/Chef alternative in KSH. Complex stuff certainly can be done, but it is almost always more convoluted than using a better language for such tasks.

  30. Re:Useless advice by arth1 · · Score: 2

    ifconfig has been depreceated

    Many of us have to support operating systems that are still sold and supported, like Red Hat Enterprise Linux 6, where net-tools is still actively used and relied on by the system itself, or Red Hat Entprise Linux 7, where it is still provided and patched as needed.
    If you have a choice to do otherwise, good for you, but in the mean time let us admins try to follow the Unix philosophies like multiple small tools that each do one thing well, have stable APIs, and provide the least amount of surprise.

  31. Re: Best News Year Resolutions 4 Linux Admins: by deek · · Score: 1

    So can Linux.

    Granted, not as many, but it's amazing how many native Linux games there are now. I think we can thank Steam for that.

  32. Re:Why new languages? by ebvwfbw · · Score: 1

    Take flight lessons. Own your own plane. They're only around $40K for a good entry level bird. I did that in 2005 and I still love it.

    Maintenance can be a bummer. One year I spent around 12K. Most years it's more like 2K and that's for a 1950s era Beech aircraft V-Tail. I plan on 140 Kts and I get it most of the time. On a good day it'll do 150 Kts or 170 MPH.

    A pilots license. Your license to learn.

  33. Re: Useless advice by Anonymous Coward · · Score: 1

    Sufficient knowledge of ksh should make it pretty much the same as any other language. The only real difference is the lack of libraries to do all the work for you.

  34. Games don't interoperate by tepples · · Score: 1

    Granted, not as many

    There's the rub. If the particular titles that your friends desire to play with you are unsupported, then Linux has no important games. Unlike non-game applications, most* games don't implement a common protocol to interoperate with other games by other publishers.

    * The exception is computer ports of pre-1923 tabletop games, such as GNU XBoard that interoperates with other Chess software that speaks CECP 2.

  35. Exceeding 2 GB requires SDHC booting by tepples · · Score: 1

    Why is too complicated to fit a Linux's LiveDVD to 4.7GB DVD instead of 2 GB?

    Because the wire protocol used by Secure Digital (SD) flash memory cards changed between 2 GB cards and Secure Digital High Capacity (SDHC) cards, which are 4 GB or larger. I imagine that the implementation of BIOS or UEFI on some PCs can boot from a 2 GB card but not from an SDHC card.

  36. Re:"new" languages? pfffft... by mnemotronic · · Score: 1

    Python is from 1989, Ruby 1995.

    if someone wants to learn a new language there are others like Rust, Go....though those might just be fads

    I'm trying both those. While Golang is pretty easy, Rust is hurting my brain. The first few demo programs in Programming Rust leave (for me) a lot of questions. Those demos also have a high "punctuation character to alphabetical character" ratio. Or perhaps it's a low "alpha to punctuation" ratio. Admittedly that isn't a standard measurement and I'd never noticed it before, but man, there's a butt-load of colons in there.

    --
    The Russians have won. They have made the world a cesspool of distrust, greed, fear and hate.
  37. Sysadmin automation is not reliable by loufoque · · Score: 1

    Let actual developers do it