Re: PHP shell_exec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



h wrote:
> I have been using the shell_exec command to perform several server queries quite succesfully i.e. analysing files systems by gettin ginformation returned by df -kP (shell_exec('df -kP')).  do any of you guts know if it is possible to target a command like this on another server? 
> 
> So from server A where I am running a web app, needs to run the shell_exec('df -kP') on server B, which also has php installed, so that i can display the results in my web app on server A.  Hope that makes sense!
> 
> Also, how would i fopen a file such as /proc/cpuinfo on Server B from Server A.

If you need to inspect e.g. free space on remote servers it may be more
sensible to use SNMP or some such similar protocol/system that is
designed for exactly this purpose rather than try to hack up a system in
PHP (tho' I do love my hacking!)

Have a look at Nagios. I'd imagine your servers will have some degree of
health monitoring/reporting installed anyway for your own peace of mind,
so it shouldn't be too hard to hook into that system.

Col

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux