mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-12 01:40:10 +08:00
commit
dfeb092372
@ -1,20 +1,20 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (LazyWolfLin)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-11853-1.html)
|
||||
[#]: subject: (4 Key Changes to Look Out for in Linux Kernel 5.6)
|
||||
[#]: via: (https://itsfoss.com/linux-kernel-5-6/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
四大亮点带你看 Linux Kernel 5.6
|
||||
四大亮点带你看 Linux 内核 5.6
|
||||
======
|
||||
|
||||
当我们体验 Linux 5.5 稳定发行版带来更好的硬件支持时,Linux 5.6 已经来了。
|
||||
当我们还在体验 Linux 5.5 稳定发行版带来更好的硬件支持时,Linux 5.6 已经来了。
|
||||
|
||||
说实话,Linux 5.6 比 5.5 更令人兴奋。即使即将发布的 Ubuntu 20.04 LTS 发行版将开箱集成 Linux 5.5,你也需要真正了解 Linux 5.6 kernel 为我们提供了什么。
|
||||
说实话,Linux 5.6 比 5.5 更令人兴奋。即使即将发布的 Ubuntu 20.04 LTS 发行版将自带 Linux 5.5,你也需要切实了解一下 Linux 5.6 内核为我们提供了什么。
|
||||
|
||||
我将在本文中重点介绍 Linux 5.6 发行版中值得期待的关键更改和功能:
|
||||
我将在本文中重点介绍 Linux 5.6 发布版中值得期待的关键更改和功能:
|
||||
|
||||
### Linux 5.6 功能亮点
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
当 Linux 5.6 有新消息时,我会努力更新这份功能列表。但现在让我们先看一下当前已知的内容:
|
||||
|
||||
#### 1\. 支持 WireGuard
|
||||
#### 1、支持 WireGuard
|
||||
|
||||
WireGuard 将被添加到 Linux 5.6,出于各种原因的考虑它可能将取代 [OpenVPN][2]。
|
||||
|
||||
@ -30,44 +30,44 @@ WireGuard 将被添加到 Linux 5.6,出于各种原因的考虑它可能将取
|
||||
|
||||
同样,[Ubuntu 20.04 LTS 将支持 WireGuard][4]。
|
||||
|
||||
#### 2\. 支持 USB4
|
||||
#### 2、支持 USB4
|
||||
|
||||
Linux 5.6 也将支持 **USB4**。
|
||||
|
||||
如果你不了解 USB 4.0 (USB4),你可以阅读这份[文档][5].
|
||||
如果你不了解 USB 4.0 (USB4),你可以阅读这份[文档][5]。
|
||||
|
||||
根据文档,“_USB4 将使 USB 的最大带宽增大一倍并支持同时多数据和显示接口并行。_”
|
||||
根据文档,“USB4 将使 USB 的最大带宽增大一倍并支持<ruby>多并发数据和显示协议<rt>multiple simultaneous data and display protocols</rt></ruby>。”
|
||||
|
||||
另外,虽然我们都知道 USB4 基于 Thunderbolt 接口协议,但它将向后兼容 USB 2.0、USB 3.0 以及 Thunderbolt 3,这将是一个好消息。
|
||||
|
||||
#### 3\. 使用 LZO/LZ4 压缩 F2FS 数据
|
||||
#### 3、使用 LZO/LZ4 压缩 F2FS 数据
|
||||
|
||||
Linux 5.6 也将支持使用LZO/LZ4 算法压缩 F2FS 数据。
|
||||
Linux 5.6 也将支持使用 LZO/LZ4 算法压缩 F2FS 数据。
|
||||
|
||||
换句话说,这只是 Linux 文件系统的一种新压缩技术,你可以选择待定的文件扩展名。
|
||||
换句话说,这只是 Linux 文件系统的一种新压缩技术,你可以选择待定的文件扩展技术。
|
||||
|
||||
#### 4\. 解决 32 位系统的 2038 年问题
|
||||
#### 4、解决 32 位系统的 2038 年问题
|
||||
|
||||
Unix 和 Linux 将时间值以 32 位有符号整数格式存储,其最大值为 2147483647。时间值如果超过这个数值则将由于整数溢出而存储为负数。
|
||||
|
||||
这意味着对于32位系统,时间值不能超过 1970 年 1 月 1 日后的 2147483647 秒。也就是说,在 UTC 时间 2038 年 1 月 19 日 03:14:07 时,由于整数溢出,时间将显示为 1901 年 12 月 13 日而不是 2038 年 1 月 19 日。
|
||||
这意味着对于 32 位系统,时间值不能超过 1970 年 1 月 1 日后的 2147483647 秒。也就是说,在 UTC 时间 2038 年 1 月 19 日 03:14:07 时,由于整数溢出,时间将显示为 1901 年 12 月 13 日而不是 2038 年 1 月 19 日。
|
||||
|
||||
Linux kernel 5.6 解决了这个问题,因此 32 位系统可以运行到 2038 年以后。
|
||||
Linux kernel 5.6 解决了这个问题,因此 32 位系统也可以运行到 2038 年以后。
|
||||
|
||||
#### 5\. 改进硬件支持
|
||||
#### 5、改进硬件支持
|
||||
|
||||
很显然,在下一次发布版中,硬件支持也将继续提升。而支持新式无线外设的计划也同样紧迫。
|
||||
很显然,在下一个发布版中,硬件支持也将继续提升。而支持新式无线外设的计划也同样是优先的。
|
||||
|
||||
新内核中将增加对 MX Master 3 鼠标以及罗技其他无线产品的支持。
|
||||
|
||||
除了罗技的产品外,你还可以期待获得许多不同硬件的支持(包括对 AMD GPUs、NVIDIA GPUs 和 Intel Tiger Lake 芯片组的支持)。
|
||||
除了罗技的产品外,你还可以期待获得许多不同硬件的支持(包括对 AMD GPU、NVIDIA GPU 和 Intel Tiger Lake 芯片组的支持)。
|
||||
|
||||
#### 6\. 其他更新
|
||||
#### 6、其他更新
|
||||
|
||||
此外,Linux 5.6 中除了上述主要的新增功能或支持外,下一个内核版本也将进行其他一些改进:
|
||||
|
||||
* 改进 AMD Zen 的温度/功率报告
|
||||
* 修复华硕飞行堡垒系列笔记本中 AMD CPUs 过热
|
||||
* 修复华硕飞行堡垒系列笔记本中 AMD CPU 过热
|
||||
* 开源支持 NVIDIA RTX 2000 图灵系列显卡
|
||||
* 内建 FSCRYPT 加密
|
||||
|
||||
@ -82,7 +82,7 @@ via: https://itsfoss.com/linux-kernel-5-6/
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[LazyWolfLin](https://github.com/LazyWolfLin)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -0,0 +1,92 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Stuck in a loop: 4 signs anxiety may be affecting your work)
|
||||
[#]: via: (https://opensource.com/open-organization/20/2/working-anxiety-inaction-loop)
|
||||
[#]: author: (Sam Knuth https://opensource.com/users/samfw)
|
||||
|
||||
Stuck in a loop: 4 signs anxiety may be affecting your work
|
||||
======
|
||||
Gathering feedback is an everyday practice in open organizations. Are
|
||||
you collecting data to improve your products—or to alleviate your own
|
||||
apprehensions?
|
||||
![arrows cycle symbol for failing faster][1]
|
||||
|
||||
_Editor's note: This article is part of a series on working with mental health conditions. It details the author's personal experiences and is not meant to convey professional medical advice or guidance._
|
||||
|
||||
A few months ago, I was chatting with one of our VPs about my new role and some of the work I was hoping to do with my team. I'd decided that one of my first actions in the new position would be to interview members of the senior leadership team to get their input on strategy. I'd be leading an entirely new function for my department, and I felt it would be good to get input from a wide array of stakeholders before jumping to action. This is part of my standard practice working in an open organization.
|
||||
|
||||
I had several goals for these one-on-one conversations. I wanted to be transparent in my work. I wanted to validate some of my hypotheses. I wanted to confirm that what I wanted to do would be valuable to other leaders. And I wanted to get some assurance that I was on the right track.
|
||||
|
||||
Or so I thought.
|
||||
|
||||
"Hmmm," said the VP after I had shared my initial ideas. He hesitated. "It's very broad." More hesitation. I'm not sure what I had expected him to say, but this was definitely not the kind of assurance I was hoping for. "You need to be careful about tilting at windmills." I didn't know what "[tilting at windmills][2]" meant, but it sounded like a good thing to avoid doing.
|
||||
|
||||
After having several more of these conversations over the course of a few weeks—many of them lively and fruitful—I came to one clear conclusion: Although I was getting lots of great input, I wasn't going to find any kind of consensus about priorities among the leadership team.
|
||||
|
||||
So why was I asking?
|
||||
|
||||
Eventually I realized what was _really_ underlying my desire to seek input: not just a desire to learn from the people I was interviewing, but also a nagging question in my gut. "Am I doing the right thing?"
|
||||
|
||||
One manifestation of anxiety is a worry that we're doing something wrong, which is also related to [imposter syndrome][3] (worry that we're going to be "found out" as unqualified for or incapable of the work or the role we've been given).
|
||||
|
||||
I've [previously described][4] a positive "anxiety performance loop" that can drive high performance. I can occasionally fall into another kind of anxiety loop, an "inaction loop," which can _lower_ performance. Figure 1 (below) illustrates it.
|
||||
|
||||
![][5]
|
||||
|
||||
One challenge of this manifestation of anxiety is that it creeps up on me; I don't consciously realize that I'm stuck in it until something happens that makes it apparent.
|
||||
|
||||
In this case, that "something" was my coach.
|
||||
|
||||
My desire to get input from a large variety of stakeholders was resulting in so much input that it was preventing me from moving forward.
|
||||
|
||||
During a session when my coach was asking me questions about my work, I came to the realization that I was overly worried about whether I was on the right track. My desire to get input from a large variety of stakeholders (a legitimate thing to do) was resulting in so much input that it was preventing me from moving forward.
|
||||
|
||||
If I hadn't been fortunate enough to be working with a coach, I may never have had that realization—or I may have had it through a much harder experience. At some point, anxiety about whether you are doing the right thing could lead to failure, not because you did the wrong thing but because you didn't do anything at all.
|
||||
|
||||
I've found a few signs to help me realize if I'm in an anxiety inaction loop. I may be in one of these loops if:
|
||||
|
||||
* I talk about what I'm _planning_ to do rather than what I _am_ doing
|
||||
* I feel that I need just _one more person's_ opinion, or I just need to check in with my boss _one more time_, before moving ahead
|
||||
* I am revising the same presentation repeatedly but never actually giving the presentation to anyone
|
||||
* I am avoiding or delaying something (such as giving a talk, or making a decision)
|
||||
|
||||
|
||||
|
||||
Having tools for self-reflection is critical. The reality is that most of the time I'm not working with a coach, and I need to be able to recognize these symptoms on my own. That will only happen if I set aside time to reflect on how things are going and to ask myself hard questions about whether I am stuck in any of these stalling patterns. I've started to build this time into my calendar, usually on Friday afternoons, or early in the morning before my meetings start.
|
||||
|
||||
The fact that my anxiety can manifest both as dual worries—that I am not doing the right thing and that I am not doing enough—can be paradoxical.
|
||||
|
||||
Recognizing the anxiety loop is the first step. To get out of it, I've developed a few techniques like:
|
||||
|
||||
* Setting achievement milestones in 90 day increments, reviewing them on a weekly basis, and using this as an opportunity to reflect on progress.
|
||||
* Reminding myself that (in fact) I might _not_ be doing the right thing. If that's the case, I'll get feedback, correct, and keep going (it won't be the end of the world).
|
||||
* Reminding myself that I am in this job for a reason; people want me to do the job. They don't want me to ask them what to do or wait for them to tell me what to do.
|
||||
* When seeking input from others, saying "This is what I am planning on doing" rather than "What do you think of this?" then either hearing objections if they arise or moving ahead if not.
|
||||
|
||||
|
||||
|
||||
The fact that my anxiety can manifest both as dual worries—that I am not doing the right thing _and_ that I am not doing enough—can be paradoxical. Over-correcting to get out of an anxiety inaction loop could put me right into [an anxiety performance loop][4]. Neither situation feels like a healthy one.
|
||||
|
||||
As with most things, the answer is balance and moderation. Finding that balance is precisely the challenge anxiety creates. In some cases I may be worried I'm not doing enough; in others I may be worried that what I'm doing isn't right, which leads me to slow down. The best approach I have found so far is awareness—taking the time to reflect and trying to correct if I'm going too far in either direction.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/open-organization/20/2/working-anxiety-inaction-loop
|
||||
|
||||
作者:[Sam Knuth][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/samfw
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/fail_progress_cycle_momentum_arrow.png?itok=q-ZFa_Eh (arrows cycle symbol for failing faster)
|
||||
[2]: https://en.wikipedia.org/wiki/Don_Quixote#Tilting_at_windmills
|
||||
[3]: https://en.m.wikipedia.org/wiki/Impostor_syndrome
|
||||
[4]: https://opensource.com/open-organization/20/1/leading-openly-anxiety
|
||||
[5]: https://opensource.com/sites/default/files/images/open-org/loop_2.png
|
@ -1,105 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (heguangzhi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (What I learned going from prison to Python)
|
||||
[#]: via: (https://opensource.com/article/20/1/prison-to-python)
|
||||
[#]: author: (Shadeed "Sha" Wallace-Stepter https://opensource.com/users/shastepter)
|
||||
|
||||
What I learned going from prison to Python
|
||||
======
|
||||
How open source programming can offer opportunities after incarceration.
|
||||
![Programming books on a shelf][1]
|
||||
|
||||
Less than a year ago, I was in San Quentin State Prison serving a life sentence.
|
||||
|
||||
In my junior year in high school, I shot a man while robbing him. Now, it took a while for me to see or even admit that what I did was wrong, but after going through a jury trial and seeing the devastating consequences of my actions, I knew that I needed to make a change, and I did. And although it was a great thing that I had changed, I had still shot a man and nearly killed him. And there are consequences to doing something like that, and rightfully so. So at the age of 18, I was sentenced to life in prison.
|
||||
|
||||
Now prison is a terrible place; I do not recommend it. But I had to go and so I went. I’ll spare you the details, but you can rest assured it’s a place where there isn’t much incentive to change, and many people pick up more bad habits than they went in with.
|
||||
|
||||
I’m one of the lucky ones. While I was in prison, something different happened. I started to imagine a future for myself beyond the prison bars where, up until that point, I had spent all of my adult life.
|
||||
|
||||
Now YOU think about this: I’m black, with nothing more than a high school education. I had no work history, and if I ever were to leave prison, I would be a convicted felon upon my release. And I think I’m being fair when I say that the first thought for an employer who sees this profile is not "I need to hire this person."
|
||||
|
||||
My options weren’t clear, but my mind was made up. I needed to do something to survive that wouldn’t look anything like my life before prison.
|
||||
|
||||
### A path to Python
|
||||
|
||||
Eventually, I wound up in San Quentin State Prison, and I had no idea how lucky I was to be there. San Quentin offered several self-help and education programs. These [rehabilitation opportunities][2] ensured prisoners had skills that helped them avoid being repeat offenders upon release.
|
||||
|
||||
As part of one of these programs, I met [Jessica McKellar][3] in 2017 through her work with the San Quentin Media Program. Jessica is an enthusiast of the programming language [Python][4], and she started to sell me on how great Python is and how it’s the perfect language to learn for someone just starting out. And this is where the story becomes stranger than fiction.
|
||||
|
||||
|
||||
|
||||
> Thanks [@northbaypython][5] for letting [@ShaStepter][6] and me reprise our [@pycon][7] keynotes to get them recorded. I'm honored to share:
|
||||
>
|
||||
> From Prison to Python: <https://t.co/rcumoAgZHm>
|
||||
>
|
||||
> Mass Decarceration: If We Don't Hire People With Felony Convictions, Who Will? <https://t.co/fENDUFdxfX> [pic.twitter.com/Kpjo8d3ul6][8]
|
||||
>
|
||||
> — Jessica McKellar (@jessicamckellar) [November 5, 2019][9]
|
||||
|
||||
|
||||
|
||||
Jessica told me about these Python video tutorials that she did for a company called [O’Reilly Media][10], that they were online, and how great it would be if I could get access to them. Unfortunately, internet access in prison isn’t a thing. But, I had met this guy named Tim O’Reilly, who had recently come to San Quentin. It turns out that, after his visit, Tim had donated a ton of content from his company, O’Reilly Media, to the prison’s programming class. I wound up getting my hands on a tablet that had Jessica’s Python tutorials on it and learned how to code using those Python tutorials.
|
||||
|
||||
It was incredible. Total strangers with a very different background and life from my own had connected the dots in a way that led to me learning to code.
|
||||
|
||||
### The love of the Python community
|
||||
|
||||
After this point, I started meeting with Jessica pretty frequently, and she began to tell me about the open source community. What I learned is that, on a fundamental level, open source is about fellowship and collaboration. It works so well because no one is excluded.
|
||||
|
||||
And for me, someone who struggled to see where they fit, what I saw was a very basic form of love—love by way of collaboration and acceptance, love by way of access, love by way of inclusion. And my spirit yearned to be a part of it. So I continued my education with Python, and, unfortunately, I wasn’t able to get more tutorials, but I was able to draw from the vast wealth of written knowledge that has been compiled by the open source community. I read anything that even mentioned Python, from paperback books to obscure magazine articles, and I used the tablet that I had to solve the Python problems that I read about.
|
||||
|
||||
My passion for Python and programming wasn’t something that many of my peers shared. Aside from the very small group of people who were in the prison’s programming class, no one else that I knew had ever mentioned programming; it’s just not on the average prisoner’s radar. I believe that this is due to the perception that programming isn’t accessible to people who have experienced incarceration, especially if you are a person of color.
|
||||
|
||||
### Life with Python outside of prison
|
||||
|
||||
Then, on August 17, 2018, I got the surprise of my life. Then-Governor Jerry Brown commuted my 27-years-to-life sentence, and I was released from prison after serving almost 19 years.
|
||||
|
||||
But here’s the reality of my situation and why I believe that programming and the open source community are so valuable. I am a 37-year-old, black, convicted felon, with no work history, who just served 18 years in prison. There aren’t many professions that exist that would prevent me from being at the mercy of the stigmas and biases that inevitably accompany my criminal past. But one of the few exceptions is programming.
|
||||
|
||||
The people who are now returning back to society after incarceration are in desperate need of inclusion, but when the conversation turns to diversity in the workplace and how much it’s needed, you really don’t hear this group being mentioned or included.
|
||||
|
||||
|
||||
|
||||
> What else:
|
||||
>
|
||||
> 1\. Background checks: ask how they are used at your company.
|
||||
>
|
||||
> 2\. Entry-level roles: remove fake, unnecessary prerequisites that will exclude qualified people with records.
|
||||
>
|
||||
> 3\. Active outreach: partner with local re-entry programs to create hiring pipelines. [pic.twitter.com/WnzdEUTuxr][11]
|
||||
>
|
||||
> — Jessica McKellar (@jessicamckellar) [May 12, 2019][12]
|
||||
|
||||
|
||||
|
||||
So with that, I want to humbly challenge all of the programmers and members of the open source community to expand your thinking around inclusion and diversity. I proudly stand before you today as the representative of a demographic that most people don’t think about—formerly incarcerated people. But we exist, and we are eager to prove our value, and, above all else, we are looking to be accepted. Many challenges await us upon our reentry back into society, and I ask that you allow us to have the opportunity to demonstrate our worth. Welcome us, accept us, and, more than anything else, include us.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/1/prison-to-python
|
||||
|
||||
作者:[Shadeed "Sha" Wallace-Stepter][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[heguangzhi](https://github.com/heguangzhi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/shastepter
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/books_programming_languages.jpg?itok=KJcdnXM2 (Programming books on a shelf)
|
||||
[2]: https://www.dailycal.org/2019/02/27/san-quentin-rehabilitation-programs-offer-inmates-education-a-voice/
|
||||
[3]: https://twitter.com/jessicamckellar?lang=en
|
||||
[4]: https://www.python.org/
|
||||
[5]: https://twitter.com/northbaypython?ref_src=twsrc%5Etfw
|
||||
[6]: https://twitter.com/ShaStepter?ref_src=twsrc%5Etfw
|
||||
[7]: https://twitter.com/pycon?ref_src=twsrc%5Etfw
|
||||
[8]: https://t.co/Kpjo8d3ul6
|
||||
[9]: https://twitter.com/jessicamckellar/status/1191601209917837312?ref_src=twsrc%5Etfw
|
||||
[10]: http://shop.oreilly.com/product/110000448.do
|
||||
[11]: https://t.co/WnzdEUTuxr
|
||||
[12]: https://twitter.com/jessicamckellar/status/1127640222504636416?ref_src=twsrc%5Etfw
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (qianmingtian)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
72
sources/tech/20200203 New zine- Become a SELECT Star.md
Normal file
72
sources/tech/20200203 New zine- Become a SELECT Star.md
Normal file
@ -0,0 +1,72 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (New zine: Become a SELECT Star!)
|
||||
[#]: via: (https://jvns.ca/blog/2020/02/03/new-zine--become-a-select-star/)
|
||||
[#]: author: (Julia Evans https://jvns.ca/)
|
||||
|
||||
New zine: Become a SELECT Star!
|
||||
======
|
||||
|
||||
On Friday I published a zine about SQL called “Become a SELECT Star!”
|
||||
|
||||
You can get it for $12 at <https://wizardzines.com/zines/sql>. If you buy it, you’ll get a PDF that you can either read on your computer or print out. You can also get a pack of [all 7 zines][1] so far.
|
||||
|
||||
Here’s the cover and table of contents:
|
||||
|
||||
[![][2]][3] <https://jvns.ca/images/sql-toc.png>
|
||||
|
||||
### why SQL?
|
||||
|
||||
I got excited about writing a zine about SQL because at my old job I wrote a ton of SQL queries (mostly related to machine learning) and by doing that I learned there are a lot of weird things about SQL! For example – [SQL queries don’t actually start with SELECT][4]. And the way [NULL behaves isn’t really intuitive at first][5].
|
||||
|
||||
It’s been really fun to go back and try to explain the basics of SQL from the beginning. (what’s the difference between WHERE and HAVING? what’s the basic idea with indexes actually? how do you write a join?)
|
||||
|
||||
I think SQL is a really nice thing to know because there are SO MANY SQL databases out there, and some of them are super powerful! (like BigQuery and Redshift). So if you know SQL and have access to one of these big data warehouses you can write queries that crunch like 10 billion rows of data really quickly.
|
||||
|
||||
### lots of examples
|
||||
|
||||
I ended up spending a lot of time on the examples in this zine, more than in any previous zine. My friend [Anton][6] helped me come up with a fun way to illustrate them, where you can clearly see the query, the table it’s running on, and what the query outputs. Like this:
|
||||
|
||||
![][7]
|
||||
|
||||
### experiment: include a SQL playground
|
||||
|
||||
All the examples in the zine are real queries that you can run. So I thought: why not provide a simple environment where people can actually run those queries (and variations on those queries) to try things out?
|
||||
|
||||
So I built a small [playground where you can run queries on the example tables in the zine][8]. It uses SQLite compiled to web assembly, so all the queries run in your browser. It wasn’t too complicated to build – I just used my minimal Javascript/CSS skills and vue.js.
|
||||
|
||||
I’d love to hear any feedback about whether this is helpful or not – the example tables in the zine are really small (you can only print out small SQL tables!), so the biggest table in the example set has 9 rows or something.
|
||||
|
||||
### what’s next: probably containers
|
||||
|
||||
I think that next up is going to be a zine on containers, which is more of a normal systems-y topic for me. (for example: [namespaces][9], [cgroups][10], [why containers?][11])
|
||||
|
||||
Here’s a link to where to [get the zine][3] again :)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://jvns.ca/blog/2020/02/03/new-zine--become-a-select-star/
|
||||
|
||||
作者:[Julia Evans][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://jvns.ca/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://wizardzines.com/zines/all-the-zines/
|
||||
[2]: https://jvns.ca/images/sql-cover.png
|
||||
[3]: https://wizardzines.com/zines/sql
|
||||
[4]: https://jvns.ca/blog/2019/10/03/sql-queries-don-t-start-with-select/
|
||||
[5]: https://twitter.com/b0rk/status/1195184321818243083
|
||||
[6]: http://www.cat-bus.com/
|
||||
[7]: https://jvns.ca/images/sql-diagram.png
|
||||
[8]: https://sql-playground.wizardzines.com
|
||||
[9]: https://twitter.com/b0rk/status/1195725346970181632
|
||||
[10]: https://twitter.com/b0rk/status/1214341831049252870
|
||||
[11]: https://twitter.com/b0rk/status/1224500774450929664
|
170
sources/tech/20200204 DevOps vs Agile- What-s the difference.md
Normal file
170
sources/tech/20200204 DevOps vs Agile- What-s the difference.md
Normal file
@ -0,0 +1,170 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (DevOps vs Agile: What's the difference?)
|
||||
[#]: via: (https://opensource.com/article/20/2/devops-vs-agile)
|
||||
[#]: author: (Taz Brown https://opensource.com/users/heronthecli)
|
||||
|
||||
DevOps vs Agile: What's the difference?
|
||||
======
|
||||
The difference between the two is what happens after development.
|
||||
![Pair programming][1]
|
||||
|
||||
Early on, software development didn't really fit under a particular management umbrella. Then along came [waterfall][2], which spoke to the idea that software development could be defined by the length of time an application took to create or build.
|
||||
|
||||
Back then, it often took long periods of time to create, test, and deploy software because there were no checks and balances during the development process. The results were poor software quality with defects and bugs and unmet timelines. The focus was on long, drawn-out plans for software projects.
|
||||
|
||||
Waterfall projects have been associated with the [triple constraint][3] model, which is also called the project management triangle. Each side of the triangle represents a component of the triple constraints of project management: **scope**, **time**, and **cost**. As [Angelo Baretta writes][4], the triple constraint model "says that cost is a function of time and scope, that these three factors are related in a defined and predictable way… [I]f we want to shorten the schedule (time), we must increase cost. It says that if we want to increase scope, we must increase cost or schedule."
|
||||
|
||||
### Transitioning from waterfall to agile
|
||||
|
||||
Waterfall came from manufacturing and engineering, where a linear process makes sense; you build the wall before you build the roof. Similarly, software development problems were viewed as something that could be solved with planning. From beginning to end, the development process was clearly defined by a roadmap that would lead to the final delivery of a product.
|
||||
|
||||
Eventually, waterfall was recognized as detrimental and counterintuitive to software development because, often, the value could not be determined until the very end of the project cycle, and in many cases, the projects failed. Also, the customer didn't get to see any working software until the end of the project.
|
||||
|
||||
Agile takes a different approach that moves away from planning the entire project, committing to estimated dates, and being accountable to a plan. Rather, agile assumes and embraces uncertainty. It is built around the idea of responding to change instead of charging past it or ignoring the need for it. Instead, change is considered as a way to fulfill the needs of the customer.
|
||||
|
||||
### Agile values
|
||||
|
||||
Agile is governed by the Agile Manifesto, which defines [12 principles][5]:
|
||||
|
||||
1. Satisfying the customer is the top priority
|
||||
2. Welcome changing requirements, even late in development
|
||||
3. Deliver working software frequently
|
||||
4. Development and business must work together
|
||||
5. Build projects around motivated people
|
||||
6. Face-to-face communication is the most efficient and effective method of conveying information
|
||||
7. The primary measure of success is working software
|
||||
8. Agile processes promote sustainable development
|
||||
9. Maintain continuous attention to technical excellence and good design
|
||||
10. Simplicity is essential
|
||||
11. The best architectures, requirements, and designs emerge from self-organizing teams
|
||||
12. Regularly reflect on work, then tune and adjust behavior
|
||||
|
||||
|
||||
|
||||
Agile's four [core values][6] are:
|
||||
|
||||
* **Individuals and interactions** over processes and tools
|
||||
* **Working software** over comprehensive documentation
|
||||
* **Customer collaboration** over contract negotiation
|
||||
* **Responding to change** over following a plan
|
||||
|
||||
|
||||
|
||||
This contrasts with waterfall's rigid planning style. In agile, the customer is a member of the development team rather than engaging only at the beginning, when setting business requirements, and at the end, when reviewing the final product (as in waterfall). The customer helps the team write the [acceptance criteria][7] and remains engaged throughout the process. In addition, agile requires changes and continuous improvement throughout the organization. The development team works with other teams, including the project management office and the testers. What gets done and when are led by a designated role and agreed to by the team as a whole.
|
||||
|
||||
### Agile software development
|
||||
|
||||
Agile software development requires adaptive planning, evolutionary development, and delivery. Many software development methodologies, frameworks, and practices fall under the umbrella of being agile, including:
|
||||
|
||||
* Scrum
|
||||
* Kanban (visual workflow)
|
||||
* XP (eXtreme Programming)
|
||||
* Lean
|
||||
* DevOps
|
||||
* Feature-driven development (FDD)
|
||||
* Test-driven development (TDD)
|
||||
* Crystal
|
||||
* Dynamic systems development method (DSDM)
|
||||
* Adaptive software development (ASD)
|
||||
|
||||
|
||||
|
||||
All of these have been used on their own or in combination for developing and deploying software. The most common are [scrum, kanban][8] (or the combination called scrumban), and DevOps.
|
||||
|
||||
[Scrum][9] is a framework under which a team, generally consisting of a scrum master, product owner, and developers, operates cross-functionally and in a self-directed manner to increase the speed of software delivery and
|
||||
|
||||
to bring greater business value to the customer. The focus is on faster iterations with smaller [increments][10].
|
||||
|
||||
[Kanban][11] is an agile framework, sometimes called a workflow management system, that helps teams visualize their work and maximize efficiency (thus being agile). Kanban is usually represented by a digital or physical board. A team's work moves across the board, for example, from not started, to in progress, testing, and finished, as it progresses. Kanban allows each team member to see the state of all work at any time.
|
||||
|
||||
### DevOps values
|
||||
|
||||
DevOps is a culture, a state of mind, a way that software development or infrastructure is, and a way that software and applications are built and deployed. There is no wall between development and operations; they work simultaneously and without silos.
|
||||
|
||||
DevOps is based on two other practice areas: lean and agile. DevOps is not a title or role within a company; it's really a commitment that an organization or team makes to continuous delivery, deployment, and integration. According to [Gene Kim][12], author of _The Phoenix Project_ and _The Unicorn Project_, there are three "ways" that define the principles of DevOps:
|
||||
|
||||
* The First Way: Principles of flow
|
||||
* The Second Way: Principles of feedback
|
||||
* The Third Way: Principles of continuous learning
|
||||
|
||||
|
||||
|
||||
### DevOps software development
|
||||
|
||||
DevOps does not happen in a vacuum; it is a flexible practice that, in its truest form, is a shared culture and mindset around software development and IT or infrastructure implementation.
|
||||
|
||||
When you think of automation, cloud, microservices, you think of DevOps. In an [interview][13], _Accelerate: Building and Scaling High Performing Technology Organizations_ authors Nicole Forsgren, Jez Humble, and Gene Kim explained:
|
||||
|
||||
> * Software delivery performance matters, and it has a significant impact on organizational outcomes such as profitability, market share, quality, customer satisfaction, and achieving organizational and mission goals.
|
||||
> * High performers achieve levels of throughput, stability, and quality; they're not trading off to achieve these attributes.
|
||||
> * You can improve your performance by implementing practices from the lean, agile, and DevOps playbooks.
|
||||
> * Implementing these practices and capabilities also has an impact on your organizational culture, which in turn has an impact on both your software delivery performance and organizational performance.
|
||||
> * There's still lots of work to do to understand how to improve performance.
|
||||
>
|
||||
|
||||
|
||||
### DevOps vs. agile
|
||||
|
||||
Despite their similarities, DevOps and agile are not the same, and some argue that DevOps is better than agile. To eliminate the confusion, it's important to get down to the nuts and bolts.
|
||||
|
||||
#### Similarities
|
||||
|
||||
* Both are software development methodologies; there is no disputing this.
|
||||
* Agile has been around for over 20 years, and DevOps came into the picture fairly recently.
|
||||
* Both believe in fast software development, and their principles are based on how fast software can be developed without causing harm to the customer or operations.
|
||||
|
||||
|
||||
|
||||
#### Differences
|
||||
|
||||
* **The difference between the two** is what happens after development.
|
||||
* Software development, testing, and deployment happen in both DevOps and agile. However, pure agile tends to stop after these three stages. In contrast, DevOps includes operations, which happen continually. Therefore, monitoring and software development are also continuous.
|
||||
* In agile, separate people are responsible for developing, testing, and deploying the software. In DevOps, the DevOps engineering role is are responsible for everything; development is operations, and operations is development.
|
||||
* DevOps is more associated with cost-cutting, and agile is more synonymous with lean and reducing waste, and concepts like agile project accounting and minimum viable product (MVP) are relevant.
|
||||
* Agile focuses on and embodies empiricism (**adaptation**, **transparency**, and **inspection**) instead of predictive measures.
|
||||
|
||||
Agile | DevOps
|
||||
---|---
|
||||
Feedback from customer | Feedback from self
|
||||
Smaller release cycles | Smaller release cycles, immediate feedback
|
||||
Focus on speed | Focus on speed and automation
|
||||
Not the best for business | Best for business
|
||||
|
||||
### Wrapping up
|
||||
|
||||
Agile and DevOps are distinct, although their similarities lead people to think they are one and the same. This does both agile and DevOps a disservice.
|
||||
|
||||
In my experience as an agilist, I have found it valuable for organizations and teams to understand—from a high level—what agile and DevOps are and how they aid teams in working faster and more efficiently, delivering quality faster, and improving customer satisfaction.
|
||||
|
||||
Agile and DevOps are not adversarial in any way (or at least the intent is not there). They are more allies than enemies in the agile revolution. Agile and DevOps can operate exclusively and inclusively, which allows both to exist in the same space.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/2/devops-vs-agile
|
||||
|
||||
作者:[Taz Brown][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/heronthecli
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/collab-team-pair-programming-code-keyboard.png?itok=kBeRTFL1 (Pair programming)
|
||||
[2]: http://www.agilenutshell.com/agile_vs_waterfall
|
||||
[3]: https://en.wikipedia.org/wiki/Project_management_triangle
|
||||
[4]: https://www.pmi.org/learning/library/triple-constraint-erroneous-useless-value-8024
|
||||
[5]: https://agilemanifesto.org/principles.html
|
||||
[6]: https://agilemanifesto.org/
|
||||
[7]: https://www.productplan.com/glossary/acceptance-criteria/
|
||||
[8]: https://opensource.com/article/19/8/scrum-vs-kanban
|
||||
[9]: https://www.scrum.org/
|
||||
[10]: https://www.scrum.org/resources/what-is-an-increment
|
||||
[11]: https://www.atlassian.com/agile/kanban
|
||||
[12]: https://itrevolution.com/the-unicorn-project/
|
||||
[13]: https://www.infoq.com/articles/book-review-accelerate/
|
@ -0,0 +1,157 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Managing your attached hardware on Linux with systemd-udevd)
|
||||
[#]: via: (https://opensource.com/article/20/2/linux-systemd-udevd)
|
||||
[#]: author: (David Clinton https://opensource.com/users/dbclinton)
|
||||
|
||||
Managing your attached hardware on Linux with systemd-udevd
|
||||
======
|
||||
Manipulate how your Linux system handles physical devices with udev.
|
||||
![collection of hardware on blue backround][1]
|
||||
|
||||
Linux does a great job automatically recognizing, loading, and exposing attached hardware devices from countless vendors. In fact, it was this feature that, many years ago, convinced me to insist that my employer convert its entire infrastructure to Linux. The pain point was the way a certain company in Redmond couldn't load drivers for the integrated network card on our Compaq desktops while Linux did it effortlessly.
|
||||
|
||||
In the years since then, Linux's library of recognized devices has grown enormously along with the sophistication of the process. And the star of that show is [udev][2]. Udev's job is to listen for events from the Linux kernel involving changes to the state of a device. It could be a new USB device that's plugged in or pulled out, or it might be a wireless mouse going offline as it's drowned in spilled coffee.
|
||||
|
||||
Udev's job is to handle all changes of state by, for instance, assigning the names or permissions through which devices are accessed. A record of those changes can be accessed through [dmesg][3]. Since dmesg typically spits out thousands of entries, it's smart to filter the results. The example below shows how Linux identifies my WiFi interface. It shows the chipset my wireless device uses (**ath9k**), the original name it was assigned early in the process (**wlan0**), and the big, ugly permanent name it's currently using (**wlxec086b1ef0b3**):
|
||||
|
||||
|
||||
```
|
||||
$ dmesg | grep wlan
|
||||
[ 5.396874] ath9k_htc 1-3:1.0 wlxec086b1ef0b3: renamed from wlan0
|
||||
```
|
||||
|
||||
In this article, I'll discuss why anyone might want to use a name like that. Along the way, I'll explore the anatomy of udev configuration files and then show how to make changes to udev settings, including how to edit the way the system names devices. This article is based on a module from my new course, [Linux System Optimization][4].
|
||||
|
||||
### Understanding the udev configuration system
|
||||
|
||||
On systemd machines, udev operations are managed by the **systemd-udevd** daemon. You can check the status of the udev daemon the regular systemd way using **systemctl status systemd-udevd**.
|
||||
|
||||
Technically, udev works by trying to match each system event it receives against sets of rules found in either the **/lib/udev/rules.d/** or **/etc/udev/rules.d/** directories. Rules files include match keys and assignment keys. The set of available match keys includes **action**, **name**, and **subsystem**. This means that if a device with a specified name that's part of a specified subsystem is detected, then it will be assigned a preset configuration.
|
||||
|
||||
Then, the "assignment" key/value pairs are used to apply the desired configuration. You could, for instance, assign a new name to the device, associate it with a filesystem symlink, or restrict access to a particular owner or group. Here's an excerpt from such a rule from my workstation:
|
||||
|
||||
|
||||
```
|
||||
$ cat /lib/udev/rules.d/73-usb-net-by-mac.rules
|
||||
# Use MAC based names for network interfaces which are directly or indirectly
|
||||
# on USB and have an universally administered (stable) MAC address (second bit
|
||||
# is 0). Don't do this when ifnames is disabled via kernel command line or
|
||||
# customizing/disabling 99-default.link (or previously 80-net-setup-link.rules).
|
||||
|
||||
IMPORT{cmdline}="net.ifnames"
|
||||
ENV{net.ifnames}=="0", GOTO="usb_net_by_mac_end"
|
||||
|
||||
ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", NAME=="", \
|
||||
ATTR{address}=="?[014589cd]:*", \
|
||||
TEST!="/etc/udev/rules.d/80-net-setup-link.rules", \
|
||||
TEST!="/etc/systemd/network/99-default.link", \
|
||||
IMPORT{builtin}="net_id", NAME="$env{ID_NET_NAME_MAC}"
|
||||
```
|
||||
|
||||
The **add** action tells udev to fire up whenever a new device is plugged in that is part of the networking subsystem _and_ is a USB device. In addition, if I understand it correctly, the rule will apply only when the device has a MAC address consisting of characters within a certain range and, in addition, only if the **80-net-setup-link.rules** and **99-default.link** files do _not_ exist.
|
||||
|
||||
Assuming all these conditions are met, the interface ID will be changed to match the device's MAC address. Remember the previous dmesg entry showing how my interface name was changed from **wlan0** to that nasty **wlxec086b1ef0b3** name? That was a result of this rule's execution. How do I know? Because **ec:08:6b:1e:f0:b3** is the device's MAC address (minus the colons):
|
||||
|
||||
|
||||
```
|
||||
$ ifconfig -a
|
||||
wlxec086b1ef0b3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
|
||||
inet 192.168.0.103 netmask 255.255.255.0 broadcast 192.168.0.255
|
||||
inet6 fe80::7484:3120:c6a3:e3d1 prefixlen 64 scopeid 0x20<link>
|
||||
ether ec:08:6b:1e:f0:b3 txqueuelen 1000 (Ethernet)
|
||||
RX packets 682098 bytes 714517869 (714.5 MB)
|
||||
RX errors 0 dropped 0 overruns 0 frame 0
|
||||
TX packets 472448 bytes 201773965 (201.7 MB)
|
||||
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
|
||||
```
|
||||
|
||||
This udev rule exists by default within Linux. I didn't have to write it myself. But why bother—especially seeing how difficult it is to work with such an interface designation? Take a second look at the comments included with the rule:
|
||||
|
||||
|
||||
```
|
||||
# Use MAC based names for network interfaces which are directly or indirectly
|
||||
# on USB and have an universally administered (stable) MAC address (second bit
|
||||
# is 0). Don't do this when ifnames is disabled via kernel command line or
|
||||
# customizing/disabling 99-default.link (or previously 80-net-setup-link.rules).
|
||||
```
|
||||
|
||||
Note how this rule is designed specifically for USB-based network interfaces. Unlike PCI network interface cards (NICs), USB devices are likely to be removed and replaced from time to time. This means that there's no guarantee that their ID won't change. They could be **wlan0** one day and **wlan3** the next. To avoid confusing the applications, assign devices absolute IDs—like the one given to my USB interface.
|
||||
|
||||
### Manipulating udev settings
|
||||
|
||||
For my next trick, I'm going to grab the MAC address and current ID for the Ethernet network interface on a [VirtualBox][5] virtual machine and then use that information to create a new udev rule that will change the interface ID. Why? Well, perhaps I'm planning to work with the device from the command line, and having to type that long name can be annoying. Here's how that will work.
|
||||
|
||||
Before I can change my ID, I'll need to disable [Netplan][6]'s current network configuration. That'll force Linux to pay attention to the new configuration. Here's my current network interface configuration file in the **/etc/netplan/** directory:
|
||||
|
||||
|
||||
```
|
||||
$ less /etc/netplan/50-cloud-init.yaml
|
||||
# This file is generated from information provided by
|
||||
# the datasource. Changes to it will not persist across an instance.
|
||||
# To disable cloud-init's network configuration capabilities, write a file
|
||||
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
|
||||
# network: {config: disabled}
|
||||
network:
|
||||
ethernets:
|
||||
enp0s3:
|
||||
addresses: []
|
||||
dhcp4: true
|
||||
version: 2
|
||||
```
|
||||
|
||||
The **50-cloud-init.yaml** file contains a very basic interface definition. But it also includes some important information about disabling the configuration in the comments. To do so, I'll move to the **/etc/cloud/cloud.cfg.d** directory and create a new file called **99-disable-network-config.cfg** and add the **network: {config: disabled}** string.
|
||||
|
||||
While I haven't tested this method on distros other than Ubuntu, it should work on any flavor of Linux with systemd (which is nearly all of them). Whatever you're using, you'll get a good look at writing udev config files and testing them.
|
||||
|
||||
Next, I need to gather some system information. Running the **ip** command reports that my Ethernet interface is called **enp0s3** and its MAC address is **08:00:27:1d:28:10**:
|
||||
|
||||
|
||||
```
|
||||
$ ip a
|
||||
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
|
||||
link/ether 08:00:27:1d:28:10 brd ff:ff:ff:ff:ff:ff
|
||||
inet 192.168.0.115/24 brd 192.168.0.255 scope global dynamic enp0s3
|
||||
```
|
||||
|
||||
Now, I'll create a new file called **peristent-net.rules** in the **/etc/udev/rules.d** directory. I'm going to give the file a name that starts with a low number, 10:
|
||||
|
||||
|
||||
```
|
||||
$ cat /etc/udev/rules.d/10-persistent-network.rules
|
||||
ACTION=="add", SUBSYSTEM=="net",ATTR{address}=="08:00:27:1d:28:10",NAME="eth3"
|
||||
```
|
||||
|
||||
The lower the number, the earlier Linux will execute the file, and I want this one to go early. The file contains code that will give the name **eth3** to a network device when it's added—as long as its address matches **08:00:27:1d:28:10**, which is my interface's MAC address.
|
||||
|
||||
Once I save the file and reboot the machine, my new interface name should be in play. I may need to log in directly to my virtual machine and use **dhclient** to manually get Linux to request an IP address on this newly named network. Opening SSH sessions might be impossible without doing that first:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo dhclient eth3`
|
||||
```
|
||||
|
||||
Done. So you're now able to force udev to make your computer refer to a NIC the way you want. But more importantly, you've got the tools to figure out how to manage _any_ misbehaving device.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/2/linux-systemd-udevd
|
||||
|
||||
作者:[David Clinton][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/dbclinton
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_BUS_Apple_520.png?itok=ZJu-hBV1 (collection of hardware on blue backround)
|
||||
[2]: https://en.wikipedia.org/wiki/Udev
|
||||
[3]: https://en.wikipedia.org/wiki/Dmesg
|
||||
[4]: https://pluralsight.pxf.io/RqrJb
|
||||
[5]: https://www.virtualbox.org/
|
||||
[6]: https://netplan.io/
|
@ -0,0 +1,122 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (PaperWM, the Tiling Window Manager for GNOME)
|
||||
[#]: via: (https://itsfoss.com/paperwm/)
|
||||
[#]: author: (John Paul https://itsfoss.com/author/john/)
|
||||
|
||||
PaperWM, the Tiling Window Manager for GNOME
|
||||
======
|
||||
|
||||
Lately, tiling window managers have been gaining popularity even among the regular desktop Linux users. Unfortunately, it can be difficult and time-consuming for a user to install and set up a tiling window manager.
|
||||
|
||||
This is why projects like [Regolith][1] and PaperWM has come up to provide tiling window experience with minimal efforts.
|
||||
|
||||
We have already discussed [Regolith desktop][2] in details. In this article, we’ll check out PaperWM.
|
||||
|
||||
### What is PaperWM?
|
||||
|
||||
According to its GitHub repo, [PaperWM][3] is “an experimental [Gnome Shell extension][4] providing scrollable tiling of windows and per monitor workspaces. It’s inspired by paper notebooks and tiling window managers.”
|
||||
|
||||
PaperWM puts all of your windows in a row. You can quickly switch between windows very quickly. It’s a little bit like having a long spool of paper in front of you that you can move back and forth.
|
||||
|
||||
This extension supports GNOME Shell 3.28 to 3.34. It also supports both X11 and Wayland. It is written in JavaScript.
|
||||
|
||||
![PaperWM Desktop][5]
|
||||
|
||||
# How to Install PaperWM?
|
||||
|
||||
To install the PaperWM extension, you will need to clone the Github repo. Use this command:
|
||||
|
||||
```
|
||||
git clone 'https://github.com/paperwm/PaperWM.git' "${XDG_DATA_HOME:-$HOME/.local/share}/gnome-shell/extensions/[email protected]:matrix.org"
|
||||
```
|
||||
|
||||
Now all you have to do is run:
|
||||
|
||||
```
|
||||
./install.sh
|
||||
```
|
||||
|
||||
The installer will set up and enable PaperWM.
|
||||
|
||||
If you are an Ubuntu user, there are a couple of things that you will need to consider. There are currently three different versions of the Gnome desktop available with Ubuntu:
|
||||
|
||||
* ubuntu-desktop
|
||||
* ubuntu-gnome-desktop
|
||||
* vanilla-gnome-desktop
|
||||
|
||||
|
||||
|
||||
Ubuntu ships ubuntu-desktop by default and includes the _desktop-icons_ package, which causes issues with PaperWM. The PaperWM devs recommend that you turn off the desktop-icons extension [using GNOME Tweaks tool][6]. However, while this step does work in 19.10, they say that users have reported that it is not working 19.04.
|
||||
|
||||
According to the PaperWM devs, using _ubuntu-gnome-desktop_ produces the best out of the box results. _vanilla-gnome-desktop_ has some keybindings that raise havoc with PaperWM.
|
||||
|
||||
**Recommended Read:**
|
||||
|
||||
![][7]
|
||||
|
||||
#### [Get a Preconfigured Tiling Window Manager on Ubuntu With Regolith][2]
|
||||
|
||||
Using tiling window manager in Linux can be tricky with all those configuration. Regolith gives you an out of box i3wm experience within Ubuntu.
|
||||
|
||||
### How to Use PaperWM?
|
||||
|
||||
Like most tiling window managers, PaperWM uses the keyboard to control and manage the windows. PaperWM also supports mouse and touchpad controls. For example, if you have Wayland installed, you can use a three-fingered swipe to navigate.
|
||||
|
||||
![PaperWM in action][8]
|
||||
|
||||
Here is a list of a few of the keybinding that preset in PaperWM:
|
||||
|
||||
* Super + , or Super + . to activate the next or previous window
|
||||
* Super + Left or Super + Rightto activate the window to the left or right
|
||||
* Super + Up or Super + Downto activate the window above or below
|
||||
* Super + , or Super + . to activate the next or previous window
|
||||
* Super + Tab or Alt + Tab to cycle through the most recently used windows
|
||||
* Super + C to center the active window horizontally
|
||||
* Super + R to resize the window (cycles through useful widths)
|
||||
* Super + Shift + R to resize the window (cycles through useful heights)
|
||||
* Super + Shift + F to toggle fullscreen
|
||||
* Super + Return or Super + N to create a new window from the active application
|
||||
* Super + Backspace to close the active window
|
||||
|
||||
|
||||
|
||||
The Super key is the Windows key on your keyboard. You can find the full list of keybindings on the PaperWM [GitHub page][9].
|
||||
|
||||
### Final Thoughts on PaperWM
|
||||
|
||||
As I have stated previously, I don’t use tiling managers. However, this one has me thinking. I like the fact that you don’t have to do a lot of configuring to get it working. Another big plus is that it is built on GNOME, which means that getting a tiling manager working on Ubuntu is fairly straight forward.
|
||||
|
||||
The only downside that I can see is that a system running a dedicated tiling window manager, like [Sway][10], would use fewer system resources and be faster overall.
|
||||
|
||||
What are your thoughts on the PaperWM GNOME extension? Please let us know in the comments below.
|
||||
|
||||
If you found this article interesting, please take a minute to share it on social media, Hacker News or [Reddit][11].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/paperwm/
|
||||
|
||||
作者:[John Paul][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/john/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://regolith-linux.org/
|
||||
[2]: https://itsfoss.com/regolith-linux-desktop/
|
||||
[3]: https://github.com/paperwm/PaperWM
|
||||
[4]: https://itsfoss.com/gnome-shell-extensions/
|
||||
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/01/paperwm-desktop.png?ssl=1
|
||||
[6]: https://itsfoss.com/gnome-tweak-tool/
|
||||
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/09/regolith-linux.png?fit=800%2C450&ssl=1
|
||||
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/01/paperwm-desktop2.png?fit=800%2C450&ssl=1
|
||||
[9]: https://github.com/paperwm/PaperWM#usage
|
||||
[10]: https://itsfoss.com/sway-window-manager/
|
||||
[11]: https://reddit.com/r/linuxusersgroup
|
@ -7,43 +7,43 @@
|
||||
[#]: via: (https://www.2daygeek.com/linux-commands-check-memory-usage/)
|
||||
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
|
||||
|
||||
8 Commands to Check Memory Usage on Linux
|
||||
检查 Linux 中内存使用情况的8条命令
|
||||
======
|
||||
|
||||
Linux is not like Windows and you will not get a GUI always, especially in a server environment.
|
||||
Linux 并不像 Windows,你经常不会有图形界面可供使用,特别是在服务器环境中。
|
||||
|
||||
As a Linux administrator, it is important to know how to check your available and used resources, such as memory, CPU, disk space, etc.
|
||||
作为一名 Linux 管理员,知道如何获取当前可用的和已经使用的资源情况,比如内存、CPU、磁盘等,是相当重要的。
|
||||
|
||||
If there are any applications that use too much resources on the system to run your system at the optimum level you need to find and fix.
|
||||
如果某一应用在你的系统上占用了太多的资源,导致你的系统无法达到最优状态,那么你需要找到并修正它。
|
||||
|
||||
If you want to **[find out the top 10 memory (RAM) consumption processes in Linux][1]**, go to the following article.
|
||||
如果你想找到消耗内存前十名的进程,你需要去阅读这篇文章: **[在 Linux 系统中找到消耗内存最多的 10 个进程][1]** 。
|
||||
|
||||
In Linux, there are commands for everything, so use the corresponding commands.
|
||||
在 Linux 中,命令能做任何事,所以使用相关命令吧。
|
||||
|
||||
In this tutorial, we will show you eight powerful commands to check memory usage on a Linux system, including RAM and swap.
|
||||
在这篇教程中,我们将会给你展示 8 个有用的命令来即查看在 Linux 系统中内存的使用情况,包括 RAM 和交换分区。
|
||||
|
||||
**[Creating swap space on a Linux system][2]** is very important.
|
||||
创建交换分区在 Linux 系统中是非常重要的,如果你想了解如何创建,可以去阅读这篇文章: **[在 Linux 系统上创建交换分区][2]** 。
|
||||
|
||||
The following commands can help you check memory usage in Linux in different ways.
|
||||
下面的命令可以帮助你以不同的方式查看 Linux 内存使用情况。
|
||||
|
||||
* free Command
|
||||
* /proc/meminfo File
|
||||
* vmstat Command
|
||||
* ps_mem Command
|
||||
* smem Command
|
||||
* top Command
|
||||
* htop Command
|
||||
* glances Command
|
||||
* free 命令
|
||||
* /proc/meminfo 文件
|
||||
* vmstat 命令
|
||||
* ps_mem 命令
|
||||
* smem 命令
|
||||
* top 命令
|
||||
* htop 命令
|
||||
* glances 命令
|
||||
|
||||
|
||||
|
||||
### 1) How to Check Memory Usage on Linux Using the free Command
|
||||
### 1)如何使用 free 命令查看 Linux 内存使用情况
|
||||
|
||||
**[Free command][3]** is the most powerful command widely used by the Linux administrator. But it provides very little information compared to the “/proc/meminfo” file.
|
||||
**[Free 命令][3]** 是被 Linux 管理员广泛使用地命令。但是它提供的信息比 “/proc/meminfo” 文件少。
|
||||
|
||||
Free command displays the total amount of free and used physical and swap memory on the system, as well as buffers and caches used by the kernel.
|
||||
Free 命令会分别展示物理内存和交换分区内存中已使用的和未使用的数量,以及内核使用的缓冲区和缓存。
|
||||
|
||||
These information is gathered from the “/proc/meminfo” file.
|
||||
这些信息都是从 “/proc/meminfo” 文件中获取的。
|
||||
|
||||
```
|
||||
# free -m
|
||||
@ -52,24 +52,24 @@ Mem: 15867 9199 1702 3315 4965 3039
|
||||
Swap: 17454 666 16788
|
||||
```
|
||||
|
||||
* **total:** Total installed memory
|
||||
* **used:** Memory is currently in use by running processes (used= total – free – buff/cache)
|
||||
* **free:** Unused memory (free= total – used – buff/cache)
|
||||
* **shared:** Memory shared between two or more processes (multiple processes)
|
||||
* **buffers:** Memory reserved by the kernel to hold a process queue request.
|
||||
* **cache:** Size of the page cache that holds recently used files in RAM
|
||||
* **buff/cache:** Buffers + Cache
|
||||
* **available:** Estimation of how much memory is available for starting new applications, without swapping.
|
||||
* **total:** 总的内存量
|
||||
* **used:** 当前正在被运行中的进程使用的内存量 (used = total – free – buff/cache)
|
||||
* **free:** 未被使用的内存量 (free = total – used – buff/cache)
|
||||
* **shared:** 在两个或多个进程之间共享的内存量 (多进程)
|
||||
* **buffers:** 内核用于记录进程队列请求的内存量
|
||||
* **cache:** 在 RAM 中最近使用的文件中的页缓冲大小
|
||||
* **buff/cache:** 缓冲区和缓存总的使用内存量
|
||||
* **available:** 启动新应用不含交换分区的可用内存量
|
||||
|
||||
|
||||
|
||||
### 2) How to Check Memory Usage on Linux Using the /proc/meminfo File
|
||||
### 2) 如何使用 /proc/meminfo 文件查看 Linux 内存使用情况
|
||||
|
||||
The “/proc/meminfo” file is a virtual file that contains various real-time information about memory usage.
|
||||
“/proc/meminfo” 文件是一个包含了多种内存使用的实时信息的虚拟文件。
|
||||
|
||||
It shows memory stats in kilobytes, most of which are somewhat difficult to understand.
|
||||
它展示内存状态单位使用的是 kB,其中大部分属性都难以理解。
|
||||
|
||||
However it contains useful information about memory usage.
|
||||
然而它也包含了内存使用情况的有用信息。
|
||||
|
||||
```
|
||||
# cat /proc/meminfo
|
||||
@ -124,13 +124,14 @@ DirectMap2M: 14493696 kB
|
||||
DirectMap1G: 2097152 kB
|
||||
```
|
||||
|
||||
### 3) How to Check Memory Usage on Linux Using the vmstat Command
|
||||
### 3) 如何使用 vmstat 命令查看 Linux 内存使用情况
|
||||
|
||||
The **[vmstat command][4]** is another useful tool for reporting virtual memory statistics.
|
||||
**[vmstat 命令][4]** 是另一个报告虚拟内存统计信息的有用工具。
|
||||
|
||||
vmstat reports information about processes, memory, paging, block IO, traps, disks, and cpu functionality.
|
||||
vmstat 报告的信息包括:进程、内存、页面映射、块 I/O、陷阱、磁盘和 cpu 功能信息。
|
||||
|
||||
vmstat does not require special permissions, and it can help identify system bottlenecks.
|
||||
|
||||
vmstat 不需要特殊的权限,并且它可以帮助诊断系统瓶颈。
|
||||
|
||||
```
|
||||
# vmstat
|
||||
@ -140,58 +141,58 @@ procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
|
||||
1 0 682060 1769324 234188 4853500 0 3 25 91 31 16 34 13 52 0 0
|
||||
```
|
||||
|
||||
If you want to understand this in detail, read the field description below.
|
||||
如果你想详细了解每一项的含义,阅读下面的描述。
|
||||
|
||||
**Procs**
|
||||
|
||||
* **r:** The number of runnable processes (running or waiting for run time).
|
||||
* **b:** The number of processes in uninterruptible sleep.
|
||||
* **r:** 可以运行的进程数目(正在运行或等待运行)
|
||||
* **b:** 不间断睡眠中的进程数目
|
||||
|
||||
|
||||
|
||||
**Memory**
|
||||
|
||||
* **swpd:** the amount of virtual memory used.
|
||||
* **free:** the amount of idle memory.
|
||||
* **buff:** the amount of memory used as buffers.
|
||||
* **cache:** the amount of memory used as cache.
|
||||
* **inact:** the amount of inactive memory. (-a option)
|
||||
* **active:** the amount of active memory. (-a option)
|
||||
|
||||
* **swpd:** 使用的虚拟内存数量
|
||||
* **free:** 空闲的内存数量
|
||||
* **buff:** 用作缓冲区内存的数量
|
||||
* **cache:** 用作缓存内存的数量
|
||||
* **inact:** 不活动的内存数量(-a 选项)
|
||||
* **active:** 活动的内存数量(-a 选项)
|
||||
|
||||
|
||||
|
||||
**Swap**
|
||||
|
||||
* **si:** Amount of memory swapped in from disk (/s).
|
||||
* **so:** Amount of memory swapped to disk (/s).
|
||||
* **si:** 从磁盘交换的内存数量 (/s).
|
||||
* **so:** 交换到磁盘的内存数量 (/s).
|
||||
|
||||
|
||||
|
||||
**IO**
|
||||
|
||||
* **bi:** Blocks received from a block device (blocks/s).
|
||||
* **bo:** Blocks sent to a block device (blocks/s).
|
||||
* **bi:** 从一个块设备中收到的块 (blocks/s).
|
||||
* **bo:** 发送到一个块设备的块 (blocks/s).
|
||||
|
||||
|
||||
|
||||
**System**
|
||||
|
||||
* **in:** The number of interrupts per second, including the clock.
|
||||
* **cs:** The number of context switches per second.
|
||||
* **in:** 每秒的中断此数,包括时钟。
|
||||
* **cs:** 每秒的上下文切换次数。
|
||||
|
||||
|
||||
|
||||
**CPU : These are percentages of total CPU time.**
|
||||
**CPU : 下面这些是在总的 CPU 时间占的百分比 **
|
||||
|
||||
* **us:** Time spent running non-kernel code. (user time, including nice time)
|
||||
* **sy:** Time spent running kernel code. (system time)
|
||||
* **id:** Time spent idle. Prior to Linux 2.5.41, this includes IO-wait time.
|
||||
* **wa:** Time spent waiting for IO. Prior to Linux 2.5.41, included in idle.
|
||||
* **st:** Time stolen from a virtual machine. Prior to Linux 2.6.11, unknown.
|
||||
* **us:** 花费在非内核上的时间占比(包括用户时间,调度)
|
||||
* **sy:** 花费在内核上的时间占比 (系统时间)
|
||||
* **id:** 花费在闲置的时间占比。在 Linux 2.5.41 之前,包括 I/O 等待时间
|
||||
* **wa:** 花费在 I/O 等待上的时间占比。在 Linux 2.5.41 之前,包括空闲时间
|
||||
* **st:** 被虚拟机偷走的时间占比。在 Linux 2.6.11 之前,这部分称为 unknow
|
||||
|
||||
|
||||
|
||||
Run the following command for detailed information.
|
||||
运行下面的命令查看详细的信息。
|
||||
|
||||
```
|
||||
# vmstat -s
|
||||
@ -223,16 +224,15 @@ Run the following command for detailed information.
|
||||
1577163147 boot time
|
||||
3318 forks
|
||||
```
|
||||
### 4) 如何使用 ps_mem 命令查看 Linux 内存使用情况
|
||||
|
||||
### 4) How to Check Memory Usage on Linux Using the ps_mem Command
|
||||
**[ps_mem][5]** 是一个简单的 Python 脚本用来查看当前内存使用情况。
|
||||
|
||||
**[ps_mem][5]** is a simple Python script that allows you to get core memory usage accurately for a program in Linux.
|
||||
该工具可以确定每个程序使用了多少内存(不是每个进程)。
|
||||
|
||||
This can determine how much RAM is used per program (not per process).
|
||||
该工具采用如下的方法计算每个程序使用内存:总的使用 = 程序进程私有的内存 + 程序进程共享的内存。
|
||||
|
||||
It calculates the total amount of memory used per program, total = sum (private RAM for program processes) + sum (shared RAM for program processes).
|
||||
|
||||
The shared RAM is problematic to calculate, and the tool automatically selects the most accurate method available for the running kernel.
|
||||
计算共享内存是存在不足之处的,该工具可以为运行中的内核自动选择最准确的方法。
|
||||
|
||||
```
|
||||
# ps_mem
|
||||
@ -285,15 +285,15 @@ The shared RAM is problematic to calculate, and the tool automatically selects t
|
||||
==================================
|
||||
```
|
||||
|
||||
### 5) How to Check Memory Usage on Linux Using the smem Command
|
||||
### 5)如何使用 smem 命令查看 Linux 内存使用情况
|
||||
|
||||
**[smem][6]** is a tool that can provide numerous reports of memory usage on Linux systems. Unlike existing tools, smem can report Proportional Set Size (PSS), Unique Set Size (USS) and Resident Set Size (RSS).
|
||||
**[smem][6]** 是一个可以为 Linux 系统提供多种内存使用情况报告的工具。不同于现有的工具,smem 可以报告比例集大小(PSS)、唯一集大小(USS)和居住集大小(RSS)
|
||||
|
||||
Proportional Set Size (PSS): refers to the amount of memory used by libraries and applications in the virtual memory system.
|
||||
比例集(PSS):库和应用在虚拟内存系统中的使用量。
|
||||
|
||||
Unique Set Size (USS) : Unshared memory is reported as USS (Unique Set Size).
|
||||
唯一集大小(USS):其报告的是非共享内存。
|
||||
|
||||
Resident Set Size (RSS) : The standard measure of physical memory (it typically shared among multiple applications) usage known as resident set size (RSS) will significantly overestimate memory usage.
|
||||
居住集大小(RSS):物理内存(通常多进程共享)使用情况,其通常高于内存使用量。
|
||||
|
||||
```
|
||||
# smem -tk
|
||||
@ -336,13 +336,13 @@ Resident Set Size (RSS) : The standard measure of physical memory (it typically
|
||||
90 1 0 4.8G 5.2G 8.0G
|
||||
```
|
||||
|
||||
### 6) How to Check Memory Usage on Linux Using the top Command
|
||||
### 6) 如何使用 top 命令查看 Linux 内存使用情况
|
||||
|
||||
**[top command][7]** is one of the most frequently used commands by Linux administrators to understand and view the resource usage for a process on a Linux system.
|
||||
**[top 命令][7]** 是一个 Linux 系统的管理员最常使用的用于查看进程的资源使用情况的命令。
|
||||
|
||||
It displays the total memory of the system, current memory usage, free memory and total memory used by the buffers.
|
||||
该命令会展示了系统总的内存量,当前内存使用量,空闲内存量和缓冲区使用的内存总量。
|
||||
|
||||
In addition, it displays total swap memory, current swap usage, free swap memory, and total cached memory by the system.
|
||||
此外,该命令还会展示总的交换空间内存量,当前交换空间的内存使用量,空闲的交换空间内存量和缓存使用的内存总量。
|
||||
|
||||
```
|
||||
# top -b | head -10
|
||||
@ -368,25 +368,25 @@ KiB Swap: 17873388 total, 17873388 free, 0 used. 9179772 avail Mem
|
||||
2174 daygeek 20 2466680 122196 78604 S 0.8 0.8 0:17.75 WebExtensi+
|
||||
```
|
||||
|
||||
### 7) How to Check Memory Usage on Linux Using the htop Command
|
||||
### 7) 如何使用 htop 命令查看 Linux 内存使用情况
|
||||
|
||||
The **[htop command][8]** is an interactive process viewer for Linux/Unix systems. It is a text-mode application and requires the ncurses library, it was developed by Hisham.
|
||||
**[htop 命令][8]** 是一个可交互的 Linux/Unix 系统进程查看器。它是一个文本模式应用,且使用它需要 Hisham 开发的 ncurses库。
|
||||
|
||||
It is designed as an alternative to the top command.
|
||||
该名令的设计目的使用来代替 top 命令。
|
||||
|
||||
This is similar to the top command, but allows you to scroll vertically and horizontally to see all the processes running the system.
|
||||
该命令与 top 命令很相似,但是其允许你可以垂直地或者水平地的滚动以便可以查看系统中所有的进程情况。
|
||||
|
||||
htop comes with Visual Colors, which have added benefits and are very evident when it comes to tracking system performance.
|
||||
htop 命令拥有不同的颜色,这个额外的优点当你在追踪系统性能情况时十分有用。
|
||||
|
||||
You are free to carry out any tasks related to processes, such as process killing and renicing without entering their PIDs.
|
||||
此外,你可以自由地执行与进程相关的任务,比如杀死进程或者改变进程的优先级而不需要其进程号(PID)。
|
||||
|
||||
[![][9]][10]
|
||||
|
||||
### 8) How to Check Memory Usage on Linux Using the glances Command
|
||||
### 8)如何使用 glances 命令查看 Linux 内存使用情况
|
||||
|
||||
**[Glances][11]** is a cross-platform system monitoring tool written in Python.
|
||||
**[Glances][11]** 是一个 Python 编写的跨平台的系统监视工具。
|
||||
|
||||
You can see all information in one place such as CPU usage, Memory usage, running process, Network interface, Disk I/O, Raid, Sensors, Filesystem info, Docker, System info, Uptime, etc,.
|
||||
你可以在一个其中查看所有信息,比如:CPU使用情况,内存使用情况,正在运行的进程,网络接口,磁盘 I/O,RAID,传感器,文件系统信息,Docker,系统信息,运行时间等等。
|
||||
|
||||
![][9]
|
||||
|
@ -0,0 +1,102 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (heguangzhi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (What I learned going from prison to Python)
|
||||
[#]: via: (https://opensource.com/article/20/1/prison-to-python)
|
||||
[#]: author: (Shadeed "Sha" Wallace-Stepter https://opensource.com/users/shastepter)
|
||||
|
||||
我在监狱从 Python 中学到了什么
|
||||
======
|
||||
|
||||
开源编程是如何在入监狱中提供机会的![书架上的编程书籍][1]
|
||||
|
||||
不到一年前,我还在圣昆廷州立监狱服刑,我是无期徒刑。
|
||||
|
||||
我高三的时候,我抢劫了一个人并向他开了枪。现在,我经过一段时间才意识到并承认自己做错了,这是在经历了陪审团审判并看到我的行为带来的恶果后,我知道需要改变自己,我也确实做到了。尽管我对我的行为表示懊悔,但我毕竟开枪打了一个人,并差点杀了他。做这样的事是有后果的,这是理所当然的。所以在我18岁的时候,我被判了终身监禁。
|
||||
|
||||
监狱是一个非常可怕的地方;我是也不向你推荐的。但是我必须去,所以我去了。我不告诉你具体的细节,但你可以放心,这是一个不可能有太多想法的的地方,许多人在这里养成的坏习惯比他们过去在别处养成的更多。
|
||||
|
||||
我是幸运儿。当我在服刑的时候,发生了一些不同的事情。我开始想象自己出狱后的的未来,虽然在这之前,我还是已经度过了我所有的成年生活。
|
||||
|
||||
现在你想想:我是黑人,只受过高中教育。我没有工作经历,如果我离开监狱,在被释放前,我还是一个被定罪的重罪犯。当每个雇主看到我的简历,都不会有“我需要雇用这个人”
|
||||
想法,我认为是正常的。
|
||||
|
||||
我不知道我的选择是什么,但我已经下定决心了。我需要做些活下去的事情,并且这和我入狱前的生活一点也不像。
|
||||
|
||||
### Python 之路
|
||||
|
||||
最终,我被关在了圣昆廷州立监狱,我不知道我在那里有多幸运。圣昆廷提供了几个自助教育编程项目。这些[改造机会][2]帮助囚犯使他们拥有在获释后避免再次犯罪的技能。
|
||||
|
||||
作为其中一个编程项目的一部分,2017年我通过圣昆廷媒体项目认识了[杰西卡·麦凯拉]。杰西卡是编程语言[Pythone][4]的爱好者,她开始向我推荐 Python 有多棒,以及它是刚起步的人学习的完美语言。这就是故事变得比小说更精彩的地方。
|
||||
|
||||
|
||||
> 感谢[@northbaypython][5]让[@ShaStepter][6]和我重复[@pycon][7]的主题演讲,让他们被录制下来。我很荣幸与大家分享:
|
||||
>
|
||||
> 从监狱到 Pythone: https://t.co/rcumoAgZHm
|
||||
>
|
||||
> 大规模裁员:如果我们不雇佣被判重罪的人,谁会呢? https://t.co/fENDUFdxfX [pic.Twitter.com/kpjo8d3ul6][8]
|
||||
>
|
||||
> —杰西卡·麦凯拉(@ jessicamckellar)[2019年11月5日][9]
|
||||
|
||||
杰西卡告诉我一些 Python 视频教程,这些教程是她为一家名叫[O’Reilly Media][10]的公司做的,课程是在线的,如果我能接触到它们,那该有多好呀。不幸的是,在监狱里上网是不可能的。但是,我遇到了一个叫 Tim O’Reilly 的人,他最近刚来到圣昆廷。在他访问之后,Tim 从他的公司 O’Reilly Media 公司向监狱的编程班捐赠了大量内容。最终,我拿到了一款平板电脑,上面有杰西卡的 Python 教程,并学会了如何使用这些Python教程进行编码。
|
||||
|
||||
真是难以置信。背景和生活与我完全不同的陌生人把这些联系在一起,让我学会了编码。
|
||||
|
||||
|
||||
### 对 Python 社区的热爱
|
||||
|
||||
在这之后,我开始经常和杰西卡见面,她开始告诉我关于开源社区的情况。从根本上说,开源社区就是关于伙伴关系和协作的社区。因为没有人被排除在外,所以效果很好。
|
||||
|
||||
对我来说,一个努力寻找我自己的定位的人,我所看到的是一种非常基本的爱——通过合作和接受的爱,通过接触的爱,通过包容的爱。我渴望成为其中的一部分。所以我继续学习Python,不幸的是,我无法获得更多的教程,但是我能够从开源社区编译的大量书面知识中获益。我读过任何提到 Python 的东西,从平装本到晦涩难懂的杂志文章,我使用平板电脑来解决我读到的 Python 问题。
|
||||
|
||||
我对 Python 和编程的热情不是我的许多同龄人所共有的。除了监狱编程课上的极少数人之外,我认识的其他人都没有提到过编程;一般囚犯都不知道。我认为这是因为有过监禁经历的人无法接触编程,尤其是如果你是有色人种。
|
||||
`
|
||||
### 监狱外的 Python 生活
|
||||
|
||||
然而,在2018年8月17日,我得到了生命中的惊喜。杰里·布朗州长将我27年的刑期减为无期徒刑,在服刑近19年后,我被释放出狱了。
|
||||
|
||||
但现实情况是,这也是为什么我认为编程和开源社区如此有价值。我是一名37岁的黑人罪犯,没有工作经历,刚刚在监狱服刑18年。我有犯罪史,并且现存偏见导致没有多少职业适合我。但是编程是少数例外之一。
|
||||
|
||||
监禁后重返社会的人们迫切需要包容,但当谈话转向工作场所的多样性以及对多样性的需求时,你真的听不到这个群体被提及或包容。
|
||||
|
||||
|
||||
> 还有什么:
|
||||
>
|
||||
> 1\. 背景调查:询问他们在你的公司是如何使用的。
|
||||
>
|
||||
> 2\. 初级角色:删除虚假的、不必要的先决条件,这些条件将排除有记录的合格人员。
|
||||
>
|
||||
> 3\. 积极拓展:与当地再就业项目合作,创建招聘渠道。[11]
|
||||
>
|
||||
> —杰西卡·麦凯拉(@ jessicamckellar)[2019年5月12日][12]
|
||||
|
||||
|
||||
因此,我想谦卑地挑战开源社区的所有程序员和成员,让他们围绕包容和多样性展开思考。今天,我自豪地站在你们面前,代表一个大多数人都没有想到的群体——以前被监禁的人。但是我们存在,我们渴望证明我们的价值,最重要的是,我们期待被接受。当我们重返社会时,许多挑战等待着我们,我请求你们允许我们有机会展示我们的价值。欢迎我们,接受我们,最重要的是,包容我们。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/1/prison-to-python
|
||||
|
||||
作者:[Shadeed "Sha" Wallace-Stepter][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[heguangzhi](https://github.com/heguangzhi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/shastepter
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/books_programming_languages.jpg?itok=KJcdnXM2 (Programming books on a shelf)
|
||||
[2]: https://www.dailycal.org/2019/02/27/san-quentin-rehabilitation-programs-offer-inmates-education-a-voice/
|
||||
[3]: https://twitter.com/jessicamckellar?lang=en
|
||||
[4]: https://www.python.org/
|
||||
[5]: https://twitter.com/northbaypython?ref_src=twsrc%5Etfw
|
||||
[6]: https://twitter.com/ShaStepter?ref_src=twsrc%5Etfw
|
||||
[7]: https://twitter.com/pycon?ref_src=twsrc%5Etfw
|
||||
[8]: https://t.co/Kpjo8d3ul6
|
||||
[9]: https://twitter.com/jessicamckellar/status/1191601209917837312?ref_src=twsrc%5Etfw
|
||||
[10]: http://shop.oreilly.com/product/110000448.do
|
||||
[11]: https://t.co/WnzdEUTuxr
|
||||
[12]: https://twitter.com/jessicamckellar/status/1127640222504636416?ref_src=twsrc%5Etfw
|
Loading…
Reference in New Issue
Block a user