-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
常用Linux命令 #17
Comments
scp
rz/sz
|
查看 Linux 系统信息
查看 CPU 指令支持情况
使用 inxi 查看服务器整体信息
[root@localhost ~]# inxi -F
System: Host: localhost.localdomain Kernel: 5.12.10-1.el7.elrepo.x86_64 x86_64 bits: 64 Console: tty pts/3
Distro: CentOS Linux release 7.4.1708 (Core)
Machine: Type: Desktop System: Inspur product: SA5248 v: 00001 serial: 215327120-D
Mobo: Inspur model: SA5248 serial: N/A BIOS: American Megatrends v: 3.0.1 date: 01/12/2015
CPU: Info: 2x 6-Core model: Intel Xeon E5-2420 v2 bits: 64 type: MT MCP SMP cache: L2: 30 MiB
Speed: 1197 MHz min/max: 1200/2700 MHz Core speeds (MHz): 1: 1197 2: 1197 3: 1266 4: 1197 5: 1198 6: 1197 7: 1198
8: 1197 9: 1197 10: 1197 11: 1214 12: 1198 13: 1197 14: 1197 15: 1197 16: 1198 17: 1227 18: 1197 19: 1197 20: 1197
21: 1198 22: 1198 23: 1257 24: 1414
Graphics: Device-1: ASPEED Graphics Family driver: ast v: kernel
Display: server: X.org 1.19.3 driver: loaded: modesetting unloaded: fbdev,vesa
Message: Advanced graphics data unavailable for root.
Audio: Message: No Device data found.
Sound Server-1: PulseAudio v: 10.0 running: yes
Network: Device-1: Mellanox MT27500 Family [ConnectX-3] driver: mlx4_core
IF: ib0 state: up speed: 10000 Mbps duplex: full mac: 80:00:02:08:fe:80:00:00:00:00:00:00:f4:52:14:03:00:7c:44:71
Device-2: Intel I350 Gigabit Network driver: igb
IF: enp7s0f0 state: up speed: 1000 Mbps duplex: full mac: d4:3d:7e:6e:c3:d6
Device-3: Intel I350 Gigabit Network driver: igb
IF: enp7s0f1 state: down mac: d4:3d:7e:6e:c3:d7
IF-ID-1: virbr0 state: down mac: 52:54:00:79:b8:77
IF-ID-2: virbr0-nic state: down mac: 52:54:00:79:b8:77
RAID: Hardware-1: LSI Logic / Symbios Logic MegaRAID SAS 2108 [Liberator] driver: megaraid_sas
Drives: Local Storage: total: 501.94 GiB used: 80.33 GiB (16.0%)
ID-1: /dev/sda model: MRSASRoMB-8i size: 223.06 GiB
ID-2: /dev/sdb model: MRSASRoMB-8i size: 278.88 GiB
Partition: ID-1: / size: 49.98 GiB used: 23.97 GiB (48.0%) fs: xfs dev: /dev/dm-0
ID-2: /boot size: 1014 MiB used: 224.3 MiB (22.1%) fs: xfs dev: /dev/sdb1
ID-3: /home size: 199.88 GiB used: 56.14 GiB (28.1%) fs: xfs dev: /dev/dm-2
Swap: ID-1: swap-1 type: partition size: 27.89 GiB used: 0 KiB (0.0%) dev: /dev/dm-1
Sensors: Message: No ipmi sensors data was found.
System Temperatures: lm-sensors cpu: 34.0 C mobo: N/A
Fan Speeds (RPM): lm-sensors N/A
Info: Processes: 375 Uptime: 7d 2h 15m Memory: 62.88 GiB used: 2.44 GiB (3.9%) Shell: Bash inxi: 3.3.03 查看 Linux 性能情况参考链接查看磁盘信息
NVMesmartmontool
nvme-cli
NVMe SSD smart 信息参数解释
|
SSH 相关
|
查看Linux开机关机日志
定时任务
|
内存缓存
blktrace
|
iscsi Test
Python 命令
|
存储系统性能测试指标介绍
常用工具FIO 常用命令参数说明
|
网络性能监控测试
IB
常见网络问题iftop 抓包
|
正向代理
|
防火墙iptables
|
系统相关
|
x |
服务器安全相关局域网内挖矿病毒的排查定位网内被劫持的机器
找到源头机器之后查看其他影响机器
连接机器查找相关劫持病毒信息 |
grepGrammer
Parameters
|
tarParameters
tar -cf all.tar *.jpg // 将所有.jpg的文件打成一个名为all.tar的包
tar -rf all.tar *.gif // 将所有.gif的文件增加到all.tar的包里面去
tar -uf all.tar logo.gif // 更新原来tar包all.tar中logo.gif文件
tar -tf all.tar // 列出all.tar包中所有文件
tar -xf all.tar // 解出all.tar包中所有文件
tar –cvf jpg.tar *.jpg //将目录里所有jpg文件打包成jpg.tar
tar –czf jpg.tar.gz *.jpg //将目录里所有jpg文件打包成jpg.tar后,并且将其用gzip压缩,生成一个gzip压缩过的包,命名为jpg.tar.gz
tar –cjf jpg.tar.bz2 *.jpg //将目录里所有jpg文件打包成jpg.tar后,并且将其用bzip2压缩,生成一个bzip2压缩过的包,命名为jpg.tar.bz2
tar –cZf jpg.tar.Z *.jpg //将目录里所有jpg文件打包成jpg.tar后,并且将其用compress压缩,生成一个umcompress压缩过的包,命名为jpg.tar.Z
rar a jpg.rar *.jpg //rar格式的压缩,需要先下载rar for linux
zip jpg.zip *.jpg //zip格式的压缩,需要先下载zip for linux
tar –xvf file.tar //解压 tar包
tar -xzvf file.tar.gz //解压tar.gz
tar -xjvf file.tar.bz2 //解压 tar.bz2
tar –xZvf file.tar.Z //解压tar.Z
unrar e file.rar //解压rar
unzip file.zip //解压zip |
文件操作
rmGrammer
Parameters
rm -r * //Delete all files in this directory. chmodGrammer
Parameters
其他参数说明:
chmod u+x ex1.py
chmod 777 file |
dmesgGrammer
Parameters -C, --clear clear the kernel ring buffer dmesg -T | tail |
new |
gcc1、预处理,生成 .i 的文件[预处理器cpp] Parameters
gcc mysql-connect.c -o mysql-connect -I/usr/include/mysql -L/usr/lib64/mysql -lmysqlclient |
curl |
sed
Grammer
Parameters
Cases以行为单位的增加/删除
|
Linux 用户管理option用户管理相关
密码管理相关
命令
|
Tmux
|
NFSFor server
For Client
|
ps
Grammer
Parameters
-A //List all processes
-w //Show more info of processes
-au //Show more details of processes
-aux //Show all processes which is used by others.
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
START: 行程开始时间
TIME: 执行的时间
COMMAND:所执行的指令
ps aux|grep 'procee-name' | grep -v grep // Check the running info of given prorcess name except grep itself.
The text was updated successfully, but these errors were encountered: