2017-02-28 61 views
-1

随着命令我如何列出从“USERABC”开始所有进程的IP?

pgrep -u USERABC | xargs ps -f -p 

top -c -u USERABC 

我们可以通过USERABC看到所有过程starteds。

我们如何看到启动这个过程的IP?

例如,我们发现:

USERABC 28465 25010 0 17:01 ?  S  0:00 /usr/bin/php /home/USERABC/public_html/forum/index.php 

200倍。

那么我们想知道,如果这个过程中来自同一个IP是starteds,也许195是从同一个IP (当时是黑客肯定的是,我们可以阻止这个方向!) 及其他5他人的IP(用户“合法”肯定)。

谢谢。

回答

1

grep您的Web服务器访问URL的日志文件。

实施例:

grep 'forum\/index.php' /var/log/apache2/access_log 
+0

感谢。这是cPanel,然后日志只保存在[/ usr/local/apache/logs]中,但我喜欢find {all process + IP到USERABC},不仅仅是进程: “file XYZ”。 – Stackoverflow