New Year's Resolutions For Linux Admins: Automate More, Learn New Languages (networkworld.com) 139
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."
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."
Re: (Score:2)
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:
Re: (Score:3)
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'
Re: (Score:2)
>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 f
Re: (Score:2)
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
Re: (Score:2)
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... [github.com]
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.
Re: Useless advice (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.
Re: (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 [darwinawards.com].
Re: (Score:2)
Offtopic, as no one would ever mistake apk for a Linux Admin.
Re: (Score:3)
Does shytstaind contain its own scripting language yet?
Re: Useless advice (Score:1)
Re: (Score:2)
By that time they'll have moved on from system-d; they'll probably be up to about system-v or so.
Re: (Score:1)
What do you think 98% of our Western economic model is all about?
Re:Useless advice (Score:4, 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.
Re: (Score:2)
Yeah, we all deal with old systems, but those should be the exception, not drive the rule.
Re: (Score:3)
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.
Re: (Score:2)
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.
Re: (Score:2)
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.
Re: (Score:1)
Windows 10 can run games.
Re: (Score:2)
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.
Games don't interoperate (Score:2)
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 [gnu.org] that interoperates with other Chess software that speaks CECP 2 [gnu.org].
Re: (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.
Re: (Score:2)
Windows 10 is not better than Linux.
Re: (Score:2)
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?
I can do all this, I've got time now... (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.
Re: (Score:2)
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?
Re: (Score:2)
if you don't know what problems systemd creates, you're too ignorant to comment
systemd is bloated and unreliable garbage
Also take off the blinkers (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.
Re: (Score:2)
BSD (various), HP-UX, AIX, Solaris, OS X, TPF, z/VM.
No other useful OSs come to mind at the moment.
Re: (Score:2)
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.
Exceeding 2 GB requires SDHC booting (Score:2)
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.
Re: (Score:3)
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
Re: (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.
Or perhaps not. (Score:2, Insightful)
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.
Re: Or perhaps not. (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 pers
Re: (Score:2)
Re:Or perhaps not. (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
Re: (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 ex
Re: (Score:2)
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.
Re: (Score:2)
If that is the case then you should change manager or company, not dig deeper into the one you're in.
Rgds
Damon
Re: (Score:2)
To me it is possible, and indeed I only work at startups. To people above 50, it can be more difficult.
Re: (Score:2)
you vastly overestimate most employers, IT are slaves and treated as such
Re:Or perhaps not. (Score:4, 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/... [slashdot.org] )
(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.
Re: (Score:3)
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.
Re: (Score:2)
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.
clockpocalypse (Score:2)
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
Re: (Score:2)
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.
Re: (Score:2)
the 360 could access 64 bit double words. And with an add-on for scientific calcs could do 128 bit floats
Re: (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 /.
OK (Score:2)
I piped incoming user help messages to the emacs psychiatrist.
- BOFH.
Re: (Score:2)
the (l)users at my company find Eliza more engaging
"new" languages? pfffft... (Score:2)
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
Re: (Score:2)
Python is from 1989, Ruby 1995.
All right then, I'm gonna learn COBOL!
Re: (Score:2)
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...
Re: (Score:2)
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 [amazon.com] 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.
Re: (Score:2)
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
How about... (Score:2)
what is this? (Score:2)
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.
Sysadmin automation is not reliable (Score:2)
Let actual developers do it