Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Vesta Web Interface
  • Search

List server info not working

Questions regarding the Web Interface
GUI
Locked
  • Print view
Advanced search
9 posts • Page 1 of 1
leisegang
Posts: 64
Joined: Mon Feb 29, 2016 7:24 pm

List server info not working

Post by leisegang » Thu Mar 31, 2016 3:14 pm

I am having troubles with this file.
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-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?
Top

leisegang
Posts: 64
Joined: Mon Feb 29, 2016 7:24 pm

Re: List server info not working

Post by leisegang » Sun Apr 24, 2016 5:15 pm

anyone?
Top

Falzo
Posts: 60
Joined: Mon Mar 28, 2016 8:49 am

Re: List server info not working

Post by Falzo » Sun Apr 24, 2016 5:27 pm

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 ;-)
Top

leisegang
Posts: 64
Joined: Mon Feb 29, 2016 7:24 pm

Re: List server info not working

Post by leisegang » Sun Apr 24, 2016 5:33 pm

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
Top

leisegang
Posts: 64
Joined: Mon Feb 29, 2016 7:24 pm

Re: List server info not working

Post by leisegang » Sun Apr 24, 2016 5:52 pm

in the file:
/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
to

Code: Select all

# Displaying CPU information
grep 'model name' /proc/cpuinfo|cut -f 2 -d : | sed "s/ //"
echo
#lscpu 2>/dev/null
To fix the /usr/local/vesta/bin/v-list-sys-memory-status i had to comment out

Code: Select all

#dmidecode -t 17 2>/dev/null

i am running openvz
Top

Falzo
Posts: 60
Joined: Mon Mar 28, 2016 8:49 am

Re: List server info not working

Post by Falzo » Sun Apr 24, 2016 6:07 pm

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.
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: List server info not working

Post by skurudo » Mon Apr 25, 2016 7:26 am

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
Top

SS88
Posts: 336
Joined: Thu Nov 19, 2015 12:40 pm

Re: List server info not working

Post by SS88 » Tue Apr 26, 2016 10:55 am

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
This worked for me, thank you.
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: List server info not working

Post by skurudo » Tue Apr 26, 2016 11:01 am

Nice, closed

Fix above or link below:
viewtopic.php?f=16&t=11073&p=42934#p42934
Top


Locked
  • Print view

9 posts • Page 1 of 1

Return to “Web Interface”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password