Sometimes we need to know exactly how our Linux system is using memory. In this article we will look at how to use the free command line program to see how memory is being used on a Linux system. We will clearly define the difference between free free memory and free memory on a Linux system.
Understanding free memory and available memory What is free memory and how is it different from available memory?
The seq command in Linux
The seq command is an abbreviation for sequence and is used to print a sequence of numbers in increasing or decreasing order. In other words, it prints a range of specified values. The numbers can be integers or real numbers with decimal points, or negative numbers. You can also specify the upper or lower limit of the sequence, etc.
In this tutorial, we will explain how to use the seq command and seq common command options, such as printing a sequence of numbers up to the upper limit, printing a specified value between the lower and upper digits, printing a sequence with custom increments, printing a sequence in decreasing or inverted order, printing a sequence with the same number of digits, printing a sequence in a specified format, printing a sequence using a specified separator, and finally we give you a practical application example for your reference.
In-depth understanding of useState
Why don’t function components before react 16 have state? As you know, function components did not have state before react 16, and component state could only be passed through props. Write two simple components, a class component and a function component. 1 2 3 4 5 6 7 8 9 10 11 12 13 const App = () =><span>123</span>; class App1 extends React.Component { constructor(props) { super(props); this.state = {
Ditching the Official Site, Python Migrates All Bugs to GitHub
Previously, the Python development team has been submitting, tracking, and handling bugs on the official Python bug site https://bugs.python.org/ (abbreviated as bpo or BPO), which uses the open source tool Roundup as a bug tracker.
On February 18, Python core developer Łukasz Langa announced on the Python Discourse forum: All bug data on Roundup / BPO will be migrated to GitHub, and when the migration is complete new bugs will be handled in GitHub Issues, and the former official BPO site will exist in read-only mode to avoid a host of problems caused by broken links.
Go development team leader criticizes AWS article for being seriously misleading about Go
The incident started with a blog post by AWS a few days ago: “Sustainability with Rust”.
In this article, AWS compares Rust and Go as examples. AWS believes the reason for this is that Go is a garbage collection (GC) language, so when objects are created and released, the garbage collector needs to stop the program every once in a while and run a garbage collection. When the garbage collector is running, the process cannot respond to requests.
Usage of Guava Cache
Preface “Caching” has always been one of the most talked about technologies among programmers, such as Redis, Encache, and Guava Cache. It’s important to acknowledge that Redis distributed caching is the most popular caching technology today, both in terms of interviewing and frequency of use, but from my personal project experience, local caching is also a very common technology. There are many articles analyzing Redis caching, such as Redis avalanche,
Linux Performance: Why you should add swap space
We know that using Linux swap space instead of RAM (memory) can seriously degrade performance. So, one might ask, since I have enough available memory, wouldn’t it be better to remove the swap space? The short answer is no. Enabling swap space brings performance benefits, even if you have more than enough RAM.
Even with enough server memory installed, you will often find that you will use swap space after a long period of normal operation.
How to find all the information about Linux commands like a pro
One of the most common problems encountered by newcomers is how to find the Linux command path that was just installed on Linux using a package manager (e.g. the apt command). There are many developers from the Windows world. Many of them are first time Linux users. Some use Linux with WSL and some deal with cloud servers directly via ssh. Let’s look at some common commands to list or
Difference between IPv4 and IPv6
In today’s technological age, we have witnessed a huge leap in the use of Internet and networked devices. Every home has a laptop, smartphone, digital watch, IoT devices, home automation components and other devices connected to the home network or the Internet. Devices communicate with each other over a variety of network protocols, of which TCP and IP are the most commonly used. Each device connected to the network must have an IP address that identifies the device on the network.
Linux System Programming -(pthread) Thread Creation and Usage
This article describes the basic use of threads on Linux. 1. Preface Difference between threads and processes (1) Process: It is the smallest unit of OS scheduling. ps, top, etc. commands can be used to view the details of processes under Linux. (2) Thread: It is the smallest unit of process scheduling, each process has a main thread. The main thing to do in the process is the thread. (3)
2021 JavaScript Survey: The Year of Vite, Esbuild, TypeScript Adoption Grows Significantly
The StateOfJS 2021 State of JavaScript Survey reports that JavaScript is in a much better state than it was in 2016. When the first State of JS survey was conducted, TypeScript usage was only 21%; today it is 69%. This is followed by Elm at 2.4 percent, Flow at 1.7 percent, and CoffeeScript at 1.4 percent.
The report was actually delayed to 2022 due to the large number of matters in 2021.
Musk: I'm a Rust fan, but would choose C for performance
Greg Brockman, CTO of OpenAI, a nonprofit artificial intelligence research company, today posted a tweet about “error messages” in programming, saying that one of the most underappreciated skills in programming is writing friendly error messages. Greg believes that a good error message should be self-explanatory and have three main points:
what the user did. what acceptable inputs are. how to fix the problem. Musk also commented on his opinion in this tweet, which he fully agrees with, and also said that compilers for programming languages could be better because not enough is currently being invested in them.
Trickster Usage
Introduction Trickster is comcast’s open source HTTP reverse proxy cache that speeds up TSDB (time series databases, such as Prometheus) queries. Purpose Use Trickster to proxy Prometheus in a k8s cluster to verify that Trickster can speed up Grafana queries. Note: Prometheus and Grafana are already deployed in the cluster Installation According to the official documentation, Trickster provides the following installation methods. Docker k8s Helm Source code installation For this
Go Modules - checksum mismatch error resolution
Problem Description After executing go clean -modcache locally, executing go mod download gives the following error.
1 2 3 4 verifying git.xxx.com/neirong/app-framework@v0.7.8/go.mod: checksum mismatch downloaded: h1:/8A+C1sjRPdK/06I7b2egOVjo8+ECKV3vJ3Cqz5vEzc= go.sum: h1:7HfHuMOcinPkTDMNEf6Otcy4+TBvDQ/+f2UO0N23l3o= SECURITY ERROR If you encounter a checksum mismatch error, delete go.sum, execute go clean -modcache, and then execute go mod download. That’s what I did, and after that, no more errors were reported. When I commit the new go.sum file to GitLab, I get the same error when I run it to lint.
Forced deletion of the k8s terminating state namespace
When deleting a namespace, the delete operation is interrupted when it is not completely deleted, and the namespace is in the terminating state. One solution is to delete again with the --force option after the command, e.g.
1 kubectl delete ns <terminating-namespace> --force But it often doesn’t work, so you need to use the interface to delete the namespace.
First, export the namespace information for the terminating state to a json file.
Deploy Jenkins services using Docker
This article documents the process of building a Jenkins service from scratch using Docker.
Before you start This article assumes that you already have some basic knowledge of Linux, command line operations, ssh, and other tools.
Installing Docker Docker offers unprecedented ease of deployment of services, and an introduction to it can be found at official website.
To install Docker, just follow the steps, here is the link to the official tutorial.
Vim Core Maintainer Sven Guckes Dies, Father of Vim: Version 9.0 Will Be Dedicated to Him
Bram Moolenaar, the father of Vim, has announced the death of core maintainer Sven Guckes on the mailing list.
Sven Guckes died on February 20, 2022 in Berlin, according to the body of the email. He was diagnosed with a brain tumor in December 2021, and because there was nothing surgeons could do about it, Sven was transferred to a hospice at the end of January, where a group of friends accompanied Sven through his final days.
Yelled at by multiple insults, father of Swift officially quits Swift core team
The official Swift announcement announced that the core team is currently looking at reorganizing the project’s leadership to allow more community members to actively participate in the project’s management, and confirmed that Chris Lattner, the father of Swift and founder of the LLVM project, is leaving the core team. The announcement also confirms the departure of Chris Lattner, the father of Swift and founder of the LLVM project, who has been developing the Swift programming language since 2010 while working at Apple, but left the company five years ago.
GlusterFS Deployment Brief
This article describes the process of deploying Gluster FS on Debian 10 (Buster) from an experimental point of view, trying to make the steps easy and able to be done quickly by one person. To achieve this, this article tries to use packages from the official Debian repo, avoiding compilation, and uses ansible to execute commands uniformly.
Before you start What is Gluster FS An excerpt from the official GlusterFS website.
What is the Sigstore project?
Sigstore is the latest project of Linux Foundation, which is a new model of software signature based on Certificate Transparency Log.
Sigstore solves the problem of keeping private keys caused by traditional PGP signatures, it has excellent openness and scalability, and is known as the Let’s Encrypt of software signatures.
TL;DR Briefly, what the Sigstore project implements is to record the information of each signature through the Certificate Transparency Log, and end users query the Log and verify it when they need to use it.