Answer the question
In order to leave comments, you need to log in
Is python necessary for system administrators?
I read a book on Python system administration, I got a strong impression that Python is used not because it solves the problem efficiently, but because it is cool, cool, youthful.
Is there any real benefit to python in system administration?
Ps I know that a number of tools are written in python, but at the same time they could be written in other languages.
Answer the question
In order to leave comments, you need to log in
When did me and colleagues use python instead of bash?
When it was necessary to write a backup of configs on 8k network devices via snmp.
When it was necessary to sketch a simple web interface for a shift on duty for a primitive up / down and a description change on these devices.
When it was necessary to integrate a nagios monitor with an external third-party database.
When it was necessary to install
different softwares for 600 virtual machines, the list and versions of which were stored in an external xml file
. If bash is enough for you, be happy and use it. When necessary, you will come to python yourself.
On a pure bash, you are tormented by making a web interface to something, organizing interaction with external systems / programs other than pure linux (web, snmp, sql, email, ftp is not a one-time access), processing input data to the system in formats more complicated than csv (html, xml, json), process files in non-standard encodings, use non-text variables in scripts (arithmetic, fractions, lists, files). The pain will start even just when files with names with non-standard characters appear (?$!*\+alt-characters), and also in the left encoding (hello mount ftp/samba/sshfs/ntfs and even attachments to letters). And it will become even more painful when the size of their scripts exceeds at least 500 lines.
And already, as a bonus, python is available out of the box in deb / rhel distributions, many system utilities are already written in it. The plugin for apt/yum is easiest to do in python, you can even write start-up scripts for services without worrying.
Is there any real benefit to python in system administration?In my opinion, yes, there is quite a lot. Python is a rather concise language, which means that writing in it is both "stylish / fashionable / youthful" and tritely convenient, it is convenient to do many different little things - for example, it is convenient to work with strings. Well, it also comes bundled with most Linux distributions and their hedgehogs... which makes it even "more convenient" to use (because everything you need is already installed).
I know that a number of tools are written in python, but at the same time they could be written in other languages.I'll tell you more, they would be significantly more productive, and perhaps even better in a number of other parameters, if they were written in C. And this applies not only to some "tools" that you are talking about, this applies to about 99% of programs / "tools" / etc. Almost anything can be written "in other languages".
Python is used not because it is fashionable, but because it is convenient. And if it suits you then use it. If not, then use whichever is more convenient for you.
IMHO python allows you to relatively uniformly write some (file manipulations mainly) admin tasks on different operating systems. At the same time, on each OS, the OS configuration operations themselves are very specific, and each has quite advanced tools for administration...
In any case, it is useful for an administrator to know programming. The main emphasis, IMHO, still needs to be done on the command language of the bash / cmd / posh shell. The vast majority of problems can be solved with their help. But if you know besides this and something else, it will only be a plus for you.
Yes and no.
More sense from a good knowledge of the bash, the rest has already gone towards the devops.
I have Ruby and Golang in use.
Ruby for the chief and all sorts of tricks that are hard to bash, golang for quickly writing all sorts of services.
Not! Everything can be done with egrep awk sed and bash. Another is not needed.
All envy from tasks. Not the task is adjusted to the tool, but the tool is taken to the task. I try to get by with bash, but if not, then perl
Jedem das seine (C)
Knowledge of a programming language - and preferably several - is always a plus. It helps both in writing your own scripts and in debugging / reusing others. And, of course, the quality and prevalence of such languages influence. But it's still optional, unlike knowledge of bash. Although, of course, not knowing any language at all is more like an extreme than the norm.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question