LukeHan 의 잡다한 기술 블로그

프로세스 관리 본문

개발/Bash Script

프로세스 관리

LukeHan1128 2020. 11. 21. 00:27
반응형

사용자 이름으로 실행중인 프로세스 찾기

ps -U user-name -o comm= | sort | uniq
 
pgrep -lU user-name | awk '{print $2}' | sort | uniq

 

 

rdp

smile-user@invesumedemo-92034:~$ ps -ef | grep rdp
root       897     1  0  3월10 ?      00:00:00 /usr/sbin/xrdp-sesman
xrdp       915     1  0  3월10 ?      00:00:03 /usr/sbin/xrdp
xrdp      6391   915  0 01:01 ?        00:00:29 /usr/sbin/xrdp
root      6392   897  0 01:01 ?        00:00:00 /usr/sbin/xrdp-sesman
smile-u+  6394  6392  0 01:01 ?        00:00:12 /usr/lib/xorg/Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log
smile-u+  6404  6392  0 01:01 ?        00:00:00 /usr/sbin/xrdp-chansrv
smile-u+  8003  7215  0 11:34 pts/0    00:00:00 grep --color=auto rdp
 
smile-user@invesumedemo-92034:~$ ps -ef | grep vnc
root      1076     1  0  3월10 ?      00:00:30 /usr/bin/x11vnc -auth guess -forever -noxdamage -repeat -rfbauth /etc/x11vnc/vncpwd -rfbport 5900 -shared
smile-u+  8038  7215  0 11:35 pts/0    00:00:00 grep --color=auto vnc

 

 

vnc

smile-user@invesumedemo-92034:~$ ps -ef | grep rdp
root       897     1  0  3월10 ?      00:00:00 /usr/sbin/xrdp-sesman
xrdp       915     1  0  3월10 ?      00:00:03 /usr/sbin/xrdp
root      6392   897  0 01:01 ?        00:00:00 /usr/sbin/xrdp-sesman
smile-u+  6394  6392  0 01:01 ?        00:00:13 /usr/lib/xorg/Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log
smile-u+  6404  6392  0 01:01 ?        00:00:00 /usr/sbin/xrdp-chansrv
xrdp      8927   915  0 11:39 ?        00:00:00 /usr/sbin/xrdp
root      8945   897  0 11:39 ?        00:00:00 /usr/sbin/xrdp-sesman
smile-u+  8954  8945  0 11:39 ?        00:00:00 /usr/sbin/xrdp-chansrv
smile-u+  9755  9568  0 11:40 pts/0    00:00:00 grep --color=auto rdp
 
smile-user@invesumedemo-92034:~$ ps -ef | grep vnc
root      1076     1  0  3월10 ?      00:00:30 /usr/bin/x11vnc -auth guess -forever -noxdamage -repeat -rfbauth /etc/x11vnc/vncpwd -rfbport 5900 -shared
smile-u+  8947  8945  1 11:39 ?        00:00:00 Xvnc :11 -auth .Xauthority -geometry 1920x1080 -depth 24 -rfbauth /home/smile-user/.vnc/sesman_smile-user_passwd:11 -bs -nolisten tcp -localhost -dpi 96
smile-u+  9791  9568  0 11:40 pts/0    00:00:00 grep --color=auto vnc

 

반응형
Comments