西维蜀黍

【Linux】tmux

通过SSH远程连接到服务器,无法开启多个终端,只能再次ssh连接一次。那么问题来了,怎么通过ssh连接Linux,使用多个终端呢

  ...


【Linux】命令 - top

Meaning

  • PID: Shows task’s unique process id.

  • PR: Stands for priority of the task.

  • NI: Represents a Nice Value of task. A Negative nice value implies higher priority, and positive Nice value means lower priority.

  • VIRT, RES, SHR and %MEM: These three fields are related with to memory consumption of the processes.

    • “VIRT”: Virtual Memory Size (KiB)
      • The total amount of virtual memory used by the task. It includes all code, data and shared libraries plus pages that have been swapped out and pages that have been mapped but not used.
    • “RES” is the physical memory consumed by the process in RAM
    • “%MEM”: A task’s currently resident share of available physical memory.
    • SHR: Represents the Shared Memory size (kb) used by a task.
  • TIME+: CPU Time, the same as ‘TIME’, but reflecting more granularity through hundredths of a second.

  • COMMAND: The COMMAND column shows the name of the processes.

  ...


【Kubernetes】管理 Container - crictl

List pods

List all pods:

$ crictl pods
POD ID              CREATED              STATE               NAME                         NAMESPACE           ATTEMPT
926f1b5a1d33a       About a minute ago   Ready               sh-84d7dcf559-4r2gq          default             0
4dccb216c4adb       About a minute ago   Ready               nginx-65899c769f-wv2gp       default             0
a86316e96fa89       17 hours ago         Ready               kube-proxy-gblk4             kube-system         0
919630b8f81f1       17 hours ago         Ready               nvidia-device-plugin-zgbbv   kube-system         0
  ...


【Distributed System】一致性模型(Consistency Model)

Consistency Model

In computer science, consistency models are used in distributed systems like distributed shared memory systems or distributed data stores (such as filesystems, databases, optimistic replication systems or web caching). The system is said to support a given model if operations on memory follow specific rules.

The data consistency model specifies a contract between programmer and system, wherein the system guarantees that if the programmer follows the rules, memory will be consistent and the results of reading, writing, or updating memory will be predictable. This is different from coherence, which occurs in systems that are cached or cache-less, and is consistency of data with respect to all processors. Coherence deals with maintaining a global order in which writes to a single location or single variable are seen by all processors. Consistency deals with the ordering of operations to multiple locations with respect to all processors.

  ...


【Database】ACID

Transactions

A transaction is a way for an application to group several reads and writes together into a logical unit. Conceptually, all the reads and writes in a transaction are executed as one operation: either the entire transaction succeeds (commit) or it fails (abort, rollback). If it fails, the application can safely retry. With transactions, error handling becomes much simpler for an application, because it doesn’t need to worry about partial failure—i.e., the case where some operations succeed and some fail (for whatever reason).

ACID

A transaction is a single logical unit of work which accesses and possibly modifies the contents of a database. Transactions access data using read and write operations.

In computer science, ACID (atomicity, consistency, isolation, durability) is a set of properties of database transactions intended to guarantee data validity despite errors, power failures, and other mishaps. In the context of databases, a sequence of database operations that satisfies the ACID properties (which can be perceived as a single logical operation on the data) is called a transaction.

For example, a transfer of funds from one bank account to another, even involving multiple changes such as debiting one account and crediting another, is a single transaction.

  ...