linux中的ps命令状态ss,[Linux]常用命令之【ps/lsof/ss/kill/】

lsof

root@kylin-sdc153:/opt/govern/govern_1/domains/mydomain/logs# sudo lsof -i:6888

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME

java 64812 root 100u IPv4 4135639 0t0 TCP *:6888 (LISTEN)

ss -lnp

root@kylin-sdc153:/opt/govern/govern_1/domains/mydomain/logs# ss -lnp | grep 6888

tcp LISTEN 0 512 *:6888 *:* users:(("java",pid=64812,fd=100))

ps

root@kylin-sdc153:/opt/govern/govern_1/domains/mydomain/logs# ps -ef

UID PID PPID C STIME TTY TIME CMD

...

root 70066 2 0 8月03 ? 00:00:00 [kworker/61:0]

root 70139 2 0 8月03 ? 00:00:00 [kworker/84:2]

root 70146 2 0 8月03 ? 00:00:00 [kworker/91:2]

...

root@kylin-sdc153:/opt/govern/govern_1/domains/mydomain/logs# ps -ef | grep 6888

root 66251 64699 0 10:05 pts/4 00:00:00 grep --color=auto 6888

root@kylin-sdc153:/opt/govern/govern_1/domains/mydomain/logs# ps -ef | grep apusic

root 64713 60453 0 09:59 pts/3 00:00:00 /bin/sh ./startapusic

root 64812 64713 77 09:59 pts/3 00:04:04 /usr/bin/java -Djava.endorsed.dirs=/opt/govern/govern_1/lib/endorsed -Dcom.apusic.domain.home=/opt/govern/govern_1/domains/mydomain -server -Djava.net.preferIPv4Stack=true -Djava.security.egd=file:/dev/./urandom -Xms1024m -Xmx2048m -XX:MaxPermSize=512m -javaagent:/opt/sefon-secure/secure-agent.jar -classpath .:/opt/govern/govern_1/classes:/opt/govern/govern_1/...

2.0.0.jar:/opt/govern/govern_1/lib/ext/*.zip/opt/govern/govern_1/domains/mydomain/lib/*.zip:/opt/govern/govern_1/domains/mydomain/lib/*.jar: com.apusic.server.Main -root /opt/govern/govern_1

...

kill

[杀掉指定PID的进程]

kill -9

推荐文献

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值