Ubuntu 17.10/18.04使用内置指纹识别(联想T440内置Synaptics Validity Sensors)

最近想在自己的联想T440机器上启用内置的指纹识别,具体的执行命令如下:

$ sudo add-apt-repository ppa:fingerprint/fingerprint-gui

$ sudo apt update

$ sudo apt install libbsapi policykit-1-fingerprint-gui fingerprint-gui

$ sudo apt-get install fprintd libpam-fprintd

$ sudo apt install fprint-demo

继续阅读Ubuntu 17.10/18.04使用内置指纹识别(联想T440内置Synaptics Validity Sensors)

ubuntu 16.04系统上开启PHP7的OpCache

目前使用的阿里云服务器是通过阿里云ECS ubuntu 14.04.5 LTS升级到ubuntu 16.04.2 LTS升级上来的,升级之后,一直没有开启PHP 7.0OpCache。以前感觉性能还够用,最近发现有些卡顿现象,因此想到开启OpCache

开启命令如下(PHP-FPM模式):

$ sudo apt install php7.0-opcache

$ sudo phpenmod opcache

# PHP-FPM模式的配置文件
$ FILEPATH="/etc/php/7.0/fpm/php.ini"


# Enable the opcache.
$ SEARCH=";opcache.enable=0"
$ REPLACE="opcache.enable=1"
$ sudo sed -i "s:$SEARCH:$REPLACE:" $FILEPATH


# Set the amount of memory we can use for caching.
# The production server has oooooodles of RAM.
$ SEARCH=";opcache.memory_consumption=64"
$ REPLACE="opcache.memory_consumption=256"
$ sudo sed -i "s:$SEARCH:$REPLACE:" $FILEPATH


# increase the number of files to cache
$ SEARCH=";opcache.max_accelerated_files=2000"
$ REPLACE="opcache.max_accelerated_files=1000000"
$ sudo sed -i "s:$SEARCH:$REPLACE:" $FILEPATH


# Don't bother revalidating files for a long time because
# they should never change.
# Obviously you need to undo this in dev.
$ SEARCH=";opcache.validate_timestamps=1"
$ REPLACE="opcache.validate_timestamps=3000"
$ sudo sed -i "s:$SEARCH:$REPLACE:" $FILEPATH

#重启服务
$ sudo service php7.0-fpm restart

网站响应速度有明显的飞跃。

参考链接


ubuntu 16.04系统minicom退出方法

1)需使用Ctrl+a 进入设置状态
2)按z进入设置菜单
(1)S键:发送文件到目标系统中;
(2)W键:自动卷屏。当显示的内容超过一行之後,自动将後面的内容换行。这个功能在查看内核的啓动信息时很有用。
(3)C键:清除屏幕的显示内容;
(4)B键:浏览minicom的历史显示;
(5)X键:退出mInicom,会提示确认退出。

参考链接


minicom退出方法

minicom保存uart log

使用minicom也有很长时间了,只用minicom抓过uart log,但是从来没有去保存过这个log,也不知道有这个功能。后来在超级终端中发现有这个功能(传送->捕获文字),想想minicom应该也有这个功能才对,后来搜索找到怎么用了,方法如下:

继续阅读minicom保存uart log

CC1310的模拟串口问题

目前在使用TICC13x0系列芯片开发,CC13x0系列的芯片只有一个硬件串口,CC13x2系列的芯片有两个硬件串口。但是目前为止,TICC13x2系列芯片还没有正式量产。

目前使用的是CC1310芯片,正常情况下串口被用来输出调试信息,一般一个串口也是够用了的。但是最近需要增加一个串口的语音合成模块SYN6288,这样一来,一个串口就不怎么够用了。

Google搜索了一下,发现CC1310可以软件模拟出第二个串口出来。

继续阅读CC1310的模拟串口问题