查看进程端口,进程号,占用内存
2018-02-12 09:34
495 查看
1:在命令行提示符执行top命令
2:输入大写M,结果按内存占用降序排序;输入大写P,则结果按CPU占用降序排序。(注:大写P可以在capslock状态输入p,或者按Shift+p)
3: ll /proc/12401 查看进程pid对应的全路径
4,ps -ef|grep 12401
#查看进程占用物理内存
cat /proc/$PID/status | grep RSS
$PID=ps aux | grep weblogic.Name=bi_server1 | awk '{print $2;}' |head -1
cat /proc/45570/status | grep RSS
VmRSS: 15,960,752 kB
#查看系统内存使用情况
free -m (内存) (free -g)
-- 查看占用了某端口的进程号
netstat -ntulp | grep port
netstat -ntulp | grep 50000
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 10.35.66.179:50000 0.0.0.0:* LISTEN 23185/java
-- 查看进程路径
ps -ef|grep 23185
-- 查看程序进程号
ps -ef|grep check_sentosa_service|grep -v grep |awk '{printf $2}'
-- 查看java进程
jps
nohup ./check_sentosa_service.sh >>check_sentosa_service.log &
查看所有用户下的定时任务
for u in `cat /etc/passwd | cut -d":" -f1`;do crontab -l -u $u;done
2:输入大写M,结果按内存占用降序排序;输入大写P,则结果按CPU占用降序排序。(注:大写P可以在capslock状态输入p,或者按Shift+p)
3: ll /proc/12401 查看进程pid对应的全路径
4,ps -ef|grep 12401
#查看进程占用物理内存
cat /proc/$PID/status | grep RSS
$PID=ps aux | grep weblogic.Name=bi_server1 | awk '{print $2;}' |head -1
cat /proc/45570/status | grep RSS
VmRSS: 15,960,752 kB
#查看系统内存使用情况
free -m (内存) (free -g)
-- 查看占用了某端口的进程号
netstat -ntulp | grep port
netstat -ntulp | grep 50000
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 10.35.66.179:50000 0.0.0.0:* LISTEN 23185/java
-- 查看进程路径
ps -ef|grep 23185
-- 查看程序进程号
ps -ef|grep check_sentosa_service|grep -v grep |awk '{printf $2}'
-- 查看java进程
jps
nohup ./check_sentosa_service.sh >>check_sentosa_service.log &
查看所有用户下的定时任务
for u in `cat /etc/passwd | cut -d":" -f1`;do crontab -l -u $u;done
相关文章推荐
- Dos命令查看端口占用及关闭进程
- Linux如何查看端口被哪个进程占用?
- 查看LINUX进程内存占用情况
- Mac 查看端口被占用&删除进程
- Windows查看端口占用及杀掉进程
- Linux下查看端口占用进程号,程序名的方法
- linux 查看进程内存占用
- linux 查看进程占用内存
- linux如何查看端口被哪个进程占用
- windows查看端口占用以及关闭相应的进程
- Window 通过cmd查看端口占用、相应进程、杀死进程等的命令
- Windows 如何查看本地端口被进程占用的情况?
- linux下查看进程占用端口和端口占用进程命令
- Linux 查看进程占用端口命令
- macOS - 查看端口被占用,并杀死进程
- 查看端口占用并结束进程
- window 系统查看端口被哪些进程占用了
- Mac系统查看端口占用和杀死进程
- windows 查看端口占用进程
- linux查看占用内存多的进程