ps aux | grep xxx,查看进程
2025-05-09
ps aux | grep xxx,查看进程
ps aux | grep binance
ps aux | grep binance-cli <<<
debian 2046822 0.0 0.0 556404 6912 pts/11 Sl+ 06:44 0:00 /home/debian/文档/shell/binance/a_Rust/binance/target/release/binance-cli --api-key Nif --secret-key j7YatxOmnMv --module daemon
debian 2103607 0.0 0.0 12324 2432 pts/17 S+ 06:50 0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox --exclude-dir=.venv --exclude-dir=venv binance-cli
- 如上面显示第一行是进程号,也就是2046822,
- 第二行是grep临时进程,需要忽略
查看所有线程
top -H -p 2046822
top - 06:58:23 up 2 days, 3:48, 6 users, load average: 0.26, 0.72,
Threads: 9 total, 0 running, 9 sleeping, 0 stopped, 0 zombie
%Cpu(s): 7.9 us, 7.6 sy, 0.0 ni, 84.4 id, 0.1 wa, 0.0 hi, 0.1 si
MiB Mem : 15949.9 total, 679.4 free, 9672.0 used, 5598.5 buff/
MiB Swap: 2048.0 total, 35.3 free, 2012.7 used. 5926.8 avail
进程号 USER PR NI VIRT RES SHR %CPU %MEM
2046822 debian 20 0 556404 6912 5760 S 0.0 0.0
2046826 debian 20 0 556404 6912 5760 S 0.0 0.0
2046827 debian 20 0 556404 6912 5760 S 0.0 0.0
2046828 debian 20 0 556404 6912 5760 S 0.0 0.0
2046829 debian 20 0 556404 6912 5760 S 0.0 0.0
2046830 debian 20 0 556404 6912 5760 S 0.0 0.0
2046831 debian 20 0 556404 6912 5760 S 0.0 0.0
2046832 debian 20 0 556404 6912 5760 S 0.0 0.0
2046833 debian 20 0 556404 6912 5760 S 0.0 0.0
- RES = 占用物理内存6.9M