Linux 命令点滴

时间:2023-01-11 21:23:32
.linux查看占用内存最多的程序
ps aux|head -;ps aux|grep -v PID|sort -rn -k +|head .查看占用cpu最多的程序
ps aux|head -;ps aux|grep -v PID|sort -rn -k +|head chown -R mysql:mysql /data/mysql_data
chown -R mysql:mysql /usr/local/mysql
/etc/init.d/mysql start

https://dev.mysql.com/doc/mysql-router/8.0/en/mysql-router-server-starting.html

// *** start.sh *********************** //

#!/bin/bash
basedir=/opt/myrouter
ROUTER_PID=$basedir/mysqlrouter.pid /usr/bin/mysqlrouter -c $basedir/mysqlrouter.conf &
disown %- // *** stop.sh *********************** // if [ -f /opt/myrouter/mysqlrouter.pid ]; then
kill -HUP `cat /opt/myrouter/mysqlrouter.pid`
rm -f /opt/myrouter/mysqlrouter.pid
fi
linux中根据进程的PID值来查找执行文件的及其路径
lsof -p PID