Php 我无法看到使用Apache的Unix上的所有进程
我正在尝试使用Apache在服务器上运行进程。 我尝试过PHP、Perl和Bash脚本,并使用了以下命令:Php 我无法看到使用Apache的Unix上的所有进程,php,linux,bash,apache,perl,Php,Linux,Bash,Apache,Perl,我正在尝试使用Apache在服务器上运行进程。 我尝试过PHP、Perl和Bash脚本,并使用了以下命令: exec('ps -u username -o pid,uname,cmd,pmem,pcpu,etime --sort=-pcpu > test.txt'); exec('ps -u username -o pid,uname,cmd,pmem,pcpu,etime --sort=-pcpu', $output); exec('ps -A', $output); 等等
exec('ps -u username -o pid,uname,cmd,pmem,pcpu,etime --sort=-pcpu > test.txt');
exec('ps -u username -o pid,uname,cmd,pmem,pcpu,etime --sort=-pcpu', $output);
exec('ps -A', $output);
等等
我只得到所有的/USR/SBIN/HTTPD-k重启过程
但是,当我在SSH(终端)上尝试此命令时,我正确地获取了所有进程
我认为问题出在阿帕奇身上
任何人都知道我如何解决这个问题并使用Apache获取所有进程。
感谢advance使用命令ps x
将列出所有活动进程否,这没有帮助。在SSH上是可以的,但是使用Apache我仍然只能重启/usr/sbin/httpd-k restart/usr/sbin/httpd-k restart/usr/sbin/httpd-k restart/usr/sbin/httpd-k restart/usr/sbin/httpd-k restart/usr/sbin/httpd-k restart/usr/sbin/httpd-k restart/usr/sbin/httpd-k restart/usr/sbin/httpd-k restart/usr/sbin/httpd-k重启/usr/sbin/httpd-k重启/usr/sbin/httpd-k重启restart@ChankeyPathak,你能详细说明你的答案吗?它应该做什么?chcon:无法访问“/sbin/httpd”:没有这样的文件或目录这部分是权限问题。web服务器通常以用户“nobody”或“www”等身份运行,不能像root一样看到所有进程。
# chcon -t unconfined_exec_t /sbin/httpd