西维蜀黍

【Linux】网络管理

相关command

  • ifup
  • ifdown
  • netstat
  • route
  • ip
  ...


【FreeBSD】读取CPU 温度

View

$ sysctl -a | grep temperature
hw.acpi.thermal.tz1.temperature: 29.9C
hw.acpi.thermal.tz0.temperature: 27.9C
dev.cpu.7.temperature: 39.0C
dev.cpu.6.temperature: 39.0C
dev.cpu.5.temperature: 42.0C
dev.cpu.4.temperature: 42.0C
dev.cpu.3.temperature: 49.0C
dev.cpu.2.temperature: 49.0C
dev.cpu.1.temperature: 46.0C
dev.cpu.0.temperature: 46.0C
  ...


【FreeBSD】压力测试

stress

It is a simple workload generator for POSIX systems. It imposes a configurable amount of CPU, memory, I/O, and disk stress on the system. It is written in C, and is free software licensed under the GPLv2. It is not a benchmark, but is rather a tool designed

  ...


【FreeBSD】资源使用查看

View Network Traffic

# Network Throughput
$ systat -ifs
                    /0   /1   /2   /3   /4   /5   /6   /7   /8   /9   /10
     Load Average   ||

      Interface           Traffic               Peak                Total
            lo0  in      0.391 KB/s          0.391 KB/s          341.838 KB
                 out     0.391 KB/s          0.391 KB/s          341.838 KB

            aq0  in    117.038 MB/s        117.038 MB/s           10.210 GB
                 out     2.935 MB/s          2.935 MB/s          261.974 MB
  ...


【FreeBSD】网络管理

netstart

SYNOPSIS

$ /etc/netstart	[[-n] interface ...]

DESCRIPTION

netstart is the command script that is invoked by rc(8) during an automatic reboot and after single-user mode is exited; it performs network initialization.

The netstart script can also be used to start newly created bridges or interfaces, or reset existing interfaces to their default state. The behaviour of this script is (or can be) controlled to some extent by variables defined in rc.conf(8), which specifies which daemons and services are to be run.

  ...


【FreeBSD】包管理

Packages and Ports: Adding Software in FreeBSD

FreeBSD provides two methods for installing applications: binary packages and compiled ports. Each method has its own benefits:

Binary Packages

  • Faster installation as compared to compiling large applications.
  • Does not require an understanding of how to compile software.
  • No need to install a compiler.
  ...


【FreeBSD】Jail 管理

管理 Jail Instance

$ iocage list
+------+---------+-------+--------------+---------------+
| JID  |  NAME   | STATE |   RELEASE    |      IP4      |
+======+=========+=======+==============+===============+
| 1    | SWJail  | up    | 12.2-RELEASE | 192.168.18.70 |
+------+---------+-------+--------------+---------------+
| None | SWJail2 | down  | 12.2-RELEASE | DHCP          |
+------+---------+-------+--------------+---------------+
| None | SWJail3 | down  | 12.2-RELEASE | 192.168.18.71 |
+------+---------+-------+--------------+---------------+
  ...


【FreeBSD】安装 Aquantia AQtion 10G 网卡驱动

Knowledge

If the driver for the NIC is not present in GENERIC, but a driver is available, the driver will need to be loaded before the NIC can be configured and used. This may be accomplished in one of two ways:

  • The easiest way is to load a kernel module for the NIC using kldload(8). To also automatically load the driver at boot time, add the appropriate line to /boot/loader.conf. Not all NIC drivers are available as modules.
  • Alternatively, statically compile support for the NIC into a custom kernel. Refer to /usr/src/sys/conf/NOTES, /usr/src/sys/*arch*/conf/NOTES and the manual page of the driver to determine which line to add to the custom kernel configuration file. For more information about recompiling the kernel, refer to Chapter 8, Configuring the FreeBSD Kernel. If the NIC was detected at boot, the kernel does not need to be recompiled.
  ...


【FreeBSD】FreeBSD 管理

Operation

Check FreeBSD Version

# Display the FreeBSD version and patch level of the installed system
$ freebsd-version

# Get information about the system including FreeBSD version
$ uname -mrs
  ...


【NAS】TrueNAS 折腾

Install TrueNAS

https://www.truenas.com/docs/hub/initial-setup/install/firsttimeinstall/#hardware-requirements

https://www.youtube.com/watch?v=iaIezpQsaOE&t=989s

Init OS

  • 设置时区:System - Genral
  • 设置TrueNAS的名字:Network - Global Configuration

给 SMB 增加一个 User,因为不能用 root 登录 SMB。

  ...