We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on Vesta 2.0 and expect to release it by the end of 2024. Read more about it: https://vestacp.com/docs/vesta-2-development
List server info not working
List server info not working
I am having troubles with this file.
https://github.com/serghey-rodin/vesta/ ... /index.php
This part isnt working/not giving output.
When running v-list-sys-cpu-status in terminal I am getting an output. a print of TOP and the CPUs.
when running v-list-sys-memory-status I get a "free -m" output and a summary after that.
The scripts seem to work but not outputting anything to that page.
Anyone have an idea how to debug this or fix this?
https://github.com/serghey-rodin/vesta/ ... /index.php
This part isnt working/not giving output.
Code: Select all
// CPU info
if (isset($_GET['cpu'])) {
$TAB = 'CPU';
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_server_info.html');
exec (VESTA_CMD.'v-list-sys-cpu-status', $output, $return_var);
foreach($output as $file) {
echo $file . "\n";
}
echo " </pre>\n</body>\n</html>\n";
exit();
}
// Memory info
if (isset($_GET['mem'])) {
$TAB = 'MEMORY';
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_server_info.html');
exec (VESTA_CMD.'v-list-sys-memory-status', $output, $return_var);
foreach($output as $file) {
echo $file . "\n";
}
echo " </pre>\n</body>\n</html>\n";
exit();
}
when running v-list-sys-memory-status I get a "free -m" output and a summary after that.
The scripts seem to work but not outputting anything to that page.
Anyone have an idea how to debug this or fix this?
Re: List server info not working
I'd say it depends from where you are running this script. I suppose you might have put it as a single file somewhere into your public_html?
If that's the case I'd guess your php might restrict the use of exec() at all, or the user which owns the file simply isn't allowed to access vesta's cli commands ;-)
If that's the case I'd guess your php might restrict the use of exec() at all, or the user which owns the file simply isn't allowed to access vesta's cli commands ;-)
Re: List server info not working
I am accessing it trough the vesta cp.
https://domain.com:8083/list/server/?cpu
https://domain.com:8083/list/server/?mem
they are both blank
https://domain.com:8083/list/server/?cpu
https://domain.com:8083/list/server/?mem
they are both blank
Re: List server info not working
in the file:
/usr/local/vesta/bin/v-list-sys-cpu-status
i had to change the following:
to
To fix the /usr/local/vesta/bin/v-list-sys-memory-status i had to comment out
i am running openvz
/usr/local/vesta/bin/v-list-sys-cpu-status
i had to change the following:
Code: Select all
# Displaying CPU information
grep 'model name' /proc/cpuinfo|cut -f 2 -d : | sed "s/ //"
echo
lscpu 2>/dev/null
Code: Select all
# Displaying CPU information
grep 'model name' /proc/cpuinfo|cut -f 2 -d : | sed "s/ //"
echo
#lscpu 2>/dev/null
Code: Select all
#dmidecode -t 17 2>/dev/null
i am running openvz
Re: List server info not working
thanks for the follow up. that dmidecode wont work with ovz is understandable, and lscpu seems to lack exactly the model name row on ovz... bad luck.
Re: List server info not working
You can try this fix:
Code: Select all
wget https://raw.githubusercontent.com/serghey-rodin/vesta/master/web/list/server/index.php -O /usr/local/vesta/web/list/server/index.php
Re: List server info not working
This worked for me, thank you.skurudo wrote:You can try this fix:Code: Select all
wget https://raw.githubusercontent.com/serghey-rodin/vesta/master/web/list/server/index.php -O /usr/local/vesta/web/list/server/index.php