Server benchmark

2016-11-16・linux

file max

lsof

lsof 可以查看文件被打开的情况,或者端口-i:port被使用的情况

file descriptor limit for per process

系统设置打开文件的上限, 通过如下命 …


Linux GPU driver

2012-12-26・linux

lspci 查看显卡

lspci

官方推荐

https://ubuntu.com/server/docs/nvidia-drivers-installation

ubuntu-drivers

Install the metapackage for your kernel flavour (e.g. generic, lowlatency, etc) which is specific to the driver branch (e.g. 535) that you want to install, and whether you want the compute …


Linux network

2012-12-25・linux

netstat/ss

$ # netstat -tnl
$ ss -tnlp # new command
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:8022            0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN
tcp        0      0 …

GDB usage

2012-12-24・linux

编译选项

CPPFLAGS=-DDEBUG CXXFLAGS="-g -O0"

生成可调式的可执行文件,-g 保存调试符号,-O0 不做编译器优化。

启动命令

进入调试窗口

gdb a.out

如果 …


Linux command

2012-12-24・linux

apt

查找找不到的 so 文件

dpkg -S /path/to/file

或者

apt-file search so_name

查找已安装的软件

apt list --installed

tar

-c: 建立压缩档案 -x:解压 -t:查看内容 -r:向压 …


Linux Graphic and VNC

2012-12-24・linux

Graphic

You only need to know 4 terms:

  • Display manager
  • Window Manager
  • Graphical User Interfaces (GUI)
  • Desktop Environments

Display manager

Examples are LightDM, GDM, KDM, and LXDM. They normally have display manager somewhere in their names. These start the X server at boot and provide a login screen. They often …


Linux file permissions and ownership

2012-11-24・linux

特殊权限

Special permissions make up a fourth access level in addition to user, group, and other. Special permissions allow for additional privileges over the standard permission sets (as the name suggests). There is a special permission option for each access level discussed previously. Let's take a look …


Linux kernel and OS

2012-10-24・linux

Linux kernel

The Core Subsystems of the Linux Kernel are as follows:

  • The Process Scheduler
  • The Memory Management Unit (MMU)
  • The Virtual File System (VFS)
  • The Networking Unit
  • Inter-Process Communication Unit

kernel version

Linux内核版本号由3组数字组成:

第一个组数字:内核版本。 第二个组数字 …