bashy
03-24-2007, 09:06 PM
Hi
I am on a freebsd server but found this article for a linux server, is there a command similar to this for the freebsd servers please?
Look at the PID of the process using the most resources. Then use "ls -alh /proc/PID".
Ya'll get something like:
root@server02 [/]# ls -alh /proc/10231
total 0
dr-xr-xr-x 3 nobody nobody 0 Jan 17 15:35 ./
dr-xr-xr-x 144 root root 0 Dec 29 09:48 ../
-r--r--r-- 1 root root 0 Jan 17 15:35 cmdline
-r--r--r-- 1 root root 0 Jan 17 15:35 cpu
lrwxrwxrwx 1 root root 0 Jan 17 15:35 cwd -> /home/USERNAME/public_html/
-r-------- 1 root root 0 Jan 17 15:35 environ
lrwxrwxrwx 1 root root 0 Jan 17 15:35 exe -> /usr/local/apache/bin/httpd*
dr-x------ 2 root root 0 Jan 17 15:35 fd/
-r-------- 1 root root 0 Jan 17 15:35 maps
-rw------- 1 root root 0 Jan 17 15:35 mem
-r--r--r-- 1 root root 0 Jan 17 15:35 mounts
lrwxrwxrwx 1 root root 0 Jan 17 15:35 root -> //
-r--r--r-- 1 root root 0 Jan 17 15:35 stat
-r--r--r-- 1 root root 0 Jan 17 15:35 statm
-r--r--r-- 1 root root 0 Jan 17 15:35 status
The cwd -> will tell you what folder is being accessed. That should let you know what user.
You can also from SSH on Cpanel boxes use something like "lynx localhost/whm-server-status" to see connections to specific URLs.
I am on a freebsd server but found this article for a linux server, is there a command similar to this for the freebsd servers please?
Look at the PID of the process using the most resources. Then use "ls -alh /proc/PID".
Ya'll get something like:
root@server02 [/]# ls -alh /proc/10231
total 0
dr-xr-xr-x 3 nobody nobody 0 Jan 17 15:35 ./
dr-xr-xr-x 144 root root 0 Dec 29 09:48 ../
-r--r--r-- 1 root root 0 Jan 17 15:35 cmdline
-r--r--r-- 1 root root 0 Jan 17 15:35 cpu
lrwxrwxrwx 1 root root 0 Jan 17 15:35 cwd -> /home/USERNAME/public_html/
-r-------- 1 root root 0 Jan 17 15:35 environ
lrwxrwxrwx 1 root root 0 Jan 17 15:35 exe -> /usr/local/apache/bin/httpd*
dr-x------ 2 root root 0 Jan 17 15:35 fd/
-r-------- 1 root root 0 Jan 17 15:35 maps
-rw------- 1 root root 0 Jan 17 15:35 mem
-r--r--r-- 1 root root 0 Jan 17 15:35 mounts
lrwxrwxrwx 1 root root 0 Jan 17 15:35 root -> //
-r--r--r-- 1 root root 0 Jan 17 15:35 stat
-r--r--r-- 1 root root 0 Jan 17 15:35 statm
-r--r--r-- 1 root root 0 Jan 17 15:35 status
The cwd -> will tell you what folder is being accessed. That should let you know what user.
You can also from SSH on Cpanel boxes use something like "lynx localhost/whm-server-status" to see connections to specific URLs.