I'm using phpseclib to send top -cbn1 | grep servers/Server_1 | head -n 1
via ssh. The command works as expected in a terminal window but if i execute it with php it returns nothing. My code looks like this:
include('ssh/Net/SSH2.php');
include('../config/config.php');
$ServerID = 'Server_'.'1';
echo $ssh->exec('top -cbn1 | grep servers/Server_1 | head -n 1 \n');