突突唧之家

我的疑问 & 我的解决方案

Windows 安全中心基于声誉的保护如果提示有威胁,但是点开发现什么都没有,这是因为该威胁已经由于手动或者其他原因(杀毒/清理类软件)被删除了,而 Windows 安全中心的的提醒里并没有把这个威胁删掉。所以需要我们手动清理一下这个历史记录。

  1. 首先打开 C:\ProgramData\Microsoft\Windows Defender\Scans
  2. 这个时候提示需要系统权限,授权后,继续打开 History\Service\DetectionHistory
  3. 最终路径:C:\ProgramData\Microsoft\Windows Defender\Scans\History\Service\DetectionHistory
  4. 把里面的文件全部删除,即可解决问题。

不能直接复制最终路径,系统会提示无权限打开。

You can check the width of the character using unicodedata.east_asian_width(unichr):

1
2
3
4
5
6
7
8
import unicodedata

for char in string:
status = unicodedata.east_asian_width(char)
if status == 'F':
print('{0} is full-width.'.format(char))
elif status == 'H':
print('{0} is half-width.'.format(char))

It has the following returned values:

1
2
3
4
5
6
7
8
# East_Asian_Width (ea)

ea ; A ; Ambiguous
ea ; F ; Fullwidth
ea ; H ; Halfwidth
ea ; N ; Neutral
ea ; Na ; Narrow
ea ; W ; Wide

Returned values of 'W', 'F' and 'A' should be considered as full-width on Windows.

Reference: http://www.unicode.org/reports/tr44/tr44-4.html#Validation_of_Enumerated

On POSIX platform, the quote characters (u'“' and u'”') are considered as ambiguous, which are actually 1 character width in console. For console usage, you may try a 3rd-party library urwid:

1
2
3
4
5
6
7
>>> from urwid.util import str_util
>>> str_util.get_width(ord(u'x'))
1
>>> str_util.get_width(ord(u'“'))
1
>>> str_util.get_width(ord(u'你'))
2

Just add --web.listen-address=:9100 behind ExecStart=/usr/local/bin/node_exporter in the config file.

It looks like

ExecStart=/usr/local/bin/node_exporter --web.listen-address=:[custum port]

NVIDIA is providing a user-space daemon on Linux to support persistence of driver state across CUDA job runs. The daemon approach provides a more elegant and robust solution to this problem than persistence mode.

NVIDIA will support both solutions for the near future (likely through CUDA 8.0), but will focus all future development and bug fixes on the daemon.

The daemon is installed in /usr/bin, while sample installation and init scripts are included with the driver in the documentation directory. The scripts are provided as a guide for installing the daemon to run on system startup for some common init systems; they may require some changes for certain distributions, due to the wide variety of init system configurations.

NVIDIA encourages customers to shift to this daemon approach at their earliest availability.

Supported Environments

  • Drivers: R319 and higher
  • OSes: All standard driver-supported Linux platforms
  • GPUs: All shipping Tesla, Quadro and GRID products

Implementation Details

On Linux systems running the NVIDIA GPU driver, clients attach a GPU by opening its device file. Conversely, the GPU is detached by closing the device file. The GPU state remains loaded in the driver whenever one or more clients have the device file open. Once all clients have closed the device file, the GPU state will be unloaded unless persistence mode is enabled.

阅读全文 »

这是由于 systemd-timesyncd 被误认为是一个用户 ID 而不是进程名。 使用 ps -ef 命令可以发现该问题。例如:

root     20366   779  0 21:05 ?        00:00:00 [autocleanStatus] <defunct>
root 20385 757 0 21:05 ? 00:00:00 sshd: git [priv]
<long hang>
62583 20396 1 2 21:06 ? 00:00:00 /lib/systemd/systemd-timesyncd

要解决该问题,一般重启即可。 也可以禁用 systemd-timesyncd 服务。

sudo systemctl stop systemd-timesyncd
sudo systemctl disable systemd-timesyncd

要想恢复被禁用的服务,可以使用:

sudo systemctl enable systemd-timesyncd
sudo systemctl start systemd-timesyncd

在使用 Dell 服务器的过程中,如果可以进入系统,但是忘记 iDRAC 卡的地址,可以使用 ipmitool 这个工具来获取一下硬件信息,从而获得 iDRAC 地址。

IPMI(Intelligent Platform Management Interface)即智能平台管理接口,是使硬件管理具备“智能化”的新一代通用接口标准。 用户可以利用 IPMI 监视服务器的物理特征,如温度、电压、电扇工作状态、电源供应以及机箱入侵等。

安装 impitool

sudo apt install impitool

配置启用:

sudo modprobe ipmi_msghandler
sudo modprobe ipmi_devintf
sudo modprobe ipmi_si

接着,使用如下命令查看 iDRAC 地址:

ipmitool lan print

解决办法

使用 chattr 删除 ia 参数:

chattr -ia files...

chattr 命令

chattr 命令用于改变文件属性,这些属性共有以下8种模式:

  • a 让文件或目录仅供附加用途。
  • b 不更新文件或目录的最后存取时间。
  • c 将文件或目录压缩后存放。
  • d 将文件或目录排除在倾倒操作之外。
  • i 不得任意更动文件或目录。
  • s 保密性删除文件或目录。
  • S 即时更新文件或目录。
  • u 预防意外删除。

注意:文件属性为 a 时,追加文件内容需要使用 echo 命令,不能使用 vim。 原因是 vim 会生成新的文件,echo 是在源文件上追加。

语法

chattr [ -RVf ] [ -v version ] [ -p project ] [ mode ] files...

参数

  • -R 递归处理,将指定目录下的所有文件及子目录一并处理。
  • -V 显示指令执行过程。
  • -f 忽略大多数错误信息。
  • -v version 设置文件或目录版本。
  • -p project 设置文件或目录项目编号。
  • +<mode> 开启文件或目录的该项属性。
  • -<mode> 关闭文件或目录的该项属性。
  • =<mode> 指定文件或目录的该项属性。

Start Cron Service

To start the cron service, use:

sudo /etc/init.d/cron start

OR

sudo service cron start

Stop Cron Service

To stop the cron service, use:

sudo /etc/init.d/cron stop

OR

sudo service cron stop

Restart Cron Service

To restart the cron service, use:

sudo /etc/init.d/cron restart

OR

sudo service cron restart

conda clean

Remove unused packages and caches.

Options:

usage: conda clean [-h] [-a] [-i] [-p] [-t] [-f]
[-c [TEMPFILES [TEMPFILES ...]]] [-l] [-d] [--json] [-q]
[-v] [-y]

Removal Targets

-a, --all

Remove index cache, lock files, unused cache packages, and tarballs.

-i, --index-cache

Remove index cache.

-p, --packages

Remove unused packages from writable package caches.

This does not check for packages installed using symlinks back to the package cache.

-t, --tarballs

Remove cached package tarballs.

-f, --force-pkgs-dirs

Remove all writable package caches. This option is not included with the --all flag.

This will break environments with packages installed using symlinks back to the package cache.

-c, --tempfiles

Remove temporary files that could not be deleted earlier due to being in-use. Argument is path(s) to prefix(es) where files should be found and removed.

-l, --logfiles

Remove log files.

阅读全文 »